-
Notifications
You must be signed in to change notification settings - Fork 10
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
docs: Add version switcher #265
docs: Add version switcher #265
Conversation
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. Thanks for the PR 👍
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.
there is a docs-cleanup.yml workflow which handles removal of previews
I think you should update the JSON in there too
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- name: Remove version
run: |
if [[ ${{ github.event_name }} == "pull_request" ]]; then
VERSION="pr-${{ github.event.pull_request.number }}"
else
VERSION="${{ github.ref_name }}"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
# Delete the folder and remove the version from the versions file
rm -rf "${VERSION}"
sed -i "/^$VERSION$/d" versions
1bd5947
to
6a211be
Compare
true & done. thank you |
This PR will maintain a |
6a211be
to
9bf5407
Compare
Use current theme(pydata_sphinx_theme) version switcher dropdown to display a version selector. Because the switcher requires a json, the versions file is parsed into versions.json. Also a css update of the version switcher is required to proper display(vertical scrollbar) the list of versions. Signed-off-by: Nicolae Dicu <Nicolae.Dicu.ext@qorix.ai>
9bf5407
to
0fec7e5
Compare
You are right, versions is published only for information and we have now versions.json which can be easily viewed in browser. I removed versions handling. All new PR will be stored in versions.json. |
Improvement
Description
Use current theme(pydata_sphinx_theme) version switcher dropdown to display a version selector. Because the switcher requires a json, the versions file is parsed into versions.json.
Also a css update of the version switcher is required to proper display(vertical scrollbar) the list of versions.
Because of a current bug #194 this PR will not show the docs preview. However I created another PR for preview only: https://nicu1989.github.io/score/pr-7/
Here is also a picture of the dropdown:
Also there is a way to view the versions file in browser using the json file: https://eclipse-score.github.io/score/versions.json
Related ticket
closes [#250 ] (improvement ticket)