From 5118fdf697c5df0f3258a108410f58a1a9108cea Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 29 Jan 2024 12:53:31 +0100 Subject: [PATCH] Antora site example --- .readthedocs.yaml | 17 ++++++++--------- antora-playbook.yml | 14 ++++++++++++++ docs/conf.py | 13 ------------- docs/conf.rst | 6 ------ docs/contents.rst | 9 --------- docs/index.rst | 29 ----------------------------- 6 files changed, 22 insertions(+), 66 deletions(-) create mode 100644 antora-playbook.yml delete mode 100644 docs/conf.py delete mode 100644 docs/conf.rst delete mode 100644 docs/contents.rst delete mode 100644 docs/index.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e124d1d..581664e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,12 +4,11 @@ build: os: ubuntu-22.04 tools: python: "3" - apt_packages: - - tree - -sphinx: - configuration: docs/conf.py - -python: - install: - - requirements: requirements.txt + nodejs: "16" + commands: + # Commands from https://docs.antora.org/antora/latest/install-and-run-quickstart/ + - npm i -g -D -E @antora/cli@3.1 @antora/site-generator@3.1 + - antora -v + - antora --fetch antora-playbook.yml + - mkdir $READTHEDOCS_OUTPUT + - mv build/site $READTHEDOCS_OUTPUT/html diff --git a/antora-playbook.yml b/antora-playbook.yml new file mode 100644 index 0000000..1b92294 --- /dev/null +++ b/antora-playbook.yml @@ -0,0 +1,14 @@ +site: + title: Antora Docs + start_page: component-b::index.adoc +content: + sources: + - url: https://gitlab.com/antora/demo/demo-component-a.git + branches: HEAD + - url: https://gitlab.com/antora/demo/demo-component-b.git + branches: [v2.0, v1.0] + start_path: docs +ui: + bundle: + url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/HEAD/raw/build/ui-bundle.zip?job=bundle-stable + snapshot: true diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 6de5f9d..0000000 --- a/docs/conf.py +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- - -# Default settings -project = 'Test Builds' -extensions = [ - 'sphinx_autorun', -] - -latex_engine = 'xelatex' # allow us to build Unicode chars - - -# Include all your settings here -html_theme = 'sphinx_rtd_theme' diff --git a/docs/conf.rst b/docs/conf.rst deleted file mode 100644 index afb3d67..0000000 --- a/docs/conf.rst +++ /dev/null @@ -1,6 +0,0 @@ -conf.py -======= - -.. literalinclude:: conf.py - :language: python - :linenos: diff --git a/docs/contents.rst b/docs/contents.rst deleted file mode 100644 index 2bd68b9..0000000 --- a/docs/contents.rst +++ /dev/null @@ -1,9 +0,0 @@ -Contents -======== - -All contents of this documentation. - -.. toctree:: - :glob: - - * diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index d14d6c1..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,29 +0,0 @@ -test-builds -=========== - -GitHub repository to test different Read the Docs builds scenarios. - ----- - -Read the Docs configuration file used to build this docs: - -.. literalinclude:: ../.readthedocs.yaml - :language: yaml - :linenos: - ----- - -Sphinx configuration file used to build this docs (:doc:`see full file `), - -.. literalinclude:: conf.py - :language: python - :end-before: ########################################################################### - :linenos: - ----- - -.. runblock:: pycon - - >>> # Build at - >>> import datetime - >>> datetime.datetime.utcnow() # UTC