GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs(site): add markdown copies, llms.txt, and a markdown toolbar to the site by dschach · Pull Request #407 · dschach/salesforce-trigger-framework

Conversation

@dschach

@dschach dschach commented Nov 12, 2026

Copy link
Copy Markdown
Owner

The documentation site gets a markdown copy of each page, an llms.txt, and a markdown toolbar at the top of each page, so that people and LLM tools can read the documentation as markdown. All of it is built in the deploy job from the release tag, so nothing generated is committed and the live site always matches the release.

Changes

  • scripts/build-markdown-site.mjs (new) runs on the site folder after the changelog steps. The pages from markdown files (the home page, the deploy page, the changelog, and the sample handler page) copy their source, with the links changed to the site. The class pages are converted from their HTML with turndown and turndown-plugin-gfm: signatures become Apex code blocks, the parameter tables become lists, and the links to an anchor go to the HTML page, because a markdown file has no heading ids. Each copy has the name of its page with .md in place of .html, for example deploy.md.

  • The script writes llms.txt in the form of llmstxt.org, with the package summary, the install line of the release, the main pages, and an Optional section for the changelog and the sample and test classes. The script fails if a link in llms.txt has no file.

  • The script adds a toolbar to each page, after the start of the page content: Copy as Markdown, View as Markdown, and a menu with Copy URL to Markdown, View llms.txt, and Copy URL to llms.txt. It also adds head links to the markdown copy (rel="alternate") and to llms.txt (rel="describedby"). A page that has the toolbar already is skipped, so a second run changes nothing.

  • doc-assets/markdown-tools/ (new) holds the toolbar script and stylesheet. The script copies them to assets/; they are not ApexDox assets. The toolbar loads the markdown with the page and copies inside the click, with the old copy command first and the Clipboard API second, because some browsers allow a clipboard write only inside the click.

  • deploy-site.yml has a new step, "Add the markdown pages, llms.txt, and the toolbar", before the upload.

  • CONTRIBUTING.md tells how to preview the result on a copy of the site folder.

  • turndown and turndown-plugin-gfm are new devDependencies.

Behavior notes

  • The committed docs/ folder does not change. Only the deployed site gets the markdown pages, llms.txt, and the toolbar.

  • llms.txt is at /salesforce-trigger-framework/llms.txt, which the llmstxt.org form allows. A root robots.txt and a sitemap wait for the search indexing work, because the host root is served from another repository.

Test plan

  • Ran the script on a copy of docs/ and read each markdown copy and llms.txt.

  • Opened the result in a local server: the toolbar shows on each page, Copy as Markdown and the copy URL actions copy, and the view actions open the markdown and llms.txt.

  • Ran the script a second time on the same folder: no page changed.

  • After the next release deploy: check that Safari and Firefox show the .md files and llms.txt in the browser, and that GitHub Pages sends them as UTF-8.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Claude AI @claude
docs(site): add markdown copies, llms.txt, and a markdown toolbar to …
3d0bc6e
…the site

The deploy job now runs scripts/build-markdown-site.mjs on the site of the release tag. It writes a markdown copy of each page next to it: the pages from markdown files copy their source, and the class pages are converted from their HTML with turndown. It writes an llms.txt in the form of llmstxt.org that lists the copies, and it adds a toolbar at the top of each page with Copy as Markdown, View as Markdown, Copy URL to Markdown, View llms.txt, and Copy URL to llms.txt. The toolbar loads the markdown with the page and copies inside the click, so browsers that allow a clipboard write only there can copy.

Co-Authored-By: Claude <[email protected]>
@dschach
dschach merged commit 628f77c into main Nov 12, 2026
7 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dschach
dschach deleted the feat/site-markdown-tools branch November 12, 2026 04:09
@dschach dschach mentioned this pull request Nov 12, 2026
chore(main): release 2.2.2 #409
Merged
dschach added a commit that referenced this pull request Nov 12, 2026
@dschach
chore(main): release 2.2.2 (#409)
4612c91
🤖 I have created a release *beep* *boop*
---


## [2.2.2](v2.2.1...v2.2.2) (2026-11-12)


### Documentation

* **apexdoc:** Add since tags with release versions to all members ([#411](#411)) ([3a7b82c](3a7b82c))
* **site:** Add markdown copies, llms.txt, and a markdown toolbar to the site ([#407](#407)) ([628f77c](628f77c))
* **site:** Regenerate the documentation site ([#412](#412)) ([33bf6fd](33bf6fd))


### Build System

* **node:** Update Node.js from v24.22.2 to v24.22.3 ([#405](#405)) ([61ba0a2](61ba0a2))
* **prettier:** Update devDependency prettier from 3.9.10 to 3.10.0 ([#406](#406)) ([0c615b2](0c615b2))
* **site:** Add a local preview of the deployed site ([#410](#410)) ([111173f](111173f))
* **turndown:** Update devDependency turndown from 7.2.4 to 7.2.5 ([#408](#408)) ([ec79953](ec79953))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dschach
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.