Skip to content

Commit 2729751

Browse files
committed
Add initial configuration and structure for Next.js project
- Created .eslintrc.json for ESLint configuration. - Added next.config.mjs for Next.js configuration with Contentlayer support. - Introduced contentlayer.config.ts for document type definitions. - Updated package.json with necessary dependencies and scripts. - Added Tailwind CSS configuration in tailwind.config.ts and postcss.config.mjs. - Created initial layout and global styles in app/layout.tsx and app/globals.css. - Implemented documentation structure with dynamic routing for MDX files. - Removed legacy HTML and CSS files from previous template.
1 parent 6c586ad commit 2729751

35 files changed

Lines changed: 556 additions & 776 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// contentlayer.config.ts
2+
import { defineDocumentType, makeSource } from "contentlayer/source-files";
3+
import remarkGfm from "remark-gfm";
4+
import rehypeSlug from "rehype-slug";
5+
import rehypeAutolinkHeadings from "rehype-autolink-headings";
6+
var Doc = defineDocumentType(() => ({
7+
name: "Doc",
8+
filePathPattern: `**/*.md?(x)`,
9+
contentType: "mdx",
10+
fields: {
11+
title: { type: "string", required: true },
12+
description: { type: "string" },
13+
date: { type: "date" },
14+
tags: { type: "list", of: { type: "string" } }
15+
},
16+
computedFields: {
17+
slug: { type: "string", resolve: (d) => d._raw.flattenedPath }
18+
}
19+
}));
20+
var contentlayer_config_default = makeSource({
21+
contentDirPath: "app/docs",
22+
documentTypes: [Doc],
23+
mdx: {
24+
remarkPlugins: [remarkGfm],
25+
rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, { behavior: "wrap" }]]
26+
},
27+
disableImportAliasWarning: true
28+
});
29+
export {
30+
Doc,
31+
contentlayer_config_default as default
32+
};
33+
//# sourceMappingURL=compiled-contentlayer-config-77JZF4LT.mjs.map
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 3,
3+
"sources": ["../../../contentlayer.config.ts"],
4+
"sourcesContent": ["import { defineDocumentType, makeSource } from 'contentlayer/source-files'\r\nimport remarkGfm from 'remark-gfm'\r\nimport rehypeSlug from 'rehype-slug'\r\nimport rehypeAutolinkHeadings from 'rehype-autolink-headings'\r\n\r\nexport const Doc = defineDocumentType(() => ({\r\n name: 'Doc',\r\n filePathPattern: `**/*.md?(x)`,\r\n contentType: 'mdx',\r\n fields: {\r\n title: { type: 'string', required: true },\r\n description: { type: 'string' },\r\n date: { type: 'date' },\r\n tags: { type: 'list', of: { type: 'string' } },\r\n },\r\n computedFields: {\r\n slug: { type: 'string', resolve: (d) => d._raw.flattenedPath },\r\n },\r\n}))\r\n\r\nexport default makeSource({\r\n contentDirPath: 'app/docs',\r\n documentTypes: [Doc],\r\n mdx: {\r\n remarkPlugins: [remarkGfm],\r\n rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, { behavior: 'wrap' }]],\r\n },\r\n disableImportAliasWarning: true,\r\n})\r\n"],
5+
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB;AAC/C,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,4BAA4B;AAE5B,IAAM,MAAM,mBAAmB,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,aAAa,EAAE,MAAM,SAAS;AAAA,IAC9B,MAAM,EAAE,MAAM,OAAO;AAAA,IACrB,MAAM,EAAE,MAAM,QAAQ,IAAI,EAAE,MAAM,SAAS,EAAE;AAAA,EAC/C;AAAA,EACA,gBAAgB;AAAA,IACd,MAAM,EAAE,MAAM,UAAU,SAAS,CAAC,MAAM,EAAE,KAAK,cAAc;AAAA,EAC/D;AACF,EAAE;AAEF,IAAO,8BAAQ,WAAW;AAAA,EACxB,gBAAgB;AAAA,EAChB,eAAe,CAAC,GAAG;AAAA,EACnB,KAAK;AAAA,IACH,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe,CAAC,YAAY,CAAC,wBAAwB,EAAE,UAAU,OAAO,CAAC,CAAC;AAAA,EAC5E;AAAA,EACA,2BAA2B;AAC7B,CAAC;",
6+
"names": []
7+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// contentlayer.config.ts
2+
import { defineDocumentType, makeSource } from "contentlayer/source-files";
3+
import remarkGfm from "remark-gfm";
4+
import rehypeSlug from "rehype-slug";
5+
import rehypeAutolinkHeadings from "rehype-autolink-headings";
6+
var Doc = defineDocumentType(() => ({
7+
name: "Doc",
8+
filePathPattern: `**/*.md?(x)`,
9+
contentType: "mdx",
10+
fields: {
11+
title: { type: "string", required: true },
12+
description: { type: "string" },
13+
date: { type: "date" },
14+
tags: { type: "list", of: { type: "string" } }
15+
},
16+
computedFields: {
17+
slug: { type: "string", resolve: (d) => d._raw.flattenedPath }
18+
}
19+
}));
20+
var contentlayer_config_default = makeSource({
21+
contentDirPath: "docs",
22+
documentTypes: [Doc],
23+
mdx: {
24+
remarkPlugins: [remarkGfm],
25+
rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, { behavior: "wrap" }]]
26+
}
27+
});
28+
export {
29+
Doc,
30+
contentlayer_config_default as default
31+
};
32+
//# sourceMappingURL=compiled-contentlayer-config-BT34F4FH.mjs.map
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"version": 3,
3+
"sources": ["../../../contentlayer.config.ts"],
4+
"sourcesContent": ["import { defineDocumentType, makeSource } from 'contentlayer/source-files'\r\nimport remarkGfm from 'remark-gfm'\r\nimport rehypeSlug from 'rehype-slug'\r\nimport rehypeAutolinkHeadings from 'rehype-autolink-headings'\r\n\r\nexport const Doc = defineDocumentType(() => ({\r\n name: 'Doc',\r\n filePathPattern: `**/*.md?(x)`,\r\n contentType: 'mdx',\r\n fields: {\r\n title: { type: 'string', required: true },\r\n description: { type: 'string' },\r\n date: { type: 'date' },\r\n tags: { type: 'list', of: { type: 'string' } },\r\n },\r\n computedFields: {\r\n slug: { type: 'string', resolve: (d) => d._raw.flattenedPath },\r\n },\r\n}))\r\n\r\nexport default makeSource({\r\n contentDirPath: 'docs',\r\n documentTypes: [Doc],\r\n mdx: {\r\n remarkPlugins: [remarkGfm],\r\n rehypePlugins: [rehypeSlug, [rehypeAutolinkHeadings, { behavior: 'wrap' }]],\r\n },\r\n})\r\n"],
5+
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB;AAC/C,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,OAAO,4BAA4B;AAE5B,IAAM,MAAM,mBAAmB,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACN,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACxC,aAAa,EAAE,MAAM,SAAS;AAAA,IAC9B,MAAM,EAAE,MAAM,OAAO;AAAA,IACrB,MAAM,EAAE,MAAM,QAAQ,IAAI,EAAE,MAAM,SAAS,EAAE;AAAA,EAC/C;AAAA,EACA,gBAAgB;AAAA,IACd,MAAM,EAAE,MAAM,UAAU,SAAS,CAAC,MAAM,EAAE,KAAK,cAAc;AAAA,EAC/D;AACF,EAAE;AAEF,IAAO,8BAAQ,WAAW;AAAA,EACxB,gBAAgB;AAAA,EAChB,eAAe,CAAC,GAAG;AAAA,EACnB,KAAK;AAAA,IACH,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe,CAAC,YAAY,CAAC,wBAAwB,EAAE,UAAU,OAAO,CAAC,CAAC;AAAA,EAC5E;AACF,CAAC;",
6+
"names": []
7+
}

.contentlayer/.cache/v0.3.4/data-77JZF4LT.json

Lines changed: 31 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"cacheItemsMap": {}
3+
}

.contentlayer/generated/Doc/_index.json

Lines changed: 24 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// NOTE This file is auto-generated by Contentlayer
2+
3+
import guide__helloWorldMd from './guide__HelloWorld.md.json' assert { type: 'json' }
4+
5+
export const allDocs = [guide__helloWorldMd]

.contentlayer/generated/Doc/guide__HelloWorld.md.json

Lines changed: 22 additions & 0 deletions
Large diffs are not rendered by default.

.contentlayer/generated/index.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// NOTE This file is auto-generated by Contentlayer
2+
3+
import { Doc, DocumentTypes, DataExports } from './types'
4+
import { SourceProvideSchemaErrorJSON, SourceFetchDataErrorJSON } from 'contentlayer/core'
5+
6+
export * from './types'
7+
8+
export declare const allDocs: Doc[]
9+
10+
export declare const allDocuments: DocumentTypes[]
11+
12+

0 commit comments

Comments
 (0)