File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,17 @@ import { group } from "console";
9
9
10
10
const Blog = defineDocumentType ( ( ) => ( {
11
11
name : "Blog" ,
12
- filePathPattern : "**/**/*.mdx" ,
12
+ filePathPattern : "**/**/**/* .mdx" ,
13
13
contentType : "mdx" ,
14
14
fields : {
15
15
title : {
16
16
type : "string" ,
17
17
required : true ,
18
18
} ,
19
+ lang : {
20
+ type : "string" ,
21
+ required : true ,
22
+ } ,
19
23
publishedAt : {
20
24
type : "date" ,
21
25
required : true ,
@@ -45,7 +49,7 @@ const Blog = defineDocumentType(() => ({
45
49
computedFields : {
46
50
url_path : {
47
51
type : "string" ,
48
- resolve : ( doc ) => `/blogs/${ doc . _raw . flattenedPath } ` ,
52
+ resolve : ( doc ) => `/blogs/${ doc . _raw . flattenedPath . replace ( / ^ [ ^ \/ ] * \/ / , '' ) } ` ,
49
53
} ,
50
54
readingTime : {
51
55
type : "json" ,
Original file line number Diff line number Diff line change 1
1
/** @type {import('next').NextConfig } */
2
2
3
3
const { withContentlayer } = require ( "next-contentlayer" ) ;
4
+ const withNextIntl = require ( 'next-intl/plugin' ) ( ) ;
4
5
5
6
const nextConfig = {
6
7
compiler : {
7
- removeConsole : true ,
8
- }
8
+ removeConsole : false ,
9
+ } ,
9
10
}
10
11
11
- module . exports = withContentlayer ( { ...nextConfig } ) ;
12
+ module . exports = withNextIntl ( withContentlayer ( { ...nextConfig } ) ) ;
You can’t perform that action at this time.
0 commit comments