@knitli/astro-docs-template 0.4.2 → 0.4.3
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.
- package/package.json +3 -1
- package/src/config.ts +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knitli/astro-docs-template",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Opinionated Astro + Starlight docs site template with Knitli branding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"knitli",
|
|
@@ -63,6 +63,8 @@
|
|
|
63
63
|
"astro-favicons": "3.1.6",
|
|
64
64
|
"bun": "^1.3.9",
|
|
65
65
|
"lightningcss": "^1.30.2",
|
|
66
|
+
"postcss": "^8.5.9",
|
|
67
|
+
"postcss-nesting": "^14.0.0",
|
|
66
68
|
"rehype-external-links": "^3.0.0",
|
|
67
69
|
"sharp": "^0.34.5",
|
|
68
70
|
"starlight-announcement": ">=0.1.1",
|
package/src/config.ts
CHANGED
|
@@ -164,6 +164,7 @@ export interface DocsTemplateOptions {
|
|
|
164
164
|
promotePatterns: string[];
|
|
165
165
|
demotePatterns: string[];
|
|
166
166
|
};
|
|
167
|
+
cloudflareConfigPath?: string;
|
|
167
168
|
rootDir: string;
|
|
168
169
|
shikiConfig?: typeof shikiCfg;
|
|
169
170
|
logoDark?: string;
|
|
@@ -400,6 +401,7 @@ export default function createConfig(options: DocsTemplateOptions) {
|
|
|
400
401
|
appName,
|
|
401
402
|
description,
|
|
402
403
|
llmConfig,
|
|
404
|
+
cloudflareConfigPath,
|
|
403
405
|
rootDir,
|
|
404
406
|
shikiConfig = shikiCfg,
|
|
405
407
|
logoDark = headlineLogoDark,
|
|
@@ -420,7 +422,7 @@ export default function createConfig(options: DocsTemplateOptions) {
|
|
|
420
422
|
site: "https://docs.knitli.com",
|
|
421
423
|
base: `/${appName.toLowerCase()}/`,
|
|
422
424
|
adapter: cloudflare({
|
|
423
|
-
configPath: `${rootDir}/wrangler.
|
|
425
|
+
configPath: cloudflareConfigPath || `${rootDir}/wrangler.jsonc`,
|
|
424
426
|
imageService: "compile",
|
|
425
427
|
}),
|
|
426
428
|
// Image optimization
|
|
@@ -507,7 +509,11 @@ export default function createConfig(options: DocsTemplateOptions) {
|
|
|
507
509
|
},
|
|
508
510
|
ssr: false,
|
|
509
511
|
},
|
|
510
|
-
css: {
|
|
512
|
+
css: {
|
|
513
|
+
postcss: {
|
|
514
|
+
plugins: [require("postcss-nesting")()],
|
|
515
|
+
},
|
|
516
|
+
},
|
|
511
517
|
},
|
|
512
518
|
prefetch: {
|
|
513
519
|
defaultStrategy: "viewport",
|