This commit is contained in:
parent
430766a198
commit
41539354c1
47
mkdocs.yml
47
mkdocs.yml
@ -226,6 +226,53 @@ nav:
|
||||
- WireGuard: portainer-stacks/WireGuard.md
|
||||
- Zigbee2MQTT: portainer-stacks/Zigbee2MQTT.md
|
||||
- Airsonic: portainer-stacks/Airsonic.md
|
||||
- authelia: portainer-stacks/authelia.md
|
||||
- Authentik: portainer-stacks/Authentik.md
|
||||
- bazarr: portainer-stacks/bazarr.md
|
||||
- Bitwarden: portainer-stacks/Bitwarden.md
|
||||
- CrowdSec: portainer-stacks/CrowdSec.md
|
||||
- cryptpad: portainer-stacks/cryptpad.md
|
||||
- dashy: portainer-stacks/dashy.md
|
||||
- digiKam: portainer-stacks/digiKam.md
|
||||
- Dillinger: portainer-stacks/Dillinger.md
|
||||
- Drone: portainer-stacks/Drone.md
|
||||
- ethercalc: portainer-stacks/ethercalc.md
|
||||
- Gitea: portainer-stacks/Gitea.md
|
||||
- guacamole: portainer-stacks/guacamole.md
|
||||
- heimdall: portainer-stacks/heimdall.md
|
||||
- invidious: portainer-stacks/invidious.md
|
||||
- jellyfin: portainer-stacks/jellyfin.md
|
||||
- LibrePhotos: portainer-stacks/LibrePhotos.md
|
||||
- Librespeed: portainer-stacks/Librespeed.md
|
||||
- mealie: portainer-stacks/mealie.md
|
||||
- mqtt-explorer: portainer-stacks/mqtt-explorer.md
|
||||
- MQTT-Mosquitto: portainer-stacks/MQTT-Mosquitto.md
|
||||
- n8n: portainer-stacks/n8n.md
|
||||
- Nextcloud: portainer-stacks/Nextcloud.md
|
||||
- octoprint: portainer-stacks/octoprint.md
|
||||
- Ombi: portainer-stacks/Ombi.md
|
||||
- onlyoffice: portainer-stacks/onlyoffice.md
|
||||
- Overseerr: portainer-stacks/Overseerr.md
|
||||
- phoneinfoga: portainer-stacks/phoneinfoga.md
|
||||
- PhotoView: portainer-stacks/PhotoView.md
|
||||
- piped: portainer-stacks/piped.md
|
||||
- Prowlarr: portainer-stacks/Prowlarr.md
|
||||
- qbittorrent: portainer-stacks/qbittorrent.md
|
||||
- rustdesk: portainer-stacks/rustdesk.md
|
||||
- samba: portainer-stacks/samba.md
|
||||
- shlink: portainer-stacks/shlink.md
|
||||
- Swag: portainer-stacks/Swag.md
|
||||
- tailscale: portainer-stacks/tailscale.md
|
||||
- TasmoBackup: portainer-stacks/TasmoBackup.md
|
||||
- Tasmota-Device-Manager: portainer-stacks/Tasmota-Device-Manager.md
|
||||
- Transmission: portainer-stacks/Transmission.md
|
||||
- tvheadend: portainer-stacks/tvheadend.md
|
||||
- uptime-kuma: portainer-stacks/uptime-kuma.md
|
||||
- VSCode: portainer-stacks/VSCode.md
|
||||
- Whisparr: portainer-stacks/Whisparr.md
|
||||
- WireGuard: portainer-stacks/WireGuard.md
|
||||
- Zigbee2MQTT: portainer-stacks/Zigbee2MQTT.md
|
||||
- Airsonic: portainer-stacks/Airsonic.md
|
||||
- Zigbee2MQTT: portainer-stacks/Zigbee2MQTT.md
|
||||
- Swag:
|
||||
- Swag: portainer-stacks/Swag.md
|
||||
|
@ -11,6 +11,11 @@ relative_path_prefix = "portainer-stacks/"
|
||||
with open("mkdocs.yml", "r") as f:
|
||||
mkdocs_content = f.read()
|
||||
|
||||
# Parse command-line arguments
|
||||
parser = argparse.ArgumentParser(description="Generate navigation entries for mkdocs.yml")
|
||||
parser.add_argument("--replace", action="store_true", help="Replace mkdocs.yml with new content")
|
||||
args = parser.parse_args()
|
||||
|
||||
# Generate navigation entries
|
||||
nav_entries = []
|
||||
for filename in os.listdir(markdown_dir):
|
||||
@ -28,17 +33,15 @@ filtered_nav_entries = [entry for entry in nav_entries if not any(name in entry
|
||||
# Sort the navigation entries alphabetically (case-insensitive)
|
||||
sorted_nav_entries = sorted(filtered_nav_entries, key=lambda entry: entry.lower())
|
||||
|
||||
# Combine all the sorted navigation entries into a single string
|
||||
new_section_content = "\n".join(sorted_nav_entries)
|
||||
|
||||
# Parse command-line arguments
|
||||
parser = argparse.ArgumentParser(description="Generate navigation entries for mkdocs.yml")
|
||||
parser.add_argument("--replace", action="store_true", help="Replace mkdocs.yml with new content")
|
||||
args = parser.parse_args()
|
||||
|
||||
# If --replace option is provided, replace the existing "Portainer Stacks" section
|
||||
if args.replace:
|
||||
# Combine all the sorted navigation entries into a single string
|
||||
new_section_content = "\n".join(sorted_nav_entries)
|
||||
|
||||
# Replace the existing "Portainer Stacks" section
|
||||
updated_mkdocs_content = mkdocs_content.replace(" - Portainer Stacks:\n", f" - Portainer Stacks:\n{new_section_content}\n")
|
||||
|
||||
# Write the updated content back to mkdocs.yml
|
||||
with open("mkdocs.yml", "w") as f:
|
||||
f.write(updated_mkdocs_content)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user