Skip to content

Commit

Permalink
Docs: Initial commit
Browse files Browse the repository at this point in the history
Empty content, but this should be enough scaffolding for RTD.  HTML builds without errors locally with theme et al.
  • Loading branch information
KrystalDelusion committed Feb 25, 2024
1 parent ae7976f commit 23a9b8d
Show file tree
Hide file tree
Showing 10 changed files with 158 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -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)
26 changes: 26 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
@@ -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;
}
Binary file added docs/source/_static/favico.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions docs/source/_templates/page.html
Original file line number Diff line number Diff line change
@@ -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 %}
<div class="toc-sticky toc-scroll">
{# begin of custom part #}
<div class="toc-title-container">
<span class="toc-title">
YosysHQ
</span>
</div>
<div class="toc-tree-container yosyshq-links" style="padding-bottom: 0">
<div class="toc-tree">
<ul>
<li></li>
<li><a class="reference external" href="https://yosyshq.readthedocs.io">Docs</a></li>
<li><a class="reference external" href="https://blog.yosyshq.com">Blog</a></li>
<li><a class="reference external" href="https://www.yosyshq.com">Website</a></li>
</ul>
</div>
</div>
{# end of custom part #}
{% if not furo_hide_toc %}
<div class="toc-title-container">
<span class="toc-title">
{{ _("On this page") }}
</span>
</div>
<div class="toc-tree-container">
<div class="toc-tree">
{{ toc }}
</div>
</div>
{% endif %}
</div>
{% endblock %}
45 changes: 45 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -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']
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
AppNote 123
===========
1 change: 1 addition & 0 deletions docs/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
furo

0 comments on commit 23a9b8d

Please sign in to comment.