Skip to content

Freshen generated docs, fix the regeneration tooling, and validate links on PRs - #665

Merged
dsagal merged 9 commits into
masterfrom
freshen-docs
Jul 15, 2026
Merged

Freshen generated docs, fix the regeneration tooling, and validate links on PRs#665
dsagal merged 9 commits into
masterfrom
freshen-docs

Conversation

@dsagal

@dsagal dsagal commented Jul 12, 2026

Copy link
Copy Markdown
Member

Documentation had drifted from Grist, esp. for plugin API, and the tooling for keeping docs current rotted in places. This PR freshens the content, repairs the tooling, fixes links, and adds some automatic link verifications going forward.

Freshened content:

  • Regenerate the plugin-api reference (picks up the cellFormat option, LinkingType, and some other changes), telemetry docs, audit-log events, and keyboard shortcuts.
  • Document the cellFormat query parameter and the errors record property in the REST API reference, linking to grist-core's grist-data-format.md.

Tooling repairs:

  • Regeneration scripts now preserve page frontmatter (translatable mkdocs nav titles) instead of dropping it.
  • build-shortcuts.js works again with current Grist code (fixed module resolution, platform-specific keys, localized descriptions).
  • New freshen.sh runs all regeneration scripts plus a full site build in one command.
  • Translated sites now back-fill pages covered by wildcard nav entries; the plugin-api pages previously 404'd on /fr/.

Validation

  • A new validate-docs job builds the English docs in strict mode on PRs, catching broken relative links, site-URL-style links (../../foo/, /foo/), broken anchors, and absolute links to our own site.
  • docs.py build-lang/build-all accept --strict option to run the same checks locally.
  • Cleanup: fixed the existing offending links, removed stale npm scripts, gitignored the generated api.md.

dsagal and others added 8 commits July 12, 2026 18:36
Regenerate the plugin-api reference (first regeneration since May 2025;
picks up cellFormat and other doc-comment changes), telemetry docs
(checkedUpdateAPI moves out of the limited level, matching grist-core),
audit-log events, and the keyboard shortcuts page. Restore the title
frontmatter that regeneration dropped; mkdocs uses it for nav labels.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Make build-telemetry.sh and build-plugin-api.sh preserve page frontmatter
(via a shared helper), and fix build-shortcuts.js, which had rotted:
resolve 'app/...' imports via NODE_PATH for both checkout layouts, handle
platform-specific command keys, and call the now-localized descriptions
with i18next initialized.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add the cellFormat query parameter to the /records and /data endpoints,
and describe the errors field of returned records (readOnly, since the
same schema describes PATCH /records request bodies). Link to
grist-core's grist-data-format.md for details.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rsed; add api.md to .gitignore, since it's now produced automatically during publishing
…e in one command

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The i18n hook back-fills untranslated pages from en by resolving nav
entries, but skipped awesome-pages wildcard entries, so the plugin-api
reference pages were missing from non-en sites: links to them warned
during the build, and returned 404s on the published site.

Also add the overlooked code/enums to the plugin-api nav wildcards.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A strict English docs build now runs on PRs, failing on link problems:
broken relative links, links in the site-URL form (../../foo/ or /foo/)
or to missing anchors (per the raised 'validation' levels), and absolute
links to our own site. The absolute-link check runs in a hook, so authors
also see the warnings locally in every build or serve. Both build-lang
and build-all accept --strict to run the same checks locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploy Preview for grist-help-preview ready!

Name Link
🔨 Latest commit d3f06e0
🔍 Latest deploy log https://app.netlify.com/projects/grist-help-preview/deploys/6a57eb2a94fb75000792ef1c
😎 Deploy Preview https://deploy-preview-665--grist-help-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@paulfitz paulfitz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dsagal ! All looks to work as expected and very good to freshen. One tiny trivial comment.

Comment thread .github/workflows/validate-docs.yml Outdated
validate-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkout@v4 / setup-python@v5 would be better for a new workflow

@dsagal
dsagal merged commit 37cec9a into master Jul 15, 2026
6 checks passed
@dsagal
dsagal deleted the freshen-docs branch July 15, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants