diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml index ad9693ce..27eb5a97 100644 --- a/.github/workflows/links.yml +++ b/.github/workflows/links.yml @@ -35,6 +35,7 @@ jobs: --exclude http://www.gnu.org --exclude http://fsf.org --exclude docs/pages + --exclude docs/_includes --exclude-path '{{cookiecutter.project_slug}}/README.md' --exclude-path 'tests/data' -- ." diff --git a/docs/_config.yml b/docs/_config.yml index 8a0ff03d..b1c4206e 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -6,6 +6,8 @@ url: https://UCL-ARC.github.io/python-tooling color_scheme: dark +layouts_dir: _layouts + aux_links: Source repository: https://github.com/UCL-ARC/python-tooling aux_links_new_tab: true diff --git a/docs/_includes/components/anchor_icon.html b/docs/_includes/components/anchor_icon.html new file mode 100644 index 00000000..6dbcc24b --- /dev/null +++ b/docs/_includes/components/anchor_icon.html @@ -0,0 +1,3 @@ + diff --git a/docs/_includes/sidebar.html b/docs/_includes/sidebar.html new file mode 100644 index 00000000..bf15ea24 --- /dev/null +++ b/docs/_includes/sidebar.html @@ -0,0 +1,25 @@ +{%- comment -%} Include as: {%- include components/sidebar.html -%} Depends on: +page(?), site. Results in: HTML for the side bar. Includes: title.html, +components/site_nav.html, nav_footer_custom.html Overwrites: nav_footer_custom. +Should not be cached, because nav_footer_custom.html might depend on page. {%- +endcomment -%} + +
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 00000000..a743e9cc --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,44 @@ + + + {% include head.html %} + + Skip to main content + {% include icons/icons.html %} {% if page.nav_enabled == true %} {% include + sidebar.html %} {% elsif layout.nav_enabled == true and page.nav_enabled == + nil %} {% include sidebar.html %} {% elsif site.nav_enabled != false and + layout.nav_enabled == nil and page.nav_enabled == nil %} {% include + sidebar.html %} {% endif %} + +