-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat HDS 2352 enable versioned documentation #1349
base: release-4.0.0
Are you sure you want to change the base?
Conversation
Test Results 1 files 30 suites 4m 37s ⏱️ Results for commit f3181eb. ♻️ This comment has been updated with latest results. |
ae9fb2e
to
60b149c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
60b149c
to
35c1192
Compare
Fixed Webpack chunking problems and problem of redirecting some internal links. Rebased onto 4.0.0 |
Preview found from hds-demo docs/preview_1349 Demos |
46a6c41
to
f3181eb
Compare
Description
Configured Gatsby to read documentation from different git branches in addition to local files. This makes it possible for a user to select which version of documentation is viewed. Header.ActionBarItem is used to choose versions in a dropdown menu.
Related Issue
Closes HDS-2352
Motivation and Context
When users update their HDS versions, they need to compare changes. Currently, previous versions are only available deep in GitHub, and therefore, they’re difficult to find.
Open issues
This PR is kind of a poc of multi-version documentation. To improve the UX, there is a separate design ticket HDS-2387.There is some problem with webpack configuration. WebPack splits prerendered content into so-called "chunks", but building fail with the default config. If there is not much content, splitting doesn't happen, and the building succeeds. So, I made a bigger chunk size to avoid splitting. This needs more investigation if we want more than three versions.All internal link hrefs are replaced with URLs with a version prefix, but for some reason, links in the content of sub-pages of/about
,/foundation
, and/patterns
always link to the latest version. This has to be fixed, but I haven't found a way yet.How Has This Been Tested?
Demos:
Screenshots (if appropriate):
Add to changelog