docs(preview): Further enhancements #2609

Merged
Jade merged 3 commits from julian45/continuwuity:julian/docs/preview-enhancements into main 2026-11-28 16:30:05 +00:00
Member

This pull request applies a few further enhancements to preview docs:

  • After the previous docs PR, the logo embed on the intro page was broken since it used a hardcoded path; now, Rspress will use the normalizeImagePath() function (upstream docs) to always use the correct path regardless of deploy environment.
  • Preview deployments now show a banner at the top noting which Continuwuity PR they're for; the text is clickable and links to the PR in question.
  • Once per PR upon first successful docs build, the documentation workflow will post a comment to the PR linking to the corresponding preview docs deployment. It may be worthwhile to only do this step (let alone the deployment) if certain paths affecting docs are changed, but checking for that can be a bit thorny to accomplish; it might or might not be worthwhile.

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
This pull request applies a few further enhancements to preview docs: - After the previous docs PR, the logo embed on the intro page was broken since it used a hardcoded path; now, Rspress will use the `normalizeImagePath()` function ([upstream docs](https://rspress.rs/guide/basic/static-assets#public-folder:~:text=When%20your%20site%20is%20configured%20with%20a%20base%20path)) to always use the correct path regardless of deploy environment. - Preview deployments now show a banner at the top noting which Continuwuity PR they're for; the text is clickable and links to the PR in question. - Once per PR upon first successful docs build, the documentation workflow will post a comment to the PR linking to the corresponding preview docs deployment. It may be worthwhile to only do this step (let alone the deployment) if certain paths affecting docs are changed, but checking for that can be a bit thorny to accomplish; it might or might not be worthwhile. **Pull request checklist:** - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [x] My contribution follows the [code style][c2], if applicable. - [x] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [x] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages
ci(docs/preview): Post comment to PR for preview deployments
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Failing after 0s
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Checks / Prek / Check changed files (pull_request) Successful in 9s
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m8s
3a329fe1ab
The if condition is designed to make a new comment only once per PR. It
could probably use some further selectivity to only do this for specific
changed files, but we can cross that bridge when we get to it.
theme/index.tsx Outdated
@ -8,0 +15,4 @@
sitePath != "/" ? (
<Banner
href={`https://forgejo.ellis.link/continuwuation/continuwuity/pulls/${prNumber}`}
message={`Preview documentation for PR #${prNumber}`}
Contributor

I prefer "Documentation preview for PR"

since this isn't a button to preview the docs, the use of "preview" as a verb here feels wrong

I prefer "Documentation preview for PR" since this isn't a button to preview the docs, the use of "preview" as a verb here feels wrong
julian45 marked this conversation as resolved
First-time contributor
   70:             - if: github.ref != 'refs/heads/main' && forgejo.event.name == pull_request

needs to be

   70:             - if: github.ref != 'refs/heads/main' && forgejo.event.name == 'pull_request'
``` 70: - if: github.ref != 'refs/heads/main' && forgejo.event.name == pull_request ``` needs to be ``` 70: - if: github.ref != 'refs/heads/main' && forgejo.event.name == 'pull_request' ```
julian45 force-pushed julian/docs/preview-enhancements from 3a329fe1ab
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Failing after 0s
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Checks / Prek / Check changed files (pull_request) Successful in 9s
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m8s
to 6db73eeab1
All checks were successful
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been skipped
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 8s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m39s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 3m12s
2026-11-26 01:09:37 +00:00
Compare
Jade merged commit 8ad4374274 into main 2026-11-28 16:30:05 +00:00
Jade deleted branch julian/docs/preview-enhancements 2026-11-28 16:30:05 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity!2609
No description provided.