Repository navigation
Site Scripts
The docs pages on the website are a Webflow template plus a few scripts kept in
docs2/webflow/. Change the file in GitHub, bump its version, and register the new version in Webflow.
| File | Registered as | Runs on | Does |
|---|---|---|---|
docs-layer.js |
bfa_docs_layer |
Doc Pages template, footer | Sidebar carets and Overview rows, breadcrumbs, section overview pages, the Docs home, status chips |
workspace-map.js |
bfa_workspace_map |
Doc Pages template, footer | Workspace hover maps and the Workspaces explorer |
keymap-explorer.js |
bfa_keymap_explorer |
Doc Pages template, footer | The interactive keymap (Keymap) |
quicksearch.js |
bfa_quicksearch |
Whole site, footer | The instant search popup (Ctrl K) |
docs-loading.js |
bfa_docs_loading (inline) |
Doc Pages template, header | Hides the sidebar until it is ready (no flicker), with a spinner in the middle of the page |
template-footer.html |
(pasted) | Doc Pages template, page footer code | The base docs script bfa-docs-v6 and its CSS |
Each .js file starts with @version x.y.z on its first line.
sequenceDiagram
actor M as π§° Maintainer
participant G as π GitHub
participant A as π€ Actions
participant P as π¦ GitHub Pages
participant W as π Webflow
M->>G: Edit docs2/webflow/x.js, bump @version (1.0.3 β 1.0.4)
M->>G: Pull request β merge into master
G->>A: Workflow runs
A->>P: Publishes webflow/x-1.0.4.js (the old versions stay)
A-->>M: Job summary: URL + sha384 hash for each script
M->>W: Register version 1.0.4 (URL + hash), apply it to the template
M->>W: Publish staging, check, then live
-
Edit the file and bump the version on its first line. Never reuse a version: each published file is fixed, because Webflow checks it against its hash.
-
Pull request β merge. The workflow publishes
https://bforartists.github.io/Manual/webflow/<name>-<version>.jsand prints its sha384 hash in the job summary (Actions β the run β Summary). -
Register and apply in Webflow (needs the Webflow API token, or Claude with the Webflow connector):
# register the hosted file curl -X POST "https://api.webflow.com/v2/sites/650c5901cff33429a5e537f5/registered_scripts/hosted" \ -H "Authorization: Bearer $WEBFLOW_TOKEN" -H "Content-Type: application/json" \ -d '{"hostedLocation":"https://bforartists.github.io/Manual/webflow/docs-layer-1.0.4.js", "integrityHash":"sha384-β¦from the job summaryβ¦","version":"1.0.4","displayName":"bfa docs layer"}' # see what the template uses, then send the full list back with the new version curl "https://api.webflow.com/v2/pages/6aca79b3c07a0416be267356/custom_code" -H "Authorization: Bearer $WEBFLOW_TOKEN"
PUT β¦/pages/<page>/custom_codereplaces the whole list, so always send every script the page already had.Keep the order:
bfa_workspace_mapbeforebfa_docs_layer. Adding or updating one script moves it to the end of the list, so check the order after each release (the docs layer copes with either order since 1.0.9, but the right order avoids a flash). -
Publish staging (Webflow β Publish β webflow.io only), check a few pages, then publish live with the next release.
Every old version is still on GitHub Pages and still registered. Point the template back at the previous version (step 3, the PUT with the old version number) and publish.
Open a staging page, open the browser console and paste the new file's contents: it runs once, on that page only. Each script guards against running twice, so reload the page first.
π Bforartists Manual wiki Β· GPL v3 Β· Repository Β· Website Β· Report a docs problem Β· These pages are kept in docs2/dev-docs/ and copied here, so edit them there.
π Home
βοΈ Writing
- π Writer quick start
- βοΈ Editing the docs online
- βοΈ Plain writing
- πΌοΈ Images and screenshots
- π Formatting standard
- β»οΈ Shared sections
- π Reference Manual writing guide
βοΈ How it works
- πΊοΈ How Docs 2.0 works
- πΏ Branches and review
- π Converting chapters
- β Checks and previews
- π Website sync
π§° Maintaining
- π§° Maintainer guide
- π§ Structure and navigation
- πΊοΈ Workspace maps
- β¨οΈ Keymap
- ποΈ Site scripts
- π Release update
- π©Ί Troubleshooting
π Status