diff --git a/packages/docusaurus-plugin-content-blog/package.json b/packages/docusaurus-plugin-content-blog/package.json index 51364d35e3b7..4a8b1d109152 100644 --- a/packages/docusaurus-plugin-content-blog/package.json +++ b/packages/docusaurus-plugin-content-blog/package.json @@ -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", diff --git a/packages/docusaurus-plugin-content-blog/src/index.ts b/packages/docusaurus-plugin-content-blog/src/index.ts index 0772a6a79b8a..89c423ac885e 100644 --- a/packages/docusaurus-plugin-content-blog/src/index.ts +++ b/packages/docusaurus-plugin-content-blog/src/index.ts @@ -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'; @@ -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] = {