mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-03-29 04:23:34 +01:00
Optimations for makefile and iframes
This commit is contained in:
parent
6680f64e50
commit
6868b0d8ba
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@ site.retry
|
|||||||
*__pycache__
|
*__pycache__
|
||||||
docs/*
|
docs/*
|
||||||
venv
|
venv
|
||||||
*.log
|
*.log
|
||||||
|
modules/*
|
@ -350,7 +350,7 @@ defaults_applications:
|
|||||||
flavor: "oidc_login" # Keeping on sociallogin because the other option is not implemented yet
|
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
|
matomo_tracking_enabled: "{{matomo_tracking_enabled_default}}" # Enables\Disables Matomo Tracking
|
||||||
css_enabled: "{{css_enabled_default}}" # Enables\Disables Global CSS Style
|
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:
|
database:
|
||||||
central_storage: True # Activate Central Database Storage
|
central_storage: True # Activate Central Database Storage
|
||||||
credentials:
|
credentials:
|
||||||
|
@ -2,29 +2,37 @@
|
|||||||
#
|
#
|
||||||
# You can set these variables from the command line, and also
|
# You can set these variables from the command line, and also
|
||||||
# from the environment
|
# from the environment
|
||||||
SPHINXOPTS ?= -c .
|
SPHINXOPTS ?= -c .
|
||||||
SPHINXBUILD ?= sphinx-build
|
SPHINXBUILD ?= sphinx-build
|
||||||
SPHINX_SOURCE_DIR ?= ../
|
SPHINX_SOURCE_DIR ?= ../
|
||||||
SPHINX_BUILD_DIR ?= ../docs
|
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 before running any Sphinx command (except for help)
|
||||||
copy-images:
|
copy-images:
|
||||||
@echo "Copying images from ../assets/img/ to ./assets/img/..."
|
@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
|
# Generate reStructuredText files from Python modules using sphinx-apidoc
|
||||||
apidoc:
|
apidoc:
|
||||||
@echo "Running sphinx-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" target does not copy images
|
||||||
help:
|
help:
|
||||||
@$(SPHINXBUILD) -M help "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M help "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
# HTML target depends on apidoc so that sphinx-apidoc runs first
|
# 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)
|
@$(SPHINXBUILD) -M html "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
Hier die angepasste Version der README.md mit Erläuterungen zu den zusätzlichen Befehlen:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||
# Documentation
|
# 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 🚀✨.
|
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 🚀✨.
|
||||||
|
@ -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')]
|
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).
|
# If an index file is present, remove any readme files (case-insensitive).
|
||||||
files_lower = [f.lower() for f in files]
|
files_lower = [f.lower() for f in files]
|
||||||
if 'index.md' in files_lower or 'index.rst' in files_lower:
|
if 'index.rst' in files_lower:
|
||||||
files = [f for f in files if f.lower() not in ['readme.md', 'readme.rst']]
|
files = [f for f in files if f.lower() not in ['readme.md']]
|
||||||
|
|
||||||
file_items = []
|
file_items = []
|
||||||
for file in files:
|
for file in files:
|
||||||
|
@ -4,6 +4,8 @@ from .nav_utils import extract_headings_from_file, MAX_HEADING_LEVEL
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
CANDIDATES = ['index.rst', 'readme.md', 'main.rst']
|
||||||
|
|
||||||
def collect_folder_tree(dir_path, base_url):
|
def collect_folder_tree(dir_path, base_url):
|
||||||
"""
|
"""
|
||||||
Recursively collects the folder tree starting from the given directory.
|
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
|
# Find representative file for folder title using index or readme
|
||||||
rep_file = None
|
rep_file = None
|
||||||
for candidate in ['index.rst', 'index.md', 'readme.md', 'readme.rst']:
|
for candidate in CANDIDATES:
|
||||||
for f in files:
|
for f in files:
|
||||||
if f.lower() == candidate:
|
if f.lower() == candidate:
|
||||||
rep_file = f
|
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,
|
# Remove the representative file from the list to avoid duplication,
|
||||||
# and filter out any additional "readme.md" or "index.rst" files.
|
# and filter out any additional "readme.md" or "index.rst" files.
|
||||||
files.remove(rep_file)
|
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
|
# Process the remaining files in the current directory
|
||||||
file_items = []
|
file_items = []
|
||||||
|
@ -61,5 +61,5 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script src="{{ pathto('assets/js/current-nav.js', 1) }}"></script>
|
<script src="{{ pathto('_static/js/current-nav.js', 1) }}"></script>
|
||||||
|
|
1
tasks/README.md
Normal file
1
tasks/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
This folder contains the cross role tasks
|
@ -59,6 +59,10 @@
|
|||||||
users: "{{users}}"
|
users: "{{users}}"
|
||||||
when: enable_debug | bool
|
when: enable_debug | bool
|
||||||
|
|
||||||
|
- name: init root user
|
||||||
|
include_role:
|
||||||
|
name: user-root
|
||||||
|
|
||||||
- name: update device
|
- name: update device
|
||||||
include_role:
|
include_role:
|
||||||
name: update
|
name: update
|
||||||
|
Loading…
x
Reference in New Issue
Block a user