aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorumarcor <unai.martinezcorral@ehu.eus>2020-08-31 00:59:22 +0200
committertgingold <tgingold@users.noreply.github.com>2020-08-31 08:08:31 +0200
commit1c00b4812edb439f47938d074b9c4f73b2cc0ad3 (patch)
tree816fbcbb65594081b54c27c082c5dcc66f467889 /doc
parente3672365cf95b98135c2b65446995dcd85b92d5e (diff)
downloadghdl-1c00b4812edb439f47938d074b9c4f73b2cc0ad3.tar.gz
ghdl-1c00b4812edb439f47938d074b9c4f73b2cc0ad3.tar.bz2
ghdl-1c00b4812edb439f47938d074b9c4f73b2cc0ad3.zip
ci: use buildthedocs/btd to build and publish the docs to GHP
Diffstat (limited to 'doc')
-rw-r--r--doc/_static/logo.pngbin0 -> 3963 bytes
-rw-r--r--doc/_static/theme_overrides.css12
-rw-r--r--doc/conf.py31
-rw-r--r--doc/index.rst33
-rw-r--r--doc/requirements.txt3
-rw-r--r--doc/shields.json32
6 files changed, 48 insertions, 63 deletions
diff --git a/doc/_static/logo.png b/doc/_static/logo.png
new file mode 100644
index 000000000..c0f903a7a
--- /dev/null
+++ b/doc/_static/logo.png
Binary files differ
diff --git a/doc/_static/theme_overrides.css b/doc/_static/theme_overrides.css
index 7efc1c207..4a5cae28e 100644
--- a/doc/_static/theme_overrides.css
+++ b/doc/_static/theme_overrides.css
@@ -8,14 +8,6 @@ p{font-size:95%;margin-bottom:12px}
footer {font-size: 75%;}
.rst-footer-buttons {font-size: 140%;}
-/*Header and footer margins*/
-footer p {margin-bottom: 0px}
-footer hr {margin-bottom: 10px}
-[role=navigation] hr {margin-top: 5px}
-
-/*Do not center main content and allow wider display*/
-.wy-nav-content{margin: auto; max-width: 1020px}
-
/*Shrink left nav to 260px*/
.wy-nav-side,.rst-versions,.wy-side-nav-search,.wy-menu-vertical{width: 260px}
.wy-nav-content-wrap{margin-left:260px;background:#fcfcfc;min-height:100%}
@@ -61,10 +53,6 @@ div.wy-menu.rst-pro{display: none !important;max-width: 260px}
/*Reduce space between footnotes*/
.footnotes > .wy-table-responsive {margin-top:-12px;margin-bottom:12px}
-/* Set text justification in paragraphs and list items to fully justified [borrowed from PoC-Library]*/
-.section p {text-align:justify;}
-.simple li {text-align:justify;}
-
/*Reduce margin below lists*/
.rst-content .section ul, .rst-content .toctree-wrapper ul, article ul {margin-bottom: 12px}
.rst-content blockquote {margin-bottom: 12px;}
diff --git a/doc/conf.py b/doc/conf.py
index 69ff6f139..dff335e4d 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,7 +1,10 @@
# -*- coding: utf-8 -*-
import sys, re
-from os.path import abspath, join
+from os.path import abspath
+from pathlib import Path
+from json import dump, loads
+
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -35,7 +38,7 @@ autodoc_default_options = {
'inherited-members': True,
}
-templates_path = ['_templates', '_themes']
+templates_path = ['_templates']
# The suffix(es) of source filenames.
source_suffix = {
@@ -80,9 +83,6 @@ language = None
# directories to ignore when looking for source files.
exclude_patterns = []
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
todo_link_only = True
@@ -99,17 +99,20 @@ except Exception as ex:
# -- Options for HTML output ----------------------------------------------
-html_theme = "sphinx_rtd_theme"
-
-# Override default css to get a larger width for ReadTheDoc build
-html_context = {
- 'css_files': [
- 'https://media.readthedocs.org/css/sphinx_rtd_theme.css',
- 'https://media.readthedocs.org/css/readthedocs-doc-embed.css',
- '_static/theme_overrides.css',
- ],
+html_theme_options = {
+ 'logo_only': True,
+ 'home_breadcrumbs': False,
+ 'vcs_pageview_mode': 'blob',
}
+html_context = {}
+ctx = Path(__file__).resolve().parent / 'context.json'
+if ctx.is_file():
+ html_context.update(loads(ctx.open('r').read()))
+
+html_theme_path = ["."]
+html_theme = "_theme"
+
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
diff --git a/doc/index.rst b/doc/index.rst
index 60efcd2a6..8ea01b675 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,10 +1,29 @@
-.. only:: html
-
- .. exec::
- from helpers import createShields
- createShields()
-
- |SHIELD:gh-logo| |SHIELD:gitter| |SHIELD:code-lic| |SHIELD:doc-lic| |SHIELD:travis-ci| |SHIELD:appveyor| |SHIELD:release|
+.. exec::
+ from helpers import createShields
+ createShields()
+
+GHDL
+####
+
+.. image:: _static/logo.png
+ :width: 400 px
+ :align: center
+ :target: https://github.com/ghdl/ghdl-cosim
+
+.. raw:: html
+
+ <p style="text-align: center;">
+ <a title="GitHub Repository" href="https://github.com/ghdl/ghdl"><img src="https://img.shields.io/badge/-ghdl/ghdl-323131.svg?longCache=true&style=flat-square&logo=github"></a><!--
+ -->
+ <a title="Talk to us on Gitter" href="https://gitter.im/ghdl1/Lobby"><img src="https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=fff"></a><!--
+ -->
+ <a title="GNU General Public License 2" href="Licenses.html"><img src="https://img.shields.io/badge/code%20license-GPLv2-bd0000.svg?longCache=true&style=flat-square&label=license&logo=gnu"></a><!--
+ -->
+ <a title="Creative Commons Attribution-ShareAlike 4.0" href="Licenses.html"><img src="https://img.shields.io/badge/doc%20license-CC--BY--SA--4.0-bf7600.svg?longCache=true&style=flat-square&logo=Creative%20Commons&logoColor=fff"></a><!--
+ -->
+ <a title="Latest release" href="http://ghdl.rtfd.io"><img src="https://img.shields.io/github/release/ghdl/ghdl.svg?longCache=true&style=flat-square&label=latest%20release"></a><!--
+ -->
+ </p>
.. only:: html
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 7e7fe40ed..e632e6afd 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,7 +1,6 @@
#-r ../requirements.txt
-sphinx>=1.5.2
+sphinx>=3.0.0
recommonmark
-sphinx_rtd_theme
python-dateutil
# sphinxcontrib-textstyle>=0.2.1
# sphinxcontrib-spelling>=2.2.0
diff --git a/doc/shields.json b/doc/shields.json
index 8224fe0f9..da81ca57d 100644
--- a/doc/shields.json
+++ b/doc/shields.json
@@ -1,28 +1,4 @@
{
- "travis-ci": {
- "src": "travis/ghdl/ghdl/master.svg?logo=travis",
- "target": "https://travis-ci.org/ghdl/ghdl",
- "alt": "Build status by Travis-CI" },
- "appveyor": {
- "src": "appveyor/ci/tgingold/ghdl-psgys/master.svg?logo=appveyor&logoColor=aab2ab",
- "target": "https://ci.appveyor.com/project/tgingold/ghdl-psgys/branch/master",
- "alt": "Build status by AppVeyor" },
- "release": {
- "src": "github/release/ghdl/ghdl.svg?label=latest%20release",
- "target": "gh:ghdl/ghdl/releases",
- "alt": "Latest release" },
- "code-lic": {
- "src": "badge/code%20license-GPLv2-bd0000.svg?label=license&logo=gnu",
- "target": "Licenses.html",
- "alt": "GNU General Public License 2" },
- "doc-lic": {
- "src": "badge/doc%20license-CC--BY--SA--4.0-aab2ab.svg?",
- "target": "Licenses.html",
- "alt": "Creative Commons Attribution-ShareAlike 4.0" },
- "gitter": {
- "src": "badge/chat-on%20gitter-4db797.svg?logo=gitter&logoColor=4db797",
- "target": "https://gitter.im/ghdl1/Lobby",
- "alt": "Talk to us on Gitter" },
"issues-new": {
"src": "badge/new-issue-yellowgreen.svg?logo=github",
"target": "gh:ghdl/ghdl/issues/new",
@@ -59,8 +35,8 @@
"src": "github/contributors/ghdl/ghdl.svg?logo=github",
"target": "gh:ghdl/ghdl/graphs/contributors",
"alt": "Contributors" },
- "gh-logo": {
- "src": "badge/-ghdl/ghdl-323131.svg?logo=github",
- "target": "gh:ghdl/ghdl",
- "alt": "Source Code on GitHub" }
+ "gitter": {
+ "src": "badge/chat-on%20gitter-4db797.svg?logo=gitter&logoColor=4db797",
+ "target": "https://gitter.im/ghdl1/Lobby",
+ "alt": "Talk to us on Gitter" }
}