create-trellis-docs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/bin/index.js +29 -0
  2. package/lib/index.js +178 -0
  3. package/package.json +23 -0
  4. package/template/_gitignore +6 -0
  5. package/template/blog/2025-01-01-welcome.md +15 -0
  6. package/template/design-tokens.json +218 -0
  7. package/template/docs/faq/general.mdx +16 -0
  8. package/template/docs/faq/index.mdx +13 -0
  9. package/template/docs/getting-started.mdx +54 -0
  10. package/template/docs/guides/writing-docs.mdx +90 -0
  11. package/template/docusaurus.config.js.tpl +200 -0
  12. package/template/package.json.tpl +60 -0
  13. package/template/packages/faq-index-plugin/README.md +104 -0
  14. package/template/packages/faq-index-plugin/index.js +91 -0
  15. package/template/packages/faq-index-plugin/package.json +15 -0
  16. package/template/packages/redirects-plugin/README.md +186 -0
  17. package/template/packages/redirects-plugin/index.js +167 -0
  18. package/template/packages/redirects-plugin/package.json +15 -0
  19. package/template/packages/redirects-plugin/yarn.lock +31 -0
  20. package/template/redirects.json +1 -0
  21. package/template/scripts/build-tokens.js +34 -0
  22. package/template/sidebars.js +17 -0
  23. package/template/src/components/CustomSearch/CustomSearch.js +241 -0
  24. package/template/src/components/CustomSearch/CustomSearchContent.js +171 -0
  25. package/template/src/components/CustomSearch/NavbarSearch.js +211 -0
  26. package/template/src/components/CustomSearch/SearchContext.js +26 -0
  27. package/template/src/components/CustomSearch/styles.module.css +171 -0
  28. package/template/src/components/CustomSearch/wrapperInit.js +11 -0
  29. package/template/src/components/FaqTableOfContents/index.jsx +176 -0
  30. package/template/src/components/FaqTableOfContents/styles.module.css +167 -0
  31. package/template/src/components/Feedback/Feedback.js +310 -0
  32. package/template/src/components/Feedback/api.js +77 -0
  33. package/template/src/components/FlippingCard/FlippingCard.js +197 -0
  34. package/template/src/components/FlippingCard/styles.module.css +248 -0
  35. package/template/src/components/Glossary.js +57 -0
  36. package/template/src/css/custom.css +765 -0
  37. package/template/src/data/glossary.json +1 -0
  38. package/template/src/pages/index.js.tpl +38 -0
  39. package/template/src/theme/Admonition/Icon/Danger.js +11 -0
  40. package/template/src/theme/Admonition/Icon/Info.js +11 -0
  41. package/template/src/theme/Admonition/Icon/Note.js +11 -0
  42. package/template/src/theme/Admonition/Icon/Tip.js +11 -0
  43. package/template/src/theme/Admonition/Icon/Warning.js +11 -0
  44. package/template/src/theme/Admonition/Layout/index.js +39 -0
  45. package/template/src/theme/Admonition/Layout/styles.module.css +36 -0
  46. package/template/src/theme/Admonition/Type/Caution.js +28 -0
  47. package/template/src/theme/Admonition/Type/Danger.js +26 -0
  48. package/template/src/theme/Admonition/Type/Info.js +26 -0
  49. package/template/src/theme/Admonition/Type/Note.js +26 -0
  50. package/template/src/theme/Admonition/Type/Tip.js +26 -0
  51. package/template/src/theme/Admonition/Type/Warning.js +26 -0
  52. package/template/src/theme/Admonition/Types.js +27 -0
  53. package/template/src/theme/Admonition/index.js +18 -0
  54. package/template/src/theme/AnnouncementBar/CloseButton/index.js +20 -0
  55. package/template/src/theme/AnnouncementBar/CloseButton/styles.module.css +4 -0
  56. package/template/src/theme/AnnouncementBar/Content/index.js +17 -0
  57. package/template/src/theme/AnnouncementBar/Content/styles.module.css +10 -0
  58. package/template/src/theme/AnnouncementBar/index.js +33 -0
  59. package/template/src/theme/AnnouncementBar/styles.module.css +55 -0
  60. package/template/src/theme/BlogSidebar/Content/index.js +35 -0
  61. package/template/src/theme/BlogSidebar/Desktop/index.js +44 -0
  62. package/template/src/theme/BlogSidebar/Desktop/styles.module.css +60 -0
  63. package/template/src/theme/BlogSidebar/Mobile/index.js +38 -0
  64. package/template/src/theme/BlogSidebar/Mobile/styles.module.css +3 -0
  65. package/template/src/theme/BlogSidebar/index.js +15 -0
  66. package/template/src/theme/Details/index.js +23 -0
  67. package/template/src/theme/Details/styles.module.css +52 -0
  68. package/template/src/theme/DocBreadcrumbs/Items/Home/index.js +22 -0
  69. package/template/src/theme/DocBreadcrumbs/Items/Home/styles.module.css +7 -0
  70. package/template/src/theme/DocBreadcrumbs/StructuredData/index.js +15 -0
  71. package/template/src/theme/DocBreadcrumbs/index.js +75 -0
  72. package/template/src/theme/DocBreadcrumbs/styles.module.css +5 -0
  73. package/template/src/theme/DocCard/index.js +93 -0
  74. package/template/src/theme/DocCard/styles.module.css +53 -0
  75. package/template/src/theme/DocCardList/index.js +27 -0
  76. package/template/src/theme/DocCardList/styles.module.css +7 -0
  77. package/template/src/theme/DocItem/Content/index.js +121 -0
  78. package/template/src/theme/DocItem/Content/styles.module.css +96 -0
  79. package/template/src/theme/DocItem/Footer/index.js +43 -0
  80. package/template/src/theme/DocItem/Footer/styles.module.css +19 -0
  81. package/template/src/theme/DocItem/Layout/index.js +55 -0
  82. package/template/src/theme/DocItem/Layout/styles.module.css +14 -0
  83. package/template/src/theme/DocItem/Metadata/index.js +17 -0
  84. package/template/src/theme/DocItem/Paginator/index.js +17 -0
  85. package/template/src/theme/DocItem/TOC/Desktop/index.js +15 -0
  86. package/template/src/theme/DocItem/TOC/Mobile/index.js +17 -0
  87. package/template/src/theme/DocItem/TOC/Mobile/styles.module.css +12 -0
  88. package/template/src/theme/DocItem/index.js +19 -0
  89. package/template/src/theme/DocItem/styles.module.css +28 -0
  90. package/template/src/theme/DocRoot/Layout/Main/index.js +23 -0
  91. package/template/src/theme/DocRoot/Layout/Main/styles.module.css +31 -0
  92. package/template/src/theme/DocRoot/Layout/Sidebar/ExpandButton/index.js +28 -0
  93. package/template/src/theme/DocRoot/Layout/Sidebar/ExpandButton/styles.module.css +27 -0
  94. package/template/src/theme/DocRoot/Layout/Sidebar/index.js +70 -0
  95. package/template/src/theme/DocRoot/Layout/Sidebar/styles.module.css +32 -0
  96. package/template/src/theme/DocRoot/Layout/index.js +27 -0
  97. package/template/src/theme/DocRoot/Layout/styles.module.css +9 -0
  98. package/template/src/theme/DocRoot/index.js +25 -0
  99. package/template/src/theme/DocSidebar/Desktop/CollapseButton/index.js +28 -0
  100. package/template/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +40 -0
  101. package/template/src/theme/DocSidebar/Desktop/Content/index.js +44 -0
  102. package/template/src/theme/DocSidebar/Desktop/Content/styles.module.css +16 -0
  103. package/template/src/theme/DocSidebar/Desktop/index.js +28 -0
  104. package/template/src/theme/DocSidebar/Desktop/styles.module.css +37 -0
  105. package/template/src/theme/DocSidebar/Mobile/index.js +39 -0
  106. package/template/src/theme/DocSidebar/index.js +18 -0
  107. package/template/src/theme/DocSidebarItem/Category/index.js +203 -0
  108. package/template/src/theme/DocSidebarItem/Html/index.js +20 -0
  109. package/template/src/theme/DocSidebarItem/Html/styles.module.css +6 -0
  110. package/template/src/theme/DocSidebarItem/Link/index.js +49 -0
  111. package/template/src/theme/DocSidebarItem/Link/styles.module.css +3 -0
  112. package/template/src/theme/DocSidebarItem/index.js +15 -0
  113. package/template/src/theme/EditMetaRow/index.js +25 -0
  114. package/template/src/theme/EditMetaRow/styles.module.css +11 -0
  115. package/template/src/theme/EditThisPage/index.js +29 -0
  116. package/template/src/theme/ErrorPageContent.js +34 -0
  117. package/template/src/theme/Footer/Copyright/index.js +11 -0
  118. package/template/src/theme/Footer/Layout/index.js +21 -0
  119. package/template/src/theme/Footer/LinkItem/index.js +26 -0
  120. package/template/src/theme/Footer/Links/MultiColumn/index.js +44 -0
  121. package/template/src/theme/Footer/Links/Simple/index.js +32 -0
  122. package/template/src/theme/Footer/Links/index.js +11 -0
  123. package/template/src/theme/Footer/Logo/index.js +35 -0
  124. package/template/src/theme/Footer/Logo/styles.module.css +9 -0
  125. package/template/src/theme/Footer/index.js +22 -0
  126. package/template/src/theme/MDXComponents/Heading.js +120 -0
  127. package/template/src/theme/MDXComponents/index.js +17 -0
  128. package/template/src/theme/MDXComponents/styles.module.css +110 -0
  129. package/template/src/theme/MDXContent/index.js +6 -0
  130. package/template/src/theme/NavbarItem/DropdownNavbarItem/Desktop/index.js +110 -0
  131. package/template/src/theme/NavbarItem/DropdownNavbarItem/Mobile/index.js +136 -0
  132. package/template/src/theme/NavbarItem/DropdownNavbarItem/Mobile/styles.module.css +3 -0
  133. package/template/src/theme/NavbarItem/DropdownNavbarItem/index.js +7 -0
  134. package/template/src/theme/NotFound/Content/index.js +46 -0
  135. package/template/src/theme/NotFound/index.js +19 -0
  136. package/template/src/theme/NotFound.js +49 -0
  137. package/template/src/theme/PaginatorNavLink/index.js +17 -0
  138. package/template/src/theme/TOC/index.js +19 -0
  139. package/template/src/theme/TOC/styles.module.css +16 -0
  140. package/template/src/theme/TOCItems/Tree.js +30 -0
  141. package/template/src/theme/TOCItems/index.js +47 -0
  142. package/template/src/theme/TabItem/index.js +15 -0
  143. package/template/src/theme/TabItem/styles.module.css +10 -0
  144. package/template/src/theme/Tabs/index.js +189 -0
  145. package/template/src/theme/Tabs/styles.module.css +74 -0
  146. package/template/static/img/favicon.svg +4 -0
  147. package/template/static/img/oops-404.svg +11 -0
  148. package/template/static/searchIndex.json +1 -0
package/bin/index.js ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { Command } = require('commander');
4
+ const { init } = require('../lib/index');
5
+ const pkg = require('../package.json');
6
+
7
+ const program = new Command();
8
+
9
+ program
10
+ .name('create-trellis-docs')
11
+ .version(pkg.version)
12
+ .description('Create a new Trellis documentation site')
13
+ .argument('[project-name]', 'Name of the project directory')
14
+ .option('-s, --skip-install', 'Skip dependency installation')
15
+ .option(
16
+ '-p, --package-manager <pm>',
17
+ 'Package manager to use (npm, yarn, pnpm)',
18
+ 'yarn'
19
+ )
20
+ .action(async (projectName, options) => {
21
+ try {
22
+ await init(projectName, options);
23
+ } catch (err) {
24
+ console.error('\nError:', err.message);
25
+ process.exit(1);
26
+ }
27
+ });
28
+
29
+ program.parse();
package/lib/index.js ADDED
@@ -0,0 +1,178 @@
1
+ const path = require('path');
2
+ const fs = require('fs-extra');
3
+ const prompts = require('prompts');
4
+ const spawn = require('cross-spawn');
5
+
6
+ const TEMPLATE_DIR = path.join(__dirname, '..', 'template');
7
+
8
+ function toSlug(name) {
9
+ return name
10
+ .toLowerCase()
11
+ .replace(/[^a-z0-9-]/g, '-')
12
+ .replace(/-+/g, '-')
13
+ .replace(/^-|-$/g, '');
14
+ }
15
+
16
+ async function promptForMissing(projectName) {
17
+ const questions = [];
18
+
19
+ if (!projectName) {
20
+ questions.push({
21
+ type: 'text',
22
+ name: 'projectName',
23
+ message: 'Project name:',
24
+ initial: 'my-docs',
25
+ validate: (val) =>
26
+ /^[a-z0-9][a-z0-9-]*$/.test(val) || 'Use lowercase letters, numbers, and hyphens',
27
+ });
28
+ }
29
+
30
+ questions.push(
31
+ {
32
+ type: 'text',
33
+ name: 'title',
34
+ message: 'Site title:',
35
+ initial: 'My Docs',
36
+ },
37
+ {
38
+ type: 'text',
39
+ name: 'tagline',
40
+ message: 'Tagline:',
41
+ initial: 'Documentation powered by Trellis',
42
+ },
43
+ {
44
+ type: 'text',
45
+ name: 'siteUrl',
46
+ message: 'Site URL:',
47
+ initial: 'https://example.com',
48
+ },
49
+ {
50
+ type: 'text',
51
+ name: 'repoUrl',
52
+ message: 'GitHub repo URL (optional):',
53
+ initial: '',
54
+ }
55
+ );
56
+
57
+ const answers = await prompts(questions, {
58
+ onCancel: () => {
59
+ console.log('\nScaffolding cancelled.');
60
+ process.exit(0);
61
+ },
62
+ });
63
+
64
+ return {
65
+ projectName: projectName || answers.projectName,
66
+ title: answers.title,
67
+ tagline: answers.tagline,
68
+ siteUrl: answers.siteUrl,
69
+ repoUrl: answers.repoUrl,
70
+ };
71
+ }
72
+
73
+ function processTemplate(content, vars) {
74
+ return content
75
+ .replace(/\{\{projectName\}\}/g, vars.title)
76
+ .replace(/\{\{projectSlug\}\}/g, vars.projectSlug)
77
+ .replace(/\{\{tagline\}\}/g, vars.tagline)
78
+ .replace(/\{\{siteUrl\}\}/g, vars.siteUrl)
79
+ .replace(/\{\{repoUrl\}\}/g, vars.repoUrl);
80
+ }
81
+
82
+ async function copyTemplate(destDir, vars) {
83
+ const SKIP = new Set(['node_modules', '.docusaurus', 'build']);
84
+
85
+ async function copyDir(src, dest) {
86
+ await fs.ensureDir(dest);
87
+ const entries = await fs.readdir(src, { withFileTypes: true });
88
+
89
+ for (const entry of entries) {
90
+ if (SKIP.has(entry.name)) continue;
91
+
92
+ const srcPath = path.join(src, entry.name);
93
+ const destName = entry.name === '_gitignore' ? '.gitignore' : entry.name;
94
+
95
+ if (entry.isDirectory()) {
96
+ await copyDir(srcPath, path.join(dest, destName));
97
+ } else if (entry.name.endsWith('.tpl')) {
98
+ // Template file — process placeholders and strip .tpl extension
99
+ const content = await fs.readFile(srcPath, 'utf-8');
100
+ const processed = processTemplate(content, vars);
101
+ const finalName = destName.replace(/\.tpl$/, '');
102
+ await fs.writeFile(path.join(dest, finalName), processed);
103
+ } else {
104
+ await fs.copy(srcPath, path.join(dest, destName));
105
+ }
106
+ }
107
+ }
108
+
109
+ await copyDir(TEMPLATE_DIR, destDir);
110
+ }
111
+
112
+ function installDeps(projectDir, packageManager) {
113
+ console.log(`\nInstalling dependencies with ${packageManager}...\n`);
114
+
115
+ const result = spawn.sync(packageManager, ['install'], {
116
+ cwd: projectDir,
117
+ stdio: 'inherit',
118
+ });
119
+
120
+ if (result.status !== 0) {
121
+ console.error(
122
+ `\nDependency installation failed. Run "${packageManager} install" manually in the project directory.`
123
+ );
124
+ return false;
125
+ }
126
+
127
+ return true;
128
+ }
129
+
130
+ async function init(projectName, options = {}) {
131
+ console.log('\n Trellis — Create a new documentation site\n');
132
+
133
+ const vars = await promptForMissing(projectName);
134
+ vars.projectSlug = toSlug(vars.projectName);
135
+
136
+ const destDir = path.resolve(process.cwd(), vars.projectName);
137
+
138
+ if (await fs.pathExists(destDir)) {
139
+ const contents = await fs.readdir(destDir);
140
+ if (contents.length > 0) {
141
+ throw new Error(`Directory "${vars.projectName}" already exists and is not empty.`);
142
+ }
143
+ }
144
+
145
+ console.log(`\nScaffolding project in ${destDir}...\n`);
146
+
147
+ await copyTemplate(destDir, vars);
148
+
149
+ console.log('Project files created.');
150
+
151
+ // Initialize git repo (required for showLastUpdateTime)
152
+ console.log('Initializing git repository...');
153
+ spawn.sync('git', ['init'], { cwd: destDir, stdio: 'ignore' });
154
+ spawn.sync('git', ['add', '-A'], { cwd: destDir, stdio: 'ignore' });
155
+ spawn.sync('git', ['commit', '-m', 'Initial commit from create-trellis-docs'], {
156
+ cwd: destDir,
157
+ stdio: 'ignore',
158
+ });
159
+ console.log('Git repository initialized.');
160
+
161
+ if (!options.skipInstall) {
162
+ const pm = options.packageManager || 'yarn';
163
+ installDeps(destDir, pm);
164
+ }
165
+
166
+ console.log(`
167
+ Done! Your Trellis docs site is ready.
168
+
169
+ Next steps:
170
+
171
+ cd ${vars.projectName}
172
+ ${options.skipInstall ? (options.packageManager || 'yarn') + ' install\n ' : ''}${options.packageManager || 'yarn'} start
173
+
174
+ Your site will be available at http://localhost:3001
175
+ `);
176
+ }
177
+
178
+ module.exports = { init };
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "create-trellis-docs",
3
+ "version": "1.0.0",
4
+ "description": "Create a new Trellis documentation site",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "create-trellis-docs": "bin/index.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "lib/",
12
+ "template/"
13
+ ],
14
+ "dependencies": {
15
+ "commander": "^12.0.0",
16
+ "cross-spawn": "^7.0.3",
17
+ "fs-extra": "^11.0.0",
18
+ "prompts": "^2.4.2"
19
+ },
20
+ "engines": {
21
+ "node": ">=18.0.0"
22
+ }
23
+ }
@@ -0,0 +1,6 @@
1
+ node_modules/
2
+ build/
3
+ .docusaurus/
4
+ src/css/tokens.css
5
+ .env
6
+ *.log
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Welcome
3
+ description: Welcome to our documentation site.
4
+ slug: welcome
5
+ authors:
6
+ - name: Team
7
+ ---
8
+
9
+ Welcome to our documentation site! This is a starter blog post.
10
+
11
+ <!-- truncate -->
12
+
13
+ ## Getting Started
14
+
15
+ Check out the [Getting Started](/getting-started/) guide to learn about the features available in your documentation site.
@@ -0,0 +1,218 @@
1
+ {
2
+ "neutral": {
3
+ "white": {
4
+ "value": "#ffffff",
5
+ "type": "color"
6
+ },
7
+ "slate-50": {
8
+ "value": "#f8fafc",
9
+ "type": "color"
10
+ },
11
+ "slate-100": {
12
+ "value": "#f1f5f9",
13
+ "type": "color"
14
+ },
15
+ "slate-200": {
16
+ "value": "#e2e8f0",
17
+ "type": "color"
18
+ },
19
+ "slate-300": {
20
+ "value": "#cbd5e1",
21
+ "type": "color"
22
+ },
23
+ "slate-400": {
24
+ "value": "#94a3b8",
25
+ "type": "color"
26
+ },
27
+ "slate-500": {
28
+ "value": "#64748b",
29
+ "type": "color"
30
+ },
31
+ "slate-600": {
32
+ "value": "#475569",
33
+ "type": "color"
34
+ },
35
+ "slate-700": {
36
+ "value": "#334155",
37
+ "type": "color"
38
+ },
39
+ "slate-800": {
40
+ "value": "#1e293b",
41
+ "type": "color"
42
+ },
43
+ "slate-900": {
44
+ "value": "#0f172a",
45
+ "type": "color"
46
+ }
47
+ },
48
+ "brand": {
49
+ "primary-50": {
50
+ "value": "#f5f3ff",
51
+ "type": "color"
52
+ },
53
+ "primary-100": {
54
+ "value": "#ede9fe",
55
+ "type": "color"
56
+ },
57
+ "primary-200": {
58
+ "value": "#ddd6fe",
59
+ "type": "color"
60
+ },
61
+ "primary-300": {
62
+ "value": "#c4b5fd",
63
+ "type": "color"
64
+ },
65
+ "primary-400": {
66
+ "value": "#a78bfa",
67
+ "type": "color"
68
+ },
69
+ "primary-500": {
70
+ "value": "#8b5cf6",
71
+ "type": "color"
72
+ },
73
+ "primary-600": {
74
+ "value": "#7c3aed",
75
+ "type": "color"
76
+ },
77
+ "primary-700": {
78
+ "value": "#6d28d9",
79
+ "type": "color"
80
+ },
81
+ "primary-800": {
82
+ "value": "#5b21b6",
83
+ "type": "color"
84
+ },
85
+ "primary-900": {
86
+ "value": "#4c1d95",
87
+ "type": "color"
88
+ }
89
+ },
90
+ "utility": {
91
+ "green-20": {
92
+ "value": "#dcfce7",
93
+ "type": "color"
94
+ },
95
+ "green-100": {
96
+ "value": "#16a34a",
97
+ "type": "color"
98
+ },
99
+ "red-20": {
100
+ "value": "#fee2e2",
101
+ "type": "color"
102
+ },
103
+ "red-100": {
104
+ "value": "#dc2626",
105
+ "type": "color"
106
+ },
107
+ "yellow-20": {
108
+ "value": "#fef9c3",
109
+ "type": "color"
110
+ },
111
+ "yellow-100": {
112
+ "value": "#eab308",
113
+ "type": "color"
114
+ }
115
+ },
116
+ "accent": {
117
+ "teal-200": {
118
+ "value": "#99f6e4",
119
+ "type": "color"
120
+ },
121
+ "teal-300": {
122
+ "value": "#5eead4",
123
+ "type": "color"
124
+ },
125
+ "teal-400": {
126
+ "value": "#2dd4bf",
127
+ "type": "color"
128
+ },
129
+ "teal-500": {
130
+ "value": "#14b8a6",
131
+ "type": "color"
132
+ },
133
+ "teal-600": {
134
+ "value": "#0d9488",
135
+ "type": "color"
136
+ }
137
+ },
138
+ "spacing": {
139
+ "spacing-8": {
140
+ "value": "8px",
141
+ "type": "spacing"
142
+ },
143
+ "spacing-16": {
144
+ "value": "16px",
145
+ "type": "spacing"
146
+ },
147
+ "spacing-24": {
148
+ "value": "24px",
149
+ "type": "spacing"
150
+ },
151
+ "spacing-32": {
152
+ "value": "32px",
153
+ "type": "spacing"
154
+ },
155
+ "spacing-40": {
156
+ "value": "40px",
157
+ "type": "spacing"
158
+ },
159
+ "spacing-48": {
160
+ "value": "48px",
161
+ "type": "spacing"
162
+ },
163
+ "spacing-64": {
164
+ "value": "64px",
165
+ "type": "spacing"
166
+ },
167
+ "spacing-80": {
168
+ "value": "80px",
169
+ "type": "spacing"
170
+ },
171
+ "spacing-96": {
172
+ "value": "96px",
173
+ "type": "spacing"
174
+ },
175
+ "spacing-120": {
176
+ "value": "120px",
177
+ "type": "spacing"
178
+ }
179
+ },
180
+ "border-radius": {
181
+ "border-radius-4": {
182
+ "value": "4px",
183
+ "type": "borderRadius"
184
+ },
185
+ "border-radius-8": {
186
+ "value": "8px",
187
+ "type": "borderRadius"
188
+ },
189
+ "border-radius-30": {
190
+ "value": "30px",
191
+ "type": "borderRadius"
192
+ },
193
+ "border-radius-900": {
194
+ "value": "900px",
195
+ "type": "borderRadius"
196
+ }
197
+ },
198
+ "border-width": {
199
+ "border-width-1": {
200
+ "value": "1px",
201
+ "type": "borderWidth"
202
+ },
203
+ "border-width-2": {
204
+ "value": "2px",
205
+ "type": "borderWidth"
206
+ },
207
+ "border-width-none": {
208
+ "value": "0px",
209
+ "type": "borderWidth"
210
+ }
211
+ },
212
+ "typography": {
213
+ "fontFamily": {
214
+ "name": "font-family",
215
+ "value": "'Segoe UI', 'SF Pro Display', system-ui, -apple-system, sans-serif"
216
+ }
217
+ }
218
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: General
3
+ description: General questions.
4
+ ---
5
+
6
+ ### How do I add a new page?
7
+
8
+ Create a new `.mdx` file in the `docs/` directory. Add it to `sidebars.js` to include it in the sidebar navigation. The page will be available at a URL matching its file path.
9
+
10
+ ### How do I customize the colors?
11
+
12
+ Edit `design-tokens.json` at the project root. Run `yarn build-tokens` to regenerate the CSS, or simply `yarn start` which runs it automatically.
13
+
14
+ ### How does the search work?
15
+
16
+ The smart search plugin indexes all documentation at build time. Search is performed client-side using Fuse.js for fast, fuzzy matching. You can configure field weights in `docusaurus.config.js`.
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: Frequently Asked Questions
3
+ id: faq
4
+ slug: /faq
5
+ description: Common questions about this documentation site.
6
+ hide_table_of_contents: true
7
+ ---
8
+
9
+ import FaqTableOfContents from '@site/src/components/FaqTableOfContents';
10
+
11
+ Browse frequently asked questions below, or use the search to find answers.
12
+
13
+ <FaqTableOfContents />
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: Getting Started
3
+ description: Get up and running with your documentation site.
4
+ keywords: [getting-started, setup, introduction]
5
+ ---
6
+
7
+ Welcome to your new documentation site, built with [Trellis](https://trellis.pixlngrid.com) — an opinionated docs framework on Docusaurus.
8
+
9
+ ## Quick Start
10
+
11
+ ```bash
12
+ # Start the dev server
13
+ yarn start
14
+ ```
15
+
16
+ :::tip
17
+ The dev server runs on port 3001 by default. Visit `http://localhost:3001` to see your docs.
18
+ :::
19
+
20
+ ## Project Structure
21
+
22
+ ```
23
+ your-project/
24
+ ├── docs/ # Your documentation content
25
+ ├── blog/ # Release notes and blog posts
26
+ ├── src/
27
+ │ ├── css/ # Custom CSS and design tokens
28
+ │ ├── theme/ # Customized Docusaurus theme components
29
+ │ ├── components/ # Reusable React components
30
+ │ └── pages/ # Custom pages (homepage)
31
+ ├── static/ # Static assets (images, fonts)
32
+ ├── packages/ # Local plugins
33
+ │ ├── redirects-plugin/
34
+ │ └── faq-index-plugin/
35
+ ├── design-tokens.json # Design token definitions
36
+ └── docusaurus.config.js
37
+ ```
38
+
39
+ ## What's Included
40
+
41
+ - **Custom theme** with last-updated date at the top of each page, heading copy-to-clipboard, pill-style tabs, and custom admonition icons
42
+ - **Design token system** that converts `design-tokens.json` into CSS custom properties
43
+ - **Smart search** with Fuse.js — no external service required
44
+ - **Image lightbox** — click-to-zoom on any image
45
+ - **Mermaid diagrams** with pan and zoom support
46
+ - **FAQ index plugin** — auto-generates FAQ table of contents
47
+ - **Redirect management** via `redirects.json`
48
+
49
+ ## Next Steps
50
+
51
+ - Edit this page at `docs/getting-started.mdx`
52
+ - Add new docs to the `docs/` directory
53
+ - Customize your brand colors in `design-tokens.json`
54
+ - Update site metadata in `docusaurus.config.js`
@@ -0,0 +1,90 @@
1
+ ---
2
+ title: Writing Docs
3
+ description: Supported markdown features and content authoring guide.
4
+ keywords: [writing, markdown, authoring]
5
+ ---
6
+
7
+ This guide covers the markdown features available in your Trellis documentation site.
8
+
9
+ ## Headings
10
+
11
+ Use standard markdown headings (`##`, `###`, `####`). Each heading automatically gets an anchor link with a copy-to-clipboard button on hover.
12
+
13
+ ## Code Blocks
14
+
15
+ Fenced code blocks support syntax highlighting via Prism:
16
+
17
+ ```javascript title="example.js"
18
+ function greet(name) {
19
+ return `Hello, ${name}!`;
20
+ }
21
+ ```
22
+
23
+ ## Admonitions
24
+
25
+ :::note
26
+ This is a **note** admonition. Use it for supplementary information.
27
+ :::
28
+
29
+ :::tip
30
+ This is a **tip** admonition. Use it for best practices.
31
+ :::
32
+
33
+ :::info
34
+ This is an **info** admonition. Use it for important context.
35
+ :::
36
+
37
+ :::caution
38
+ This is a **caution** admonition. Use it for things that could cause issues.
39
+ :::
40
+
41
+ :::danger
42
+ This is a **danger** admonition. Use it for critical warnings.
43
+ :::
44
+
45
+ ## Tabs
46
+
47
+ import Tabs from '@theme/Tabs';
48
+ import TabItem from '@theme/TabItem';
49
+
50
+ <Tabs>
51
+ <TabItem value="npm" label="npm" default>
52
+
53
+ ```bash
54
+ npm install
55
+ ```
56
+
57
+ </TabItem>
58
+ <TabItem value="yarn" label="yarn">
59
+
60
+ ```bash
61
+ yarn install
62
+ ```
63
+
64
+ </TabItem>
65
+ </Tabs>
66
+
67
+ ## Tables
68
+
69
+ | Feature | Status |
70
+ |---------|--------|
71
+ | Smart Search | Available |
72
+ | Image Lightbox | Available |
73
+ | Mermaid Diagrams | Available |
74
+
75
+ ## Mermaid Diagrams
76
+
77
+ ```mermaid
78
+ graph LR
79
+ A[Write Content] --> B[Build]
80
+ B --> C[Deploy]
81
+ ```
82
+
83
+ ## Collapsible Sections
84
+
85
+ <details>
86
+ <summary>Click to expand</summary>
87
+
88
+ This content is hidden by default.
89
+
90
+ </details>