Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit c5db8310 authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

fix(generate): update target path for device files

parent 651cf037
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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

+11 −12
Original line number Diff line number Diff line
@@ -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
+4 −4
Original line number Diff line number Diff line
@@ -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()]}
@@ -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")
    )
@@ -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"]
@@ -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)