@knitli/astro-docs-template 0.2.3 → 0.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knitli/astro-docs-template",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Opinionated Astro + Starlight docs site template with Knitli branding",
5
5
  "keywords": [
6
6
  "knitli",
@@ -71,6 +71,7 @@
71
71
  "@astrojs/compiler-rs": "^0.1.4",
72
72
  "@biomejs/biome": "^2.4.2",
73
73
  "@knitli/tsconfig": "*",
74
+ "@types/bun": "^1.3.4",
74
75
  "@types/node": "^24.0.2",
75
76
  "bun": "^1.3.9",
76
77
  "lightningcss": "^1.30.2",
@@ -19,6 +19,7 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@astrojs/check": "latest",
22
+ "@knitli/tsconfig": "latest",
22
23
  "@types/node": "latest",
23
24
  "typescript": "latest",
24
25
  "wrangler": "latest"
@@ -0,0 +1,32 @@
1
+ # As a condition of accessing this website, you agree to abide by the
2
+ # following content signals:
3
+
4
+ # (a) If a content-signal = yes, you may collect content for the
5
+ # corresponding use.
6
+ # (b) If a content-signal = no, you may not collect content for the
7
+ # corresponding use.
8
+ # (c) If the website operator does not include a content signal for a
9
+ # corresponding use, the website operator neither grants nor restricts
10
+ # permission via content signal with respect to the corresponding use.
11
+
12
+ # The content signals and their meanings are:
13
+
14
+ # search: building a search index and providing search results (e.g., returning
15
+ # hyperlinks and short excerpts from your website's contents). Search
16
+ # does not include providing AI-generated search summaries.
17
+ # ai-input: inputting content into one or more AI models (e.g., retrieval
18
+ # augmented generation, grounding, or other real-time taking of
19
+ # content for generative AI search answers).
20
+ # ai-train: training or fine-tuning AI models.
21
+
22
+ # ANY RESTRICTIONS EXPRESSED VIA CONTENT SIGNALS ARE EXPRESS RESERVATIONS OF
23
+ # RIGHTS UNDER ARTICLE 4 OF THE EUROPEAN UNION DIRECTIVE 2019/790 ON COPYRIGHT
24
+ # AND RELATED RIGHTS IN THE DIGITAL SINGLE MARKET.
25
+
26
+ User-Agent: *
27
+ Content-Signal: ai-train=yes, search=yes, ai-input=yes
28
+ Allow: /
29
+ Disallow: /cdn-cgi/
30
+ Disallow: /admin/
31
+
32
+ Sitemap: https://docs.knitli.com/sitemap-index.xml
@@ -1,5 +1,8 @@
1
1
  {
2
- "extends": "@knitli/tsconfig/astro-tsconfig.json",
2
+ "extends": "@knitli/tsconfig/astro",
3
3
  "include": [".astro/types.d.ts", "**/*"],
4
- "exclude": ["dist"]
4
+ "exclude": ["dist"],
5
+ "compilerOptions": {
6
+ "rootDir": "."
7
+ }
5
8
  }
package/src/cli.ts CHANGED
@@ -15,6 +15,8 @@ import {
15
15
  type PieceName,
16
16
  } from "./index";
17
17
 
18
+ const BINARY_NAME = "knitli-docs";
19
+
18
20
  // ── Arg parsing ──
19
21
 
20
22
  function parseArgs(argv: string[]) {
@@ -113,7 +115,10 @@ async function getOptions(flags: Record<string, string>): Promise<InitOptions> {
113
115
  // ── Commands ──
114
116
 
115
117
  async function main() {
116
- const { flags, positional } = parseArgs(process.argv.slice(2));
118
+ const rawArgs = process.argv.slice(2);
119
+ // Strip binary name if passed as first arg (e.g. `bunx @knitli/astro-docs-template -- knitli-docs add`)
120
+ const args = rawArgs[0] === BINARY_NAME ? rawArgs.slice(1) : rawArgs;
121
+ const { flags, positional } = parseArgs(args);
117
122
  const command = positional[0];
118
123
 
119
124
  if (flags.help || !command) {