File tree 2 files changed +4
-4
lines changed
src/app/categories/[slug]
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
module . exports = {
3
3
// othor next config here...
4
4
compiler : {
5
- removeConsole : true ,
5
+ removeConsole : process . env . NODE_ENV === 'production' ? true : false ,
6
6
} ,
7
7
webpack : config => {
8
8
config . plugins . push ( new VeliteWebpackPlugin ( ) )
Original file line number Diff line number Diff line change 1
1
import { blogs as allBlogs } from "@/.velite/generated" ;
2
2
import BlogLayoutThree from "@/src/components/Blog/BlogLayoutThree" ;
3
3
import Categories from "@/src/components/Blog/Categories" ;
4
- import GithubSlugger , { slug } from "github-slugger" ;
4
+ import { slug } from "github-slugger" ;
5
5
6
- const slugger = new GithubSlugger ( ) ;
6
+ // const slugger = new GithubSlugger();
7
7
8
8
export async function generateStaticParams ( ) {
9
9
const categories = [ ] ;
@@ -12,7 +12,7 @@ export async function generateStaticParams() {
12
12
allBlogs . map ( ( blog ) => {
13
13
if ( blog . isPublished ) {
14
14
blog . tags . map ( ( tag ) => {
15
- let slugified = slugger . slug ( tag ) ;
15
+ let slugified = slug ( tag ) ;
16
16
if ( ! categories . includes ( slugified ) ) {
17
17
categories . push ( slugified ) ;
18
18
paths . push ( { slug : slugified } ) ;
You can’t perform that action at this time.
0 commit comments