Browse Source

Hugo docs are generated differently

default_compile_flags
vector-of-bool 4 years ago
parent
commit
db5900a3a6
3 changed files with 13 additions and 4 deletions
  1. +3
    -0
      Makefile
  2. +8
    -2
      docs/conf.py
  3. +2
    -2
      docs/layout.html

+ 3
- 0
Makefile View File

-Wqanj8 -Wqanj8
echo "Docs generated to _build/docs" echo "Docs generated to _build/docs"


hugo-docs:
env GEN_FOR_HUGO=1 $(MAKE) docs

docs-server: docs docs-server: docs
echo "Docs are visible on http://localhost:9794/" echo "Docs are visible on http://localhost:9794/"
cd _build/docs && \ cd _build/docs && \

+ 8
- 2
docs/conf.py View File

# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Refer: http://www.sphinx-doc.org/en/master/config # Refer: http://www.sphinx-doc.org/en/master/config


import os

# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'dds' project = 'dds'
copyright = '2020, vector-of-bool' copyright = '2020, vector-of-bool'


# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
extensions = [] extensions = []
templates_path = ['.']
templates_path = []
source_suffix = '.rst' source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
language = None language = None
pygments_style = None pygments_style = None


# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------
html_theme = 'basic'
html_theme = 'nature'
html_theme_options = {} html_theme_options = {}
html_static_path = [] html_static_path = []
html_sidebars = {} html_sidebars = {}

if os.environ.get('GEN_FOR_HUGO'):
templates_path.append('.')
html_theme = 'basic'

+ 2
- 2
docs/layout.html View File

{%- endif %} {%- endif %}
--- ---


<div class="toc global">
<div class="toc global" open>
<div class="toc-content" role="navigation" aria-label="global navigation"> <div class="toc-content" role="navigation" aria-label="global navigation">
<div class="toc-header">Contents</div> <div class="toc-header">Contents</div>
{{ toctree(maxdepth=5, titles_only=True) }} {{ toctree(maxdepth=5, titles_only=True) }}
</div> </div>
</div> </div>


<div class="toc local">
<div class="toc local" open>
<div class="toc-content" role="navigation" aria-label="local navigation"> <div class="toc-content" role="navigation" aria-label="local navigation">
<div class="toc-header">On this page</div> <div class="toc-header">On this page</div>
{{ toc }} {{ toc }}

Loading…
Cancel
Save