Loading Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y git RUN pip install -r requirements.txt RUN python scripts/translate_docs.py RUN sed -i '/enabled: false/d' mkdocs.yml && BUILD_ONLY_LOCALE="" mkdocs build --site-dir /tmp/public RUN sed -i '/enabled: false/d' -i '/build_only_locale: en/d' mkdocs.yml && mkdocs build --site-dir /tmp/public FROM nginx:1.29.4-alpine Loading mkdocs.yml +11 −12 Original line number Diff line number Diff line Loading @@ -389,20 +389,19 @@ plugins: - privacy: assets: false - i18n: build_only_locale: en docs_structure: folder # Default to English-only locally; override/unset BUILD_ONLY_LOCALE in Docker/CI to build all languages build_only_locale: !ENV [BUILD_ONLY_LOCALE, en] languages: - locale: en - build: true default: true locale: en name: English build: true - locale: fr name: Français build: true - locale: de - build: true locale: fr name: "Fran\xE7ais" - build: true locale: de name: Deutsch build: true - git-revision-date-localized: enable_creation_date: true enabled: false Loading scripts/generate_device_pages.py +4 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ class DocGenerator: devices_entry = {"Devices": []} navigation.insert(os_index + 1, devices_entry) devices_entry["Devices"] = ["eos/devices/index.md"] devices_entry["Devices"] = ["en/eos/devices/index.md"] for brand, devices in nav.items(): devices_entry["Devices"].append( {brand: [{k: v} for k, v in devices.items()]} Loading @@ -81,7 +81,7 @@ class DocGenerator: @app.command() def device_list(ctx: typer.Context): devices_path = ctx.obj.root_path / "docs" / "eos" / "devices" devices_path = ctx.obj.root_path / "docs" / "en" / "eos" / "devices" env = Environment( loader=FileSystemLoader(Path(__file__).parent.resolve() / "templates") ) Loading @@ -92,7 +92,7 @@ def device_list(ctx: typer.Context): @app.command() def devices(ctx: typer.Context): devices_path = ctx.obj.root_path / "docs" / "eos" / "devices" devices_path = ctx.obj.root_path / "docs" / "en" / "eos" / "devices" nav = {} for device in ctx.obj.devices: brand = device["vendor"] Loading @@ -108,7 +108,7 @@ def devices(ctx: typer.Context): # create nav entry nav.setdefault(brand, {}) nav[brand][device["name"]] = f"eos/devices/{brand}/{device['codename']}.md" nav[brand][device["name"]] = f"en/eos/devices/{brand}/{device['codename']}.md" ctx.obj.update_nav(nav) Loading Loading
Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y git RUN pip install -r requirements.txt RUN python scripts/translate_docs.py RUN sed -i '/enabled: false/d' mkdocs.yml && BUILD_ONLY_LOCALE="" mkdocs build --site-dir /tmp/public RUN sed -i '/enabled: false/d' -i '/build_only_locale: en/d' mkdocs.yml && mkdocs build --site-dir /tmp/public FROM nginx:1.29.4-alpine Loading
mkdocs.yml +11 −12 Original line number Diff line number Diff line Loading @@ -389,20 +389,19 @@ plugins: - privacy: assets: false - i18n: build_only_locale: en docs_structure: folder # Default to English-only locally; override/unset BUILD_ONLY_LOCALE in Docker/CI to build all languages build_only_locale: !ENV [BUILD_ONLY_LOCALE, en] languages: - locale: en - build: true default: true locale: en name: English build: true - locale: fr name: Français build: true - locale: de - build: true locale: fr name: "Fran\xE7ais" - build: true locale: de name: Deutsch build: true - git-revision-date-localized: enable_creation_date: true enabled: false Loading
scripts/generate_device_pages.py +4 −4 Original line number Diff line number Diff line Loading @@ -69,7 +69,7 @@ class DocGenerator: devices_entry = {"Devices": []} navigation.insert(os_index + 1, devices_entry) devices_entry["Devices"] = ["eos/devices/index.md"] devices_entry["Devices"] = ["en/eos/devices/index.md"] for brand, devices in nav.items(): devices_entry["Devices"].append( {brand: [{k: v} for k, v in devices.items()]} Loading @@ -81,7 +81,7 @@ class DocGenerator: @app.command() def device_list(ctx: typer.Context): devices_path = ctx.obj.root_path / "docs" / "eos" / "devices" devices_path = ctx.obj.root_path / "docs" / "en" / "eos" / "devices" env = Environment( loader=FileSystemLoader(Path(__file__).parent.resolve() / "templates") ) Loading @@ -92,7 +92,7 @@ def device_list(ctx: typer.Context): @app.command() def devices(ctx: typer.Context): devices_path = ctx.obj.root_path / "docs" / "eos" / "devices" devices_path = ctx.obj.root_path / "docs" / "en" / "eos" / "devices" nav = {} for device in ctx.obj.devices: brand = device["vendor"] Loading @@ -108,7 +108,7 @@ def devices(ctx: typer.Context): # create nav entry nav.setdefault(brand, {}) nav[brand][device["name"]] = f"eos/devices/{brand}/{device['codename']}.md" nav[brand][device["name"]] = f"en/eos/devices/{brand}/{device['codename']}.md" ctx.obj.update_nav(nav) Loading