Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ghpages: setup
--output-dir doc/build/api

docs_suse: setup
poetry run make -C doc xml
poetry run make -C doc xml_suse
rm -rf doc/build/restxml
mv doc/build/xml doc/build/restxml
poetry run pip install \
Expand Down
8 changes: 8 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ xml:
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."


.PHONY: xml_suse
xml_suse:
$(SPHINXBUILD) -b xml -t suse $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."


.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
Expand Down
20 changes: 20 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from os.path import abspath, dirname, join, normpath
import shlex

from sphinx.transforms import SphinxTransform


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand Down Expand Up @@ -57,8 +60,25 @@ def prologReplace(app, docname, source):
result = result.replace(key, app.config.prolog_replacements[key])
source[0] = result

class AddRootRole(SphinxTransform):
# Runs after the document is parsed and the source path is set
default_priority = 500

def apply(self):
master_doc = self.config.master_doc

# Get the current document name relative to the source directory
# e.g., 'index', 'folder/subpage', etc.
docname = self.env.docname

# Only apply the attribute if this is the main entry point
if docname == master_doc:
self.document['role'] = 'main'


def setup(app):
app.add_config_value('prolog_replacements', {}, True)
app.add_transform(AddRootRole)
app.connect('source-read', prologReplace)
app.connect("autodoc-process-docstring", remove_module_docstring)

Expand Down
62 changes: 44 additions & 18 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.. kiwi documentation master file

.. only:: suse

.. include:: suse_metadata.rst

Welcome to KIWI NG
==================

Expand All @@ -19,24 +23,46 @@ Why KIWI?
* **Extensible and Customizable**: A flexible plugin architecture and the ability to include custom scripts and configuration files give you full control over the image-building process.
* **Battle-Tested**: {kiwi} is used by enterprises and open-source projects alike, and builds official images in the build service of SUSE and Fedora.

.. toctree::
:maxdepth: 1
:hidden:

overview
installation
quickstart
commands
troubleshooting
plugins
concept_and_workflow
image_description
image_types_and_results
building_images
working_with_images
contributing
integration_testing
api
.. only:: suse

.. toctree::
:maxdepth: 1

overview
installation
quickstart
commands
troubleshooting
plugins
concept_and_workflow
image_description
image_types_and_results
building_images
working_with_images
contributing
integration_testing
api

.. only:: not suse

.. toctree::
:maxdepth: 1
:hidden:

overview
installation
quickstart
commands
troubleshooting
plugins
concept_and_workflow
image_description
image_types_and_results
building_images
working_with_images
contributing
integration_testing
api

.. sidebar:: Links

Expand Down
7 changes: 7 additions & 0 deletions doc/source/suse_metadata.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:meta:
:description: Your flexible operating system image and appliance builder
:keyword: KIWI
:social-descr: The SEO description
:seo-title: KIWI - Appliance Builder Next Generation
:task: Deployment, Installation
:series: Products & Solutions
Loading