瀏覽代碼

Merge branch 'feature/docs-site-theme' into develop

default_compile_flags
vector-of-bool 4 年之前
父節點
當前提交
949ad60322
共有 4 個檔案被更改,包括 40 行新增8 行删除
  1. +3
    -0
      Makefile
  2. +7
    -1
      docs/conf.py
  3. +0
    -7
      docs/index.rst
  4. +30
    -0
      docs/layout.html

+ 3
- 0
Makefile 查看文件

@@ -20,6 +20,9 @@ docs:
-Wqanj8
echo "Docs generated to _build/docs"

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

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

+ 7
- 1
docs/conf.py 查看文件

@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
# Refer: http://www.sphinx-doc.org/en/master/config

import os

# -- Project information -----------------------------------------------------
project = 'dds'
copyright = '2020, vector-of-bool'
@@ -13,7 +15,7 @@ release = '0.1.0-alpha.4'

# -- General configuration ---------------------------------------------------
extensions = []
templates_path = ['_templates']
templates_path = []
source_suffix = '.rst'
master_doc = 'index'
language = None
@@ -25,3 +27,7 @@ html_theme = 'nature'
html_theme_options = {}
html_static_path = []
html_sidebars = {}

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

+ 0
- 7
docs/index.rst 查看文件

@@ -19,10 +19,3 @@ the :doc:`tut/index` page.
design
dev/index
err/index

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

+ 30
- 0
docs/layout.html 查看文件

@@ -0,0 +1,30 @@
---
title: "{{ title | striptags }}"
layout: single
{% if not pagename.endswith('index') -%}
url: docs/{{pagename}}{{file_suffix}}
{%- endif %}
---

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

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

<div class="page-content">
{{ body }}
{% if next %}
<div class="next-link">
Next: <a href="{{ next.link }}">{{ next.title }}</a>
</div>
{% endif %}
</div>

Loading…
取消
儲存