diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..a01019e --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,20 @@ +# .readthedocs.yaml +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +formats: + - pdf + +sphinx: + configuration: docs/source/conf.py + +python: + install: + - requirements: docs/source/requirements.txt diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css new file mode 100644 index 0000000..8e28236 --- /dev/null +++ b/docs/source/_static/custom.css @@ -0,0 +1,26 @@ +/* Don't hide the right sidebar as we're placing our fixed links there */ +aside.no-toc { + display: block !important; +} + +/* Colorful headings */ +h1 { + color: var(--color-brand-primary); +} + +h2, h3, h4, h5, h6 { + color: var(--color-brand-content); +} + +/* Use a different color for external links */ +a.external { + color: var(--color-brand-primary) !important; +} + +.wy-table-responsive table td { + white-space: normal; +} + +th { + text-align: left; +} diff --git a/docs/source/_static/favico.png b/docs/source/_static/favico.png new file mode 100644 index 0000000..3f5afba Binary files /dev/null and b/docs/source/_static/favico.png differ diff --git a/docs/source/_static/logo.png b/docs/source/_static/logo.png new file mode 100644 index 0000000..8e5a507 Binary files /dev/null and b/docs/source/_static/logo.png differ diff --git a/docs/source/_templates/page.html b/docs/source/_templates/page.html new file mode 100644 index 0000000..056b6ea --- /dev/null +++ b/docs/source/_templates/page.html @@ -0,0 +1,43 @@ +{# + + See https://github.com/pradyunsg/furo/blob/main/src/furo/theme/furo/page.html for the original + block this is overwriting. + + The part that is customized is between the "begin of custom part" and "end of custom part" + comments below. It uses the same styles as the existing right sidebar code. + +#} +{% extends "furo/page.html" %} +{% block right_sidebar %} +
+{% endblock %} diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..b833757 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +project = 'YosysHQ AppNote-123' +author = 'YosysHQ GmbH' +copyright ='2024 YosysHQ GmbH' + +templates_path = ['_templates'] + +# select HTML theme +html_theme = "furo" + +# copy static folders to the documentation's HTML output +html_static_path = ['_static', '_images'] + +# setup logo and css +html_logo = '_static/logo.png' +html_favicon = '_static/favico.png' +html_css_files = ['custom.css'] + +# code blocks style +pygments_style = 'colorful' +highlight_language = 'systemverilog' + +# branding for HTML +html_theme_options = { + "sidebar_hide_name": True, + + "light_css_variables": { + "color-brand-primary": "#d6368f", + "color-brand-content": "#4b72b8", + "color-api-name": "#8857a3", + "color-api-pre-name": "#4b72b8", + "color-link": "#8857a3", + }, + + "dark_css_variables": { + "color-brand-primary": "#e488bb", + "color-brand-content": "#98bdff", + "color-api-name": "#8857a3", + "color-api-pre-name": "#4b72b8", + "color-link": "#be95d5", + }, +} + +# extensions +extensions = ['sphinx.ext.autosectionlabel'] diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..8cf98f1 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,2 @@ +AppNote 123 +=========== diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt new file mode 100644 index 0000000..a95ae18 --- /dev/null +++ b/docs/source/requirements.txt @@ -0,0 +1 @@ +furo