File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/app/categories/[slug] Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 22module . exports = {
33 // othor next config here...
44 compiler : {
5- removeConsole : true ,
5+ removeConsole : process . env . NODE_ENV === 'production' ? true : false ,
66 } ,
77 webpack : config => {
88 config . plugins . push ( new VeliteWebpackPlugin ( ) )
Original file line number Diff line number Diff line change 11import { blogs as allBlogs } from "@/.velite/generated" ;
22import BlogLayoutThree from "@/src/components/Blog/BlogLayoutThree" ;
33import Categories from "@/src/components/Blog/Categories" ;
4- import GithubSlugger , { slug } from "github-slugger" ;
4+ import { slug } from "github-slugger" ;
55
6- const slugger = new GithubSlugger ( ) ;
6+ // const slugger = new GithubSlugger();
77
88export async function generateStaticParams ( ) {
99 const categories = [ ] ;
@@ -12,7 +12,7 @@ export async function generateStaticParams() {
1212 allBlogs . map ( ( blog ) => {
1313 if ( blog . isPublished ) {
1414 blog . tags . map ( ( tag ) => {
15- let slugified = slugger . slug ( tag ) ;
15+ let slugified = slug ( tag ) ;
1616 if ( ! categories . includes ( slugified ) ) {
1717 categories . push ( slugified ) ;
1818 paths . push ( { slug : slugified } ) ;
You can’t perform that action at this time.
0 commit comments