Repository navigation
🐞 Allow archived file links without blocking builds - #78
Merged
Merged
Conversation
Apply an early Remark transform only to historical versioned_docs files, converting static asset URLs to Docusaurus pathname:// links before Webpack can require missing files. Keep current docs on their normal link validation settings and preserve all archive source files byte-for-byte. Register the transformer in Docusaurus and add Node regression tests for archives, current documents, Windows paths, and ignored external/document links. Co-authored-by: ChatGPT 6 <noreply@openai.com>
✅ Deploy Preview for org-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Revert the unnecessary package.json test-script addition. Run the regression tests directly with node --test scripts/remark-archived-assets.test.cjs instead, avoiding an unrelated protected-file review requirement while preserving the scoped historical-link fix. Co-authored-by: ChatGPT 6 <noreply@openai.com>
Member
Author
|
Unfortunately, the site is just not going to deploy with broken links in the previous versions, which is my intended behavior. I think it's okay to have old file URL schemes invalidated, especially in this early stage where we're figuring out the whole structure of organizing the organization. I want to rework the spreadsheets anyway in #73, so we are going to have historical links that eventually 404 after everything's migrated so that it can improve over time. Netlify production build failure — November 11, 2026 (8:39 AM) |
Run both version archive and historical asset link regression tests in a read-only GitHub Actions workflow on pull requests and pushes to main, without altering protected configuration or archive sources. Co-authored-by: ChatGPT 6 <noreply@openai.com>
Relocate the CI-only archived-asset test from scripts/ to .github/scripts/, update its production-transformer import path, and point the documentation workflow at the new location. Keep the actual Docusaurus transformer in scripts/ and do not modify archived document sources. Co-authored-by: ChatGPT 6 <noreply@openai.com>
Customize the Docusaurus not-found page to display the missing URL, link directly to GitHub commit history filtered to the corresponding static asset or documentation source path, and explain that file paths in archived documentation may no longer be supported. Keep a repository-history fallback for unknown paths and avoid SSR hydration differences with client-only URL detection. Add regression coverage for static and versioned URL mappings, fallback handling, and unsafe paths in .github/scripts. Do not alter any archived document sources. Co-authored-by: ChatGPT 6 <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
beforeDefaultRemarkPluginstransformer that applies only to files compiled fromversioned_docs/version-*/./files/taxes/2024.pdf) to Docusauruspathname://URLs before Webpack turns them into required imports. A removed historical file may return 404 without breaking the site build.onBrokenLinks: 'throw'unchanged.versions/archive sources or their sidebars.Context
static/files/tostatic/ref/. Archived versions intentionally retain their historical links, but the Docusaurus bundler attempted to import missing files and failed the Netlify build.mainrather than a deleted stacking branch.mainseparately, so this PR does not repeat those changes.Verification
node --test scripts/remark-archived-assets.test.cjs: 3 tests pass in local Node.docusaurus.config.ts,package.json, and the two new transformer/test files change.versions/remain byte-for-byte identical.References
pathname://for static references without Webpack processing: https://docusaurus.io/docs/advanced/routingbeforeDefaultRemarkPluginsto transform links before its own bundling passes: https://docusaurus.io/docs/markdown-features/plugins