Skip to content

Commit

Permalink
chore(v2): use single method package instead of whole Lodash package …
Browse files Browse the repository at this point in the history
…in blog plugin (#2460)
  • Loading branch information
Simek authored Mar 25, 2020
1 parent 16a8499 commit 85c124e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-content-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"fs-extra": "^8.1.0",
"globby": "^10.0.1",
"loader-utils": "^1.2.3",
"lodash": "^4.17.15"
"lodash.kebabcase": "^4.1.1"
},
"peerDependencies": {
"@docusaurus/core": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-content-blog/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import fs from 'fs-extra';
import _ from 'lodash';
import kebabCase from 'lodash.kebabcase';
import path from 'path';
import {normalizeUrl, docuHash, aliasedSitePath} from '@docusaurus/utils';

Expand Down Expand Up @@ -167,7 +167,7 @@ export default function pluginContentBlog(
// eslint-disable-next-line no-param-reassign
blogPost.metadata.tags = tags.map(tag => {
if (typeof tag === 'string') {
const normalizedTag = _.kebabCase(tag);
const normalizedTag = kebabCase(tag);
const permalink = normalizeUrl([tagsPath, normalizedTag]);
if (!blogTags[normalizedTag]) {
blogTags[normalizedTag] = {
Expand Down

0 comments on commit 85c124e

Please sign in to comment.