Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit b9599c1

Browse files
committed
wip
1 parent 3e57f7d commit b9599c1

File tree

744 files changed

+15625
-69541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

744 files changed

+15625
-69541
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@
2323
npm-debug.log*
2424
yarn-debug.log*
2525
yarn-error.log*
26-
.pnpm-debug.log*
2726

2827
# local env files
2928
.env*.local
3029

3130
# vercel
3231
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts
36+
37+
.contentlayer
38+
39+
old

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn lint-staged

.prettierignore

Lines changed: 0 additions & 22 deletions
This file was deleted.

.spellcheckerrc.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

components.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{
22
"$schema": "https://ui.shadcn.com/schema.json",
3-
"style": "default",
4-
"rsc": false,
3+
"style": "new-york",
4+
"rsc": true,
55
"tsx": true,
66
"tailwind": {
7-
"config": "tailwind.config.js",
7+
"config": "tailwind.config.ts",
88
"css": "src/styles/tailwind.css",
9-
"baseColor": "slate",
9+
"baseColor": "zinc",
1010
"cssVariables": true,
1111
"prefix": ""
1212
},
1313
"aliases": {
1414
"components": "@/components",
15-
"utils": "@/lib/utils"
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
1619
}
1720
}

contentlayer.config.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import { defineDocumentType, makeSource } from 'contentlayer2/source-files'
2+
import { extractTocHeadings } from './src/mdx/remark-toc-headings.mjs'
3+
import { title } from 'radash'
4+
import path from 'path'
5+
import fs from 'fs'
6+
7+
const contentDirPath = 'docs'
8+
9+
const branch = process.env.NEXT_PUBLIC_GITHUB_BRANCH || 'main'
10+
11+
const Doc = defineDocumentType(() => ({
12+
name: 'Doc',
13+
filePathPattern: '**/*.mdx',
14+
fields: {
15+
title: {
16+
type: 'string',
17+
description: 'The meta title of the doc',
18+
},
19+
nav_title: {
20+
type: 'string',
21+
description: 'The title of the doc in the navigation',
22+
},
23+
description: {
24+
type: 'string',
25+
description: 'The description of the doc',
26+
},
27+
image: {
28+
type: 'string',
29+
description: 'The image of the doc',
30+
},
31+
image_alt: {
32+
type: 'string',
33+
description: 'The image alt of the doc',
34+
},
35+
disable_edit: {
36+
type: 'boolean',
37+
description: 'Disable the github edit button',
38+
},
39+
},
40+
computedFields: {
41+
slug: {
42+
type: 'string',
43+
resolve: (doc) => doc._raw.flattenedPath,
44+
},
45+
seoTitle: {
46+
type: 'string',
47+
resolve: (doc) =>
48+
doc._raw.flattenedPath
49+
? doc._raw.flattenedPath
50+
.split('/')
51+
.slice(-2)
52+
.map((p) => title(p))
53+
.join(': ')
54+
: 'Welcome to Nitric Docs',
55+
},
56+
toc: { type: 'json', resolve: (doc) => extractTocHeadings(doc.body.raw) },
57+
editUrl: {
58+
type: 'string',
59+
resolve: (doc) =>
60+
`https://github.com/nitrictech/docs/edit/${branch}/docs/${doc._raw.sourceFilePath}`,
61+
},
62+
lastModified: {
63+
type: 'date',
64+
resolve: (doc) => {
65+
// Get the full path to the markdown file
66+
const filePath = path.join(
67+
process.cwd(),
68+
contentDirPath,
69+
doc._raw.sourceFilePath,
70+
)
71+
// Extract and return the last modified date
72+
const stats = fs.statSync(filePath)
73+
return stats.mtime // This is the last modified date
74+
},
75+
},
76+
},
77+
}))
78+
79+
export default makeSource({
80+
contentDirPath,
81+
documentTypes: [Doc],
82+
})

cypress.config.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

dictionary.txt

Lines changed: 0 additions & 210 deletions
This file was deleted.

0 commit comments

Comments
 (0)