From c3c889784a4bb9707adbb6de789ac213a6bd61cd Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 14 Mar 2025 15:29:47 +0100 Subject: [PATCH] Added Sphinx draft --- .gitignore | 5 ++- Makefile | 20 ++++++++++++ conf.py | 61 ++++++++++++++++++++++++++++++++++++ docs/.gitkeep | 0 index.rst | 21 +++++++++++++ reuirements.yml | 4 +++ roles/docker-taiga/README.md | 7 ----- 7 files changed, 110 insertions(+), 8 deletions(-) create mode 100644 Makefile create mode 100644 conf.py create mode 100644 docs/.gitkeep create mode 100644 index.rst create mode 100644 reuirements.yml diff --git a/.gitignore b/.gitignore index 7043f7bd..6ae12499 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ site.retry -*__pycache__ \ No newline at end of file +*__pycache__ +docs/* +!docs/.gitkeep +venv \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..bc9a7c7c --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = docs + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/conf.py b/conf.py new file mode 100644 index 00000000..518737af --- /dev/null +++ b/conf.py @@ -0,0 +1,61 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information + +project = 'CyMaIS - Cyber Master Infrastructure Solution' +copyright = '2025, Kevin Veen-Birkenbach' +author = 'Kevin Veen-Birkenbach' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [] + +templates_path = ['_templates'] +exclude_patterns = ['docs', 'venv', 'venv/**'] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'alabaster' +html_static_path = ['_static'] +html_sidebars = { + '**': [ + 'globaltoc.html', # globales Inhaltsverzeichnis + 'relations.html', # Prev/Next Navigation + 'searchbox.html', # Suchfeld + ] +} +html_theme_options = { + 'fixed_sidebar': True, +} + +# Liste der Dateiendungen, die Sphinx verarbeiten soll: +source_suffix = { + '.rst': 'restructuredtext', + '.md': 'markdown', +} + +# Erweiterungen hinzufügen – MyST-Parser aktivieren: +extensions = [ + 'myst_parser', + # ... andere Extensions +] + +# Optional: Zusätzliche MyST-Konfigurationen +myst_enable_extensions = [ + "colon_fence", # Für erweiterte Syntax wie ::: Hinweisboxen etc. + # weitere Erweiterungen nach Bedarf +] + +myst_xref_ignore = [ + r"\./roles/.*", + "../" +] + diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/index.rst b/index.rst new file mode 100644 index 00000000..222120b9 --- /dev/null +++ b/index.rst @@ -0,0 +1,21 @@ +.. CyMaIS - Cyber Master Infrastructure Solution documentation master file, created by + sphinx-quickstart on Fri Mar 14 14:55:53 2025. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +CyMaIS - Cyber Master Infrastructure Solution documentation +=========================================================== + +Add your content using ``reStructuredText`` syntax. See the +`reStructuredText `_ +documentation for details. + + +.. toctree:: + :maxdepth: 5 + :caption: Index: + :glob: + + **/*.md + + diff --git a/reuirements.yml b/reuirements.yml new file mode 100644 index 00000000..e3a49bcc --- /dev/null +++ b/reuirements.yml @@ -0,0 +1,4 @@ +pip: + myst-parser + sphinx + sphinx-rtd-theme diff --git a/roles/docker-taiga/README.md b/roles/docker-taiga/README.md index acfae32b..f1868a41 100644 --- a/roles/docker-taiga/README.md +++ b/roles/docker-taiga/README.md @@ -2,13 +2,6 @@ This Ansible role sets up and configures a Taiga project management platform using Docker. It includes tasks for setting up the database, Nginx proxy, and updating the repository with necessary files. -## Table of Contents - -- [Tasks](#tasks) -- [Variables](#variables) -- [Templates](#templates) -- [Author](#author) - ## Tasks The main tasks included in this role are: