Unify slugify()

Provides a new util.js file with a unified `slugify()` function that also
lowercases the slug. Change all uses of `slugify()` to use this instead.
This commit is contained in:
Nick Pegg 2017-10-11 22:25:46 -07:00
parent b9fe8c7f38
commit 6109bb690d
5 changed files with 15 additions and 6 deletions

View file

@ -1,10 +1,10 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import slugify from 'slugify';
import Icon from 'react-fontawesome';
import { Row } from './skeleton';
import { slugify } from './util';
class ListLink extends Component {
@ -36,7 +36,7 @@ class NavList extends Component {
for (let page of blob.pages) {
let slug = page.slug;
if (!slug) {
slug = slugify(page.title).toLowerCase();
slug = slugify(page.title);
}
if (page.parent == null) {