diff --git a/.gitignore b/.gitignore index dd543c7a..0c800321 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *.iml /gh-md-toc personal-build-and-develop.* +site/ diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1d842719..0977250b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,14 +1,22 @@ -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details -version: 2 - -build: - os: ubuntu-22.04 - tools: - python: "3.11" - -mkdocs: - configuration: mkdocs.yml - -python: - install: - - requirements: docs/requirements.txt \ No newline at end of file +version: 2 + +python: + install: + - requirements: docs/requirements.txt + +build: + os: ubuntu-24.04 + tools: + python: latest + jobs: + # We recommend using a requirements file for reproducible builds. + # This is just a quick example to get started. + # https://docs.readthedocs.io/page/guides/reproducible-builds.html + install: + - pip install zensical + build: + html: + - zensical build + post_build: + - mkdir -p $READTHEDOCS_OUTPUT/html/ + - cp --recursive site/* $READTHEDOCS_OUTPUT/html/ diff --git a/compose-docs.yml b/compose-docs.yml new file mode 100644 index 00000000..c0f99d89 --- /dev/null +++ b/compose-docs.yml @@ -0,0 +1,16 @@ +# This composition can be used to serve up the rendered mkdocs for local authoring. +# +# docker compose -f compose-docs.yml -p zensical up +# +# and then access http://localhost:8000 + +services: + zensical: + build: + context: . + dockerfile: docs/Dockerfile + volumes: + - ./zensical.toml:/docs/zensical.toml + - ./docs:/docs/docs + ports: + - "8000:8000" diff --git a/docker-compose-mkdocs.yml b/docker-compose-mkdocs.yml deleted file mode 100644 index f32549bf..00000000 --- a/docker-compose-mkdocs.yml +++ /dev/null @@ -1,19 +0,0 @@ -# This composition can be used to serve up the rendered mkdocs for local authoring. -# -# docker compose -f docker-compose-mkdocs.yml -p mkdocs up -# -# and then access http://localhost:8000 - -services: - mkdocs: - build: - context: . - dockerfile: docs/Dockerfile - volumes: - - ./mkdocs.yml:/mkdocs/mkdocs.yml - - ./docs:/mkdocs/docs - command: - - serve - - --dev-addr=0.0.0.0:8000 - ports: - - "8000:8000" \ No newline at end of file diff --git a/docs/Dockerfile b/docs/Dockerfile index 20efbb7d..08368740 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,10 +1,4 @@ -FROM python:3.11 - -RUN pip install --upgrade pip - -WORKDIR /mkdocs +FROM zensical/zensical RUN --mount=target=/build/requirements.txt,source=docs/requirements.txt \ pip install -r /build/requirements.txt - -ENTRYPOINT ["mkdocs"] \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 0d30bd60..c824c534 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,10 +1,25 @@ -mkdocs-material == 9.7.1 -mkdocs-autorefs == 1.4.3 -mkdocstrings[python] == 0.30.1 -mkdocs-literate-nav == 0.6.2 -mdx-gh-links == 0.4 -# need to pin for auto reload to work -# see https://github.com/mkdocs/mkdocs/issues/4032 click==8.3.1 -mkdocs-click == 0.9.0 -mkdocs-static-i18n == 1.3.0 \ No newline at end of file +colorama==0.4.6 +deepmerge==2.0 +ghp-import==2.1.0 +griffe==1.15.0 +Jinja2==3.1.6 +Markdown==3.10 +MarkupSafe==3.0.3 +mergedeep==1.3.4 +mkdocs==1.6.1 +mkdocs-autorefs==1.4.3 +mkdocs-get-deps==0.2.0 +mkdocstrings==1.0.0 +mkdocstrings-python==2.0.1 +packaging==25.0 +pathspec==0.12.1 +platformdirs==4.5.1 +Pygments==2.19.2 +pymdown-extensions==10.19.1 +python-dateutil==2.9.0.post0 +PyYAML==6.0.3 +pyyaml_env_tag==1.1 +six==1.17.0 +watchdog==6.0.0 +# zensical @ file:/// diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index 9703960d..00000000 --- a/mkdocs.yml +++ /dev/null @@ -1,95 +0,0 @@ ---- -site_name: Minecraft Server on Docker (Java Edition) -site_url: https://docker-minecraft-server.readthedocs.io/en/latest/ -site_description: Documentation for Minecraft Server on Docker -repo_url: https://github.com/itzg/docker-minecraft-server -edit_uri: blob/master/docs/ -theme: - name: material - features: - - navigation.tracking - - navigation.tabs - - navigation.tabs.sticky - - navigation.sections - - navigation.expand - - navigation.top - - navigation.indexes - locale: en - palette: - # Palette toggle for automatic mode - - media: "(prefers-color-scheme)" - toggle: - icon: material/brightness-auto - name: Switch to light mode - - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - toggle: - icon: material/brightness-4 - name: Switch to system preference - - highlightjs: true - hljs_languages: - - yaml - - bash - - java - - docker - - shell - - json - -extra_css: - - css/extra.css -markdown_extensions: - - admonition - - toc: - permalink: true - - attr_list - - def_list - - footnotes - - tables - - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg - - pymdownx.highlight: - anchor_linenums: true - line_spans: __span - pygments_lang_class: true - - pymdownx.inlinehilite - - pymdownx.details - - pymdownx.snippets - - pymdownx.superfences - - mdx_gh_links: - user: camalot - repo: mkdocs-test - - mkdocs-click -copyright: Copyright © itzg 2025. -plugins: - - search - - autorefs - - mkdocstrings: - handlers: - python: - options: - docstring_section_style: list - members_order: source - show_root_heading: true - show_source: false - show_signature_annotations: true - # https://github.com/ultrabug/mkdocs-static-i18n - - i18n: - languages: - - locale: en - name: English - build: true - default: true - - literate-nav: - nav_file: README.md - implicit_index: true diff --git a/zensical.toml b/zensical.toml new file mode 100644 index 00000000..9b1192eb --- /dev/null +++ b/zensical.toml @@ -0,0 +1,42 @@ +[project] +site_name = "Minecraft Server on Docker (Java Edition)" +site_url = "https://docker-minecraft-server.readthedocs.io/en/latest/" +site_description = "Documentation for Minecraft Server on Docker" +repo_name = "itzg/docker-minecraft-server" +repo_url = "https://github.com/itzg/docker-minecraft-server" +site_author = "itzg" +copyright = "Copyright © itzg 2025." +docs_dir = "docs" +site_dir = "site" + +[project.theme] +features = [ + "navigation.tracking", + "navigation.tabs", + "navigation.tabs.sticky", + "navigation.sections", + "navigation.expand", + "navigation.top", + "navigation.indexes" +] +language = "en" + +[project.theme.icon] +repo = "fontawesome/brands/github" + +[[project.theme.palette]] +media = "(prefers-color-scheme)" +toggle.icon = "lucide/sun-moon" +toggle.name = "Switch to light mode" + +[[project.theme.palette]] +media = "(prefers-color-scheme: light)" +scheme = "default" +toggle.icon = "lucide/sun" +toggle.name = "Switch to dark mode" + +[[project.theme.palette]] +media = "(prefers-color-scheme: dark)" +scheme = "slate" +toggle.icon = "lucide/moon" +toggle.name = "Switch to light mode"