-
-
Save felixfontein/6de36fff529a12b0c4ffd4aa73a82b6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COLLECTIONS="community.crypto community.docker" | |
mkdir rst | |
cat > rst/index.rst <<EOF | |
.. _docsite_root_index: | |
Welcome to my Ansible collection documentation | |
============================================== | |
This docsite contains documentation of some collections. | |
.. toctree:: | |
:maxdepth: 2 | |
:caption: Collections: | |
collections/index | |
.. toctree:: | |
:maxdepth: 1 | |
:caption: Plugin indexes: | |
:glob: | |
collections/index_* | |
EOF | |
antsibull-docs collection --use-current --dest-dir rst ${COLLECTIONS} | |
curl https://docs.ansible.com/ansible/4/objects.inv -L --output ansible_4.inv | |
pip install sphinx antsibull ansible-pygments sphinx_rtd_theme | |
cat > conf.py <<EOF | |
project = 'Ansible collections' | |
html_short_title = 'Ansible Collections Documentation' | |
extensions = ['sphinx.ext.intersphinx', 'sphinx_antsibull_ext'] | |
pygments_style = 'ansible' | |
highlight_language = 'YAML+Jinja' | |
html_theme = 'sphinx_rtd_theme' | |
html_show_sphinx = False | |
display_version = False | |
html_use_smartypants = True | |
html_use_modindex = False | |
html_use_index = False | |
html_copy_source = False | |
intersphinx_mapping = { | |
'ansible_4': ('https://docs.ansible.com/ansible/4/', (None, '../ansible_4.inv')), | |
} | |
EOF | |
sphinx-build -M html rst build -c . | |
firefox build/html/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment