diff --git a/.gitignore b/.gitignore index 4b791a41..0e460dd5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ site.retry *__pycache__ docs/* venv -*.log \ No newline at end of file +*.log +modules/* \ No newline at end of file diff --git a/group_vars/all/07_applications.yml b/group_vars/all/07_applications.yml index 0f381ba4..f77b76a1 100644 --- a/group_vars/all/07_applications.yml +++ b/group_vars/all/07_applications.yml @@ -350,7 +350,7 @@ defaults_applications: flavor: "oidc_login" # Keeping on sociallogin because the other option is not implemented yet matomo_tracking_enabled: "{{matomo_tracking_enabled_default}}" # Enables\Disables Matomo Tracking css_enabled: "{{css_enabled_default}}" # Enables\Disables Global CSS Style - landingpage_iframe_enabled: "true" # Enables\Disables the possibility to embed this on landing page via iframe + landingpage_iframe_enabled: "{{landingpage_iframe_enabled_default}}" # Enables\Disables the possibility to embed this on landing page via iframe database: central_storage: True # Activate Central Database Storage credentials: diff --git a/sphinx/Makefile b/sphinx/Makefile index 6e06da27..f14f1220 100644 --- a/sphinx/Makefile +++ b/sphinx/Makefile @@ -2,29 +2,37 @@ # # You can set these variables from the command line, and also # from the environment -SPHINXOPTS ?= -c . -SPHINXBUILD ?= sphinx-build -SPHINX_SOURCE_DIR ?= ../ -SPHINX_BUILD_DIR ?= ../docs +SPHINXOPTS ?= -c . +SPHINXBUILD ?= sphinx-build +SPHINX_SOURCE_DIR ?= ../ +SPHINX_BUILD_DIR ?= ../docs +SPHINX_APIDOC_BUILD_DIR = $(SPHINX_SOURCE_DIR)modules -.PHONY: help install copy-images apidoc html Makefile +.PHONY: help install copy-images apidoc remove-apidoc html Makefile # Copy images before running any Sphinx command (except for help) copy-images: @echo "Copying images from ../assets/img/ to ./assets/img/..." - cp -r ../assets/img/* ./assets/img/ + cp -vr ../assets/img/* ./assets/img/ # Generate reStructuredText files from Python modules using sphinx-apidoc apidoc: @echo "Running sphinx-apidoc..." - sphinx-apidoc -f -o $(SPHINX_SOURCE_DIR)/modules $(SPHINX_SOURCE_DIR) + sphinx-apidoc -f -o $(SPHINX_APIDOC_BUILD_DIR) $(SPHINX_SOURCE_DIR) + +remove-apidoc: + @echo "Removing sphinx-apidoc files..." + - rm -rv $(SPHINX_APIDOC_BUILD_DIR) # "help" target does not copy images help: @$(SPHINXBUILD) -M help "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O) # HTML target depends on apidoc so that sphinx-apidoc runs first -html: copy-images apidoc +html: copy-images + @$(SPHINXBUILD) -M html "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O) + +clean: remove-apidoc @$(SPHINXBUILD) -M html "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O) # Catch-all target: route all unknown targets to Sphinx using the new diff --git a/sphinx/README.md b/sphinx/README.md index 626feee1..2ff3bd50 100644 --- a/sphinx/README.md +++ b/sphinx/README.md @@ -1,6 +1,3 @@ -Hier die angepasste Version der README.md mit Erläuterungen zu den zusätzlichen Befehlen: - -```markdown # Documentation CyMaIS uses [Sphinx](https://www.sphinx-doc.org/) to automatically generate its documentation and leverages the [Awesome Sphinx Theme](https://sphinxawesome.xyz/) for a sleek and responsive design. Enjoy a seamless, visually engaging experience 🚀✨. diff --git a/sphinx/extensions/local_file_headings.py b/sphinx/extensions/local_file_headings.py index cef169ad..9211f239 100644 --- a/sphinx/extensions/local_file_headings.py +++ b/sphinx/extensions/local_file_headings.py @@ -29,8 +29,8 @@ def add_local_file_headings(app, pagename, templatename, context, doctree): files = [f for f in os.listdir(abs_dir) if f.endswith('.md') or f.endswith('.rst')] # If an index file is present, remove any readme files (case-insensitive). files_lower = [f.lower() for f in files] - if 'index.md' in files_lower or 'index.rst' in files_lower: - files = [f for f in files if f.lower() not in ['readme.md', 'readme.rst']] + if 'index.rst' in files_lower: + files = [f for f in files if f.lower() not in ['readme.md']] file_items = [] for file in files: diff --git a/sphinx/extensions/local_subfolders.py b/sphinx/extensions/local_subfolders.py index 23b0c947..1b96594d 100644 --- a/sphinx/extensions/local_subfolders.py +++ b/sphinx/extensions/local_subfolders.py @@ -4,6 +4,8 @@ from .nav_utils import extract_headings_from_file, MAX_HEADING_LEVEL logger = logging.getLogger(__name__) +CANDIDATES = ['index.rst', 'readme.md', 'main.rst'] + def collect_folder_tree(dir_path, base_url): """ Recursively collects the folder tree starting from the given directory. @@ -28,7 +30,7 @@ def collect_folder_tree(dir_path, base_url): # Find representative file for folder title using index or readme rep_file = None - for candidate in ['index.rst', 'index.md', 'readme.md', 'readme.rst']: + for candidate in CANDIDATES: for f in files: if f.lower() == candidate: rep_file = f @@ -48,7 +50,7 @@ def collect_folder_tree(dir_path, base_url): # Remove the representative file from the list to avoid duplication, # and filter out any additional "readme.md" or "index.rst" files. files.remove(rep_file) - files = [f for f in files if f.lower() not in ['readme.md', 'index.rst']] + files = [f for f in files if f.lower() not in CANDIDATES] # Process the remaining files in the current directory file_items = [] diff --git a/sphinx/templates/structure.html b/sphinx/templates/structure.html index ed32dfb6..ece03302 100644 --- a/sphinx/templates/structure.html +++ b/sphinx/templates/structure.html @@ -61,5 +61,5 @@ {% endif %} {% endif %} - + \ No newline at end of file diff --git a/tasks/README.md b/tasks/README.md new file mode 100644 index 00000000..09c2d60a --- /dev/null +++ b/tasks/README.md @@ -0,0 +1 @@ +This folder contains the cross role tasks \ No newline at end of file diff --git a/tasks/constructor.yml b/tasks/constructor.yml index 2204c963..a3838ca8 100644 --- a/tasks/constructor.yml +++ b/tasks/constructor.yml @@ -59,6 +59,10 @@ users: "{{users}}" when: enable_debug | bool +- name: init root user + include_role: + name: user-root + - name: update device include_role: name: update