mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 00:17:14 +02:00
chore(v2): use single method package instead of whole Lodash package in blog plugin (#2460)
This commit is contained in:
parent
16a84998da
commit
85c124e3f1
2 changed files with 3 additions and 3 deletions
|
@ -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] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue