-
Notifications
You must be signed in to change notification settings - Fork 2
Documentation page and GitHub action #8
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,105 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: publish-docs-gp-pages | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # TODO: Can we trigger action manually? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - 4.x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+4
to
+7
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # TODO: Can we trigger action manually? | |
| # push: | |
| # branches: | |
| # - 4.x |
Copilot
AI
Dec 17, 2025
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.
This sed command is complex and fragile with nested quotes and escape sequences. Consider using a more maintainable approach such as jq for JSON manipulation or a Python script to modify versions.json, which would be more readable and less error-prone.
| # remove latest tag | |
| sed -i 's/\"latest\"//g' versions.json | |
| # remove already present line if exists | |
| sed -i '/'"$release_version"'/d' versions.json | |
| # insert new version at the beginning | |
| sed -i '2s/^/ { "version": "'"$release_version"'", "title": "'"$release_version"'", "aliases": ["latest"] },\'$'\n/g' versions.json | |
| # update versions.json: remove any existing "latest" aliases and existing entry for this | |
| # release_version, then insert the new version as the first entry with aliases ["latest"]. | |
| python - << PY | |
| import json | |
| from pathlib import Path | |
| versions_path = Path("versions.json") | |
| data = json.loads(versions_path.read_text()) | |
| release_version = "${release_version}" | |
| # Remove "latest" from aliases in all existing entries | |
| for entry in data: | |
| aliases = entry.get("aliases") | |
| if isinstance(aliases, list): | |
| entry["aliases"] = [alias for alias in aliases if alias != "latest"] | |
| # Remove any existing entry for this release_version | |
| data = [entry for entry in data if entry.get("version") != release_version] | |
| # Insert new version at the beginning | |
| data.insert(0, { | |
| "version": release_version, | |
| "title": release_version, | |
| "aliases": ["latest"], | |
| }) | |
| versions_path.write_text(json.dumps(data, indent=2) + "\n") | |
| PY |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,14 +9,12 @@ site_dir: docs | |
|
|
||
| theme: | ||
| name: material | ||
| palette: | ||
| - scheme: default | ||
| primary: blue | ||
| accent: blue | ||
| logo: faq/logo.png | ||
| favicon: faq/favicon.ico | ||
| features: | ||
| - navigation.tabs | ||
| - navigation.sections | ||
| - navigation.top | ||
| - navigation.path | ||
| - search.highlight | ||
| - search.share | ||
|
|
||
|
|
@@ -26,6 +24,7 @@ markdown_extensions: | |
| - pymdownx.superfences | ||
| - pymdownx.tabbed | ||
| - toc: | ||
| toc_depth: 1 | ||
| permalink: true | ||
|
|
||
| nav: | ||
|
|
@@ -39,8 +38,8 @@ nav: | |
| - Overview: manual/core/README.md | ||
| - Integration: manual/core/integration/README.md | ||
| - Configuration: | ||
| - Overview: manual/core/configuration/README.md | ||
| - Reference: manual/core/configuration/reference/README.md | ||
| - Overview: manual/core/configuration/README.md | ||
| - Reference: manual/core/configuration/reference/README.md | ||
| - Authentication: manual/core/authentication/README.md | ||
| - SSL: manual/core/ssl/README.md | ||
| - Load Balancing: manual/core/load_balancing/README.md | ||
|
|
@@ -162,3 +161,10 @@ plugins: | |
| - search | ||
| - awesome-pages | ||
| - macros | ||
| - mike: | ||
| alias_type: copy | ||
|
|
||
| extra: | ||
| generator: false | ||
| version: | ||
| provider: mike | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! |
||
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.
The workflow name 'publish-docs-gp-pages' uses inconsistent naming conventions. It should either use spaces like 'Publish docs to gh-pages' for display purposes, or maintain the hyphenated format but spell out 'gh-pages' instead of 'gp-pages'.