Commit 38f50eb6 authored by Andrii Salnikov's avatar Andrii Salnikov

Navigation menu now follows the main page sections

parent 5ff5d768
Pipeline #4467 passed with stages
in 2 minutes and 37 seconds
......@@ -33,6 +33,14 @@ for cmdf in ${DOCROOT}/source/admins/commands/*.rst; do
sed "s#__CODE_DIR__#${CODE_DIR}#g" -i "$cmdf"
done
# hack for custom index-based navigation bar
# inject the index.rst headers to conf.py custom navigation links definition
mv source/conf.py source/conf.py.orig
sed '/NAVIGATION_PLACEHOLDER/,$d' source/conf.py.orig > source/conf.py
cat source/index.rst | grep -F '*****' -B 1 | sed '/^[^a-zA-Z]/d' | xargs -i echo \"{}\"\, >> source/conf.py
sed '1,/NAVIGATION_PLACEHOLDER/d' source/conf.py.orig >> source/conf.py
rm source/conf.py.orig
# build html
make html
......@@ -51,4 +59,5 @@ mv $CODE_DIR/src/doxygen/SDK/html build/html/sdk
# undo in-place changes of files
git checkout -- ${DOCROOT}/source/admins/commands
git checkout -- ${DOCROOT}/source/conf.py
<h3>{{ _('Navigation') }}</h3>
{% if theme_extra_nav_links %}
<ul>
{% for text in theme_extra_nav_links %}
<li class="toctree-l1"><a href="index.html#{{ text|lower|replace(" ", "-") }}">{{ text }}</a></li>
<br/>
{% endfor %}
</ul>
{% endif %}
......@@ -100,7 +100,10 @@ html_theme = 'alabaster'
html_theme_options = {
'logo': 'ARClogo.png',
'sidebar_includehidden': False,
'sidebar_collapse': True
'sidebar_collapse': True,
'extra_nav_links': [
### NAVIGATION_PLACEHOLDER
]
}
# Add any paths that contain custom static files (such as style sheets) here,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment