Skip to content

Commit 7f708f8

Browse files
committed
AETHER-20 Initial docs framework
Change-Id: Ic4ad4cf9fc05edb4ee6050912a845650a80b7eb6
0 parents  commit 7f708f8

16 files changed

+745
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
venv_docs
2+
_build

.gitreview

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[gerrit]
2+
host=gerrit.opencord.org
3+
port=29418
4+
project=aether-docs.git
5+
defaultremote=origin

Makefile

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Makefile for Sphinx documentation
2+
3+
# use bash for pushd/popd, and to fail quickly
4+
SHELL = bash -e -o pipefail
5+
6+
# You can set these variables from the command line.
7+
SPHINXOPTS ?=
8+
SPHINXBUILD ?= sphinx-build
9+
SOURCEDIR ?= .
10+
BUILDDIR ?= _build
11+
12+
# name of python virtualenv that is used to run commands
13+
VENV_NAME := venv_docs
14+
15+
.PHONY: help test lint doc8 reload Makefile prep
16+
17+
# Put it first so that "make" without argument is like "make help".
18+
help: $(VENV_NAME)
19+
source $</bin/activate ; set -u ;\
20+
$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21+
22+
# Create the virtualenv with all the tools installed
23+
$(VENV_NAME):
24+
virtualenv -p python3 $(VENV_NAME) ;\
25+
source $@/bin/activate ;\
26+
pip install -r requirements.txt
27+
28+
# automatically reload changes in browser as they're made
29+
reload: $(VENV_NAME)
30+
source $</bin/activate ; set -u ;\
31+
sphinx-reload $(SOURCEDIR)
32+
33+
# lint and link verification. linkcheck is part of sphinx
34+
test: lint linkcheck spelling
35+
36+
lint: doc8
37+
38+
doc8: $(VENV_NAME) | $(OTHER_REPO_DOCS)
39+
source $</bin/activate ; set -u ;\
40+
doc8 --max-line-length 119 \
41+
$$(find . -name \*.rst ! -path "*venv*" ! -path "*vendor*" ! -path "*repos*" )
42+
43+
license: $(VENV_NAME)
44+
source $</bin/activate ; set -u ;\
45+
reuse --version ;\
46+
reuse --root . lint
47+
48+
# clean up
49+
clean:
50+
rm -rf $(BUILDDIR)
51+
52+
clean-all: clean
53+
rm -rf $(VENV_NAME)
54+
55+
# build multiple versions
56+
multiversion: $(VENV_NAME) Makefile | prep $(OTHER_REPO_DOCS)
57+
source $</bin/activate ; set -u ;\
58+
sphinx-multiversion "$(SOURCEDIR)" "$(BUILDDIR)/multiversion" $(SPHINXOPTS)
59+
cp "$(SOURCEDIR)/_templates/meta_refresh.html" "$(BUILDDIR)/multiversion/index.html"
60+
61+
# Catch-all target: route all unknown targets to Sphinx using the new
62+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
63+
%: $(VENV_NAME) Makefile | $(OTHER_REPO_DOCS) $(STATIC_DOCS)
64+
source $</bin/activate ; set -u ;\
65+
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.1-dev

_static/aether-favicon-128.png

9.05 KB
Loading

_static/aether.svg

+256
Loading

_static/css/rtd_theme_mods.css

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2019-present Open Networking Foundation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License. */
15+
16+
/* Don't restrict content width on the RTD theme
17+
* from: https://stackoverflow.com/a/32898444 */
18+
19+
.wy-nav-content {
20+
max-width: none;
21+
}
22+
23+
.wy-table-responsive table td, .wy-table-responsive table th {
24+
white-space: normal;
25+
}
26+
27+
.wy-side-nav-search {
28+
background-color: #d9d9d9;
29+
}
30+
31+
.wy-side-nav-search>div.version {
32+
color: #404040;
33+
}

_static/fonts/Inconsolata-Bold.ttf

106 KB
Binary file not shown.

_static/fonts/Inconsolata-Regular.ttf

93.7 KB
Binary file not shown.

_templates/meta_refresh.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3+
SPDX-License-Identifier: Apache-2.0
4+
--!>
5+
<html><head>
6+
<meta charset="UTF-8">
7+
<meta http-equiv="refresh" content="0;url=master/index.html" />
8+
</head></html>

_templates/versions.html

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
3+
SPDX-License-Identifier: Apache-2.0
4+
--!>
5+
{%- if current_version %}
6+
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
7+
<span class="rst-current-version" data-toggle="rst-current-version">
8+
<span class="fa fa-book"> Other Versions</span>
9+
v: {{ current_version.name }}
10+
<span class="fa fa-caret-down"></span>
11+
</span>
12+
<div class="rst-other-versions">
13+
{%- if versions.tags %}
14+
<dl>
15+
<dt>Tags</dt>
16+
{%- for item in versions.tags %}
17+
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
18+
{%- endfor %}
19+
</dl>
20+
{%- endif %}
21+
{%- if versions.branches %}
22+
<dl>
23+
<dt>Branches</dt>
24+
{%- for item in versions.branches %}
25+
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
26+
{%- endfor %}
27+
</dl>
28+
{%- endif %}
29+
</div>
30+
</div>
31+
{%- endif %}

0 commit comments

Comments
 (0)