Skip to content

Commit 706a5d4

Browse files
ngnijlandclaude
andauthored
Add llms.txt generation for LLM-friendly docs (#920)
* Add llms.txt and llms-full.txt generation for LLM-friendly docs Add a build script that generates llms.txt (lightweight index) and llms-full.txt (full documentation content) from the Starlight doc sources. These files follow the llms.txt specification, making the documentation easily consumable by LLMs and indexable by services like Context7 with minimal token usage. - llms.txt: structured index with title, description, and URL per page - llms-full.txt: all doc content as clean markdown (MDX/HTML stripped) - Runs automatically before each build via package.json scripts https://claude.ai/code/session_01Jj2MZELm7URFgydFbwwA8m * Use starlight-llms-txt plugin and enable Starlight in production Replace the custom build script with the purpose-built starlight-llms-txt plugin, which generates llms.txt, llms-full.txt, and llms-small.txt from the rendered Starlight documentation at build time. This makes the docs easily accessible for LLMs and indexable by services like Context7 with minimal token usage. - Remove production guard so Starlight builds docs in all environments - Add starlight-llms-txt plugin with RocketSim project name/description - Remove custom generate-llms-txt.mjs script (replaced by plugin) - Revert package.json build script and .gitignore changes https://claude.ai/code/session_01Jj2MZELm7URFgydFbwwA8m * fix: render raw content * feat: postprocess llms.txt files * fix: llms best practises * fix: remove images in the small llms.txt variant only * fix: formatter --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5222f41 commit 706a5d4

File tree

10 files changed

+278
-15
lines changed

10 files changed

+278
-15
lines changed

docs/astro.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import mdx from "@astrojs/mdx";
55
import AutoImport from "astro-auto-import";
66
import tailwindcss from "@tailwindcss/vite";
77
import starlight from "@astrojs/starlight";
8+
import starlightLlmsTxt from "starlight-llms-txt";
89

910
import sitemap from "@astrojs/sitemap";
11+
import { llmsTxtPostProcess } from "./src/integrations/llms-txt-post-process";
1012

1113
import config from "./src/config/config.json";
1214

@@ -41,6 +43,14 @@ export default defineConfig({
4143
],
4244
}),
4345
starlight({
46+
plugins: [
47+
starlightLlmsTxt({
48+
projectName: "RocketSim",
49+
description:
50+
"RocketSim enhances the iOS Simulator with features for capturing screenshots and recordings, comparing designs, testing push notifications, deep links, location simulation, network speed control, accessibility toggles, and more.",
51+
rawContent: true,
52+
}),
53+
],
4454
title: "RocketSim Docs",
4555
disable404Route: true,
4656
logo: {
@@ -132,5 +142,6 @@ export default defineConfig({
132142
],
133143
}),
134144
mdx(),
145+
llmsTxtPostProcess(),
135146
],
136147
});

docs/package-lock.json

Lines changed: 126 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"marked": "^16.4.1",
2626
"react": "^19.2.3",
2727
"react-dom": "^19.2.3",
28-
"react-icons": "^5.5.0"
28+
"react-icons": "^5.5.0",
29+
"starlight-llms-txt": "^0.7.0"
2930
},
3031
"devDependencies": {
3132
"@astrojs/check": "^0.9.6",

docs/src/content/docs/docs/features/app-actions/general-app-actions.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RocketSim’s General app actions window pane provides access to all kinds of fe
1111

1212
![CleanShot 2025-01-21 at 14.06.26@2x.png](./general-app-actions/cleanshot_2025-01-21_at_14.06.262x.png)
1313

14-
Quickly test your app in any supported locale or specific timezone. You can read more about this feature here: [\*\*Localization testing in Xcode](https://www.avanderlee.com/xcode/localization-testing-in-xcode/).\*\* This feature is demonstrated in the following YouTube video:
14+
Quickly test your app in any supported locale or specific timezone. You can read more about this feature here: [**Localization testing in Xcode**](https://www.avanderlee.com/xcode/localization-testing-in-xcode/). This feature is demonstrated in the following YouTube video:
1515

1616
<Youtube id="zukRdke1cP8" title="Localization Testing in Xcode" />
1717

@@ -25,15 +25,15 @@ When working on features like Calendar access, it can be useful to quickly grant
2525

2626
![CleanShot 2025-01-21 at 14.08.14@2x.png](./general-app-actions/cleanshot_2025-01-21_at_14.08.142x.png)
2727

28-
Directories important to your app are listed in logical order. Each directory has its purpose and I encourage you to read my detailed article if you want to know more: [\*\*Xcode Simulator Directories Exploration](https://www.avanderlee.com/xcode/simulator-directories-access/).\*\*
28+
Directories important to your app are listed in logical order. Each directory has its purpose and I encourage you to read my detailed article if you want to know more: [**Xcode Simulator Directories Exploration**](https://www.avanderlee.com/xcode/simulator-directories-access/).
2929

3030
## User Defaults
3131

3232
By selecting either the Standard or Group User Defaults you’ll be able to monitor or edit defaults using the User Defaults Editor:
3333

3434
![User Defaults Editor.png](./general-app-actions/user_defaults_editor.png)
3535

36-
You can read more about this in my dedicated article: [\*\*User Defaults reading and writing in Swift](https://www.avanderlee.com/swift/user-defaults-preferences/).\*\* Or watch the demo video on YouTube:
36+
You can read more about this in my dedicated article: [**User Defaults reading and writing in Swift**](https://www.avanderlee.com/swift/user-defaults-preferences/). Or watch the demo video on YouTube:
3737

3838
<Youtube id="zTbQck3ofcc" title="User Defaults Editor Demo" />
3939

docs/src/content/docs/docs/features/app-actions/network-speed-control-and-simulator-airplane-mode.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It's essential to test your app in bad networking conditions during app developm
1212

1313
RocketSim’s Network Speed Control allows you to test your app for poor connections within the Simulator. The best thing of all: your Mac’s internet connection stays working, so you can still access ChatGPT or Stack Overflow while developing support.
1414

15-
I encourage you to read my article [\*\*Optimizing your app for Network Reachability](https://www.avanderlee.com/swift/optimizing-network-reachability/)\*\* to prepare your app for bad networking conditions using RocketSim.
15+
I encourage you to read my article [**Optimizing your app for Network Reachability**](https://www.avanderlee.com/swift/optimizing-network-reachability/) to prepare your app for bad networking conditions using RocketSim.
1616

1717
## FAQ
1818

docs/src/content/docs/docs/features/app-actions/user-defaults-editor.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Monitoring whether a User Defaults entry updates after a specific action or chan
77

88
<Youtube id="zTbQck3ofcc" title="User Defaults Editor" />
99

10-
You can read more about this in my dedicated article: [\*\*User Defaults reading and writing in Swift](https://www.avanderlee.com/swift/user-defaults-preferences/).\*\*
10+
You can read more about this in my dedicated article: [**User Defaults reading and writing in Swift**](https://www.avanderlee.com/swift/user-defaults-preferences/).
1111

1212
### How can I add values to the User Defaults?
1313

docs/src/content/docs/docs/features/capturing/statusbar-appearance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RocketSim allows you to customize the status bar of the iOS Simulator.
99

1010
You might or might not have noticed, but all of Apple’s devices have the status bar time set to 09:41. Here’s an image from the iPhone product page as an example:
1111

12-
![](./https:/)
12+
![Screenshot of iPhone product page](./statusbar-appearance/status_bar_override_9_41-1024x416.jpg)
1313

1414
[That time used to be 9:42](https://www.businessinsider.com/iphone-ad-942-2012-2), matching the time of January 9th, 2007 when Steve Jobs announced the first first iPhone. Around 42 minutes into his keynote he mentioned:
1515

19 KB
Loading

0 commit comments

Comments
 (0)