Optimized docs

This commit is contained in:
Kevin Veen-Birkenbach 2025-03-20 15:08:18 +01:00
parent 4c29fc9f02
commit 096934e795
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
11 changed files with 28 additions and 22 deletions

View File

@ -1,4 +0,0 @@
Developer Guide
===============
:doc: docs/generated/yaml_index.rst

4
08_DEVELOPER_GUIDE.rst Normal file
View File

@ -0,0 +1,4 @@
Developer Guide
===============
To get an overview over all yaml files check out :doc:`docs/generated/yaml_index`.

View File

@ -0,0 +1 @@
# Investor Informations

View File

@ -5,10 +5,10 @@ Thank you for your interest in contributing to CyMaIS! We welcome contributions
## How to Contribute
There are several ways you can help:
- **Reporting Issues:** Found a bug or have a feature request? Please open an issue on our [GitHub Issues page](https://github.com/your-repo-link/issues) with a clear description and steps to reproduce the problem.
- **Reporting Issues:** Found a bug or have a feature request? Please open an issue on our [GitHub Issues page](https://github.com/kevinveenbirkenbach/cymais/issues) with a clear description and steps to reproduce the problem.
- **Code Contributions:** If you'd like to contribute code, fork the repository, create a new branch for your feature or bug fix, and submit a pull request. Ensure your code adheres to our coding style and includes tests where applicable.
- **Documentation:** Improving the documentation is a great way to contribute. Whether it's clarifying an existing section or adding new guides, your contributions help others understand and use CyMaIS effectively.
- **Financial Contributions:** If you appreciate CyMaIS and want to support its ongoing development, consider making a financial contribution. For more details, please see our [06_DONATE.md](06_DONATE.md) file.
- **Financial Contributions:** If you appreciate CyMaIS and want to support its ongoing development, consider making a financial contribution. For more details, please see our [donate options](11_DONATE.md).
## Code of Conduct

View File

@ -1,12 +1,12 @@
.PHONY: install deinstall refresh
install:
$(MAKE) -C sphinx html $(MAKEFLAGS)
$(MAKE) -C sphinx install $(MAKEFLAGS)
$(MAKE) -C docs html $(MAKEFLAGS)
$(MAKE) -C docs install $(MAKEFLAGS)
deinstall:
$(MAKE) -C sphinx clean $(MAKEFLAGS)
$(MAKE) -C docs clean $(MAKEFLAGS)
refresh:
$(MAKE) -C sphinx clean $(MAKEFLAGS)
$(MAKE) -C sphinx html $(MAKEFLAGS)
$(MAKE) -C docs clean $(MAKEFLAGS)
$(MAKE) -C docs html $(MAKEFLAGS)

View File

@ -20,10 +20,6 @@ generate-apidoc:
@echo "Running sphinx-apidoc..."
sphinx-apidoc -f -o $(SPHINX_GENERATED_DIR)/modules $(SPHINX_SOURCE_DIR)
remove-generated:
@echo "Removing generated files..."
- find $(SPHINX_GENERATED_DIR)/ -type f ! -name '.gitkeep' -delete
generate-yaml-index:
@echo "Generating YAML index..."
python generators/yaml_index.py --source-dir $(SPHINX_SOURCE_DIR) --output-file $(SPHINX_GENERATED_DIR)/yaml_index.rst
@ -32,16 +28,23 @@ generate-ansible-roles:
@echo "Generating Ansible roles documentation..."
python generators/ansible_roles.py --roles-dir $(SPHINX_SOURCE_DIR)/roles --output-dir $(SPHINX_GENERATED_DIR)/roles
remove-generated:
@echo "Removing generated files..."
- find $(SPHINX_GENERATED_DIR)/ -type f ! -name '.gitkeep' -delete
# "help" target does not copy images
help:
@$(SPHINXBUILD) -M help "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
html: copy-images generate-apidoc generate-yaml-index generate-ansible-roles
html: copy-images generate-apidoc generate-ansible-roles generate-yaml-index
@$(SPHINXBUILD) -M html "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS)
just-html:
@$(SPHINXBUILD) -M html "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS)
clean: remove-generated
@$(SPHINXBUILD) -M html "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M clean "$(SPHINX_SOURCE_DIR)" "$(SPHINX_BUILD_DIR)" $(SPHINXOPTS) $(O)
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).

View File

@ -52,16 +52,16 @@ html_theme_options = {
}
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
'.rst': 'restructuredtext',
'.yml': 'restructuredtext',
'.yaml': 'restructuredtext',
}
sys.path.insert(0, os.path.abspath('./extensions'))
extensions = [
'sphinx.ext.autosummary',
'sphinx.ext.autodoc',
#'sphinx.ext.autosummary',
'myst_parser',
'extensions.local_file_headings',
'extensions.local_subfolders',

View File

@ -36,7 +36,9 @@ def generate_yaml_index(source_dir, output_file):
f.write("This document lists all `.yaml` and `.yml` files found in the specified directory, excluding ignored files.\n\n")
for file in sorted(yaml_files):
f.write(f".. literalinclude:: {file}\n :language: yaml\n :linenos:\n\n")
relative_file_path = os.path.relpath(file, start=os.path.dirname(output_file))
f.write(f".. literalinclude:: {relative_file_path}\n :language: yaml\n :linenos:\n\n")
print(f"YAML index has been generated at {output_file}")

View File

@ -1,4 +1,4 @@
About
===============================
.. markdown-include:: ../README.md
.. markdown-include:: ./README.md