-
Notifications
You must be signed in to change notification settings - Fork 0
fix(public): list all 12 public pages in llms.txt #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
32a4b0a
184f34d
a52a311
9e784bb
5bf08ec
3d56775
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,9 +63,14 @@ Tiny Studio is a small product company behind Promptly, Drishti, and 0509. | |
| - Support: https://tinystudio.in/support/ | ||
| - Contact: https://tinystudio.in/contact/ | ||
| - Privacy: https://tinystudio.in/privacy/ | ||
| - Privacy choices: https://tinystudio.in/privacy-choices/ | ||
| - Terms: https://tinystudio.in/terms/ | ||
| - Promptly: https://tinystudio.in/promptly/ | ||
| - Promptly support: https://tinystudio.in/promptly/support/ | ||
| - Promptly privacy: https://tinystudio.in/promptly/privacy/ | ||
| - Drishti: https://tinystudio.in/drishti/ | ||
| - Drishti support: https://tinystudio.in/drishti/support/ | ||
| - Drishti privacy: https://tinystudio.in/drishti/privacy/ | ||
|
|
||
| ## Product boundaries | ||
|
|
||
|
|
@@ -89,6 +94,7 @@ async function main() { | |
| await fs.writeFile(cssPath, css); | ||
| await fs.copyFile(iconPath, appleIconPath); | ||
| await fs.writeFile(path.join(root, "llms.txt"), llmsTxt); | ||
| assertLlmsTxtCoversPublicPages(llmsTxt); | ||
|
|
||
| for (const relativeFile of htmlFiles) { | ||
| const filePath = path.join(root, relativeFile); | ||
|
|
@@ -143,6 +149,22 @@ function addSupportSchema(html) { | |
| return html.replace(/(\s*<link rel="apple-touch-icon")/, `\n${script}$1`); | ||
| } | ||
|
|
||
| function pageUrlFor(relativeFile) { | ||
| return relativeFile === "index.html" | ||
| ? "https://tinystudio.in/" | ||
| : `https://tinystudio.in/${path.posix.dirname(relativeFile)}/`; | ||
| } | ||
|
|
||
| function assertLlmsTxtCoversPublicPages(content) { | ||
| const publicFiles = htmlFiles.filter((relativeFile) => relativeFile !== "404.html"); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a new Useful? React with 👍 / 👎. |
||
| const missing = publicFiles | ||
| .map(pageUrlFor) | ||
| .filter((url) => !content.includes(url)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the Home, Promptly, or Drishti landing-page line is removed from Useful? React with 👍 / 👎. |
||
| if (missing.length) { | ||
| throw new Error(`llms.txt does not list every public page; missing: ${missing.join(", ")}`); | ||
| } | ||
| } | ||
|
|
||
| async function assertLocalAssetsExist() { | ||
| const referenced = new Set(); | ||
| for (const relativeFile of htmlFiles) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a future PR removes an entry from the template or edits the committed
public/llms.txtwithout explicitly runningnpm run site:prepare, this assertion never executes: the checked.github/workflows/codex-ci.ymlrunsnpm run ci, whose only handling of this script isnode --check. Consequently all repository checks can pass with incomplete or stale coverage, contrary to the intended regression guard. Add a non-mutating coverage test tonpm run ci, or run generation there and fail when it leaves a diff.Useful? React with 👍 / 👎.