Go to file
GiHub Action Bot 98064d657e update .pot files 2025-04-02 05:51:09 +00:00
.github/workflows Update actions/upload-artifact v3 -> v4 2025-02-11 19:21:32 +01:00
bin [1of3]bin/convert-wrapper: workaround for sphinx.ext.imgconverter (bin/**) 2023-05-31 14:15:21 +01:00
examples Fix uart dataLength = 8 2024-10-14 09:33:14 +02:00
source update .pot files 2025-04-02 05:51:09 +00:00
.gitignore wakeup 2024-10-25 09:36:49 +02:00
Dockerfile [3of3]bin/convert-wrapper: workaround for sphinx.ext.imgconverter (Dockerfile) 2023-05-31 14:15:21 +01:00
LICENSE LICENSE: fix missing 1st character C 2023-06-04 15:10:18 +01:00
Makefile Fix doc build problem 2021-08-26 13:50:30 +02:00
README.rst Typos 2024-06-26 23:14:51 +02:00
pdf.Dockerfile Will chatgpt be my saviour ? 2024-10-31 11:00:31 +01:00
requirements.txt try to build pages with translated files. 2023-12-12 23:28:12 +08:00

README.rst

=========
SpinalDoc
=========

This is the documentation repository for
`SpinalHDL <https://github.com/SpinalHDL/SpinalHDL>`_.

It is published on
`spinalhdl.github.io/SpinalDoc-RTD <https://spinalhdl.github.io/SpinalDoc-RTD/master/index.html>`_.

There is also a Chinese version on
`spinalhdl-cn.github.io/SpinalDoc-RTD <https://spinalhdl-cn.github.io/SpinalDoc-RTD/zh_CN/index.html>`_.
This continuous localization version is maintained with the help of `Weblate <https://hosted.weblate.org/projects/spinaldoc-rtd/>`_.

You can also find the API documentation on
`spinalhdl.github.io/SpinalHDL <https://spinalhdl.github.io/SpinalHDL/dev/spinal/index.html>`_.


How to build this documentation
===============================

With venv
---------

Requirements (system)

* make
* git

Create a virtual environment with pipenv (will use the Pipfile for installing the necessary packages)

.. code:: shell

   python3 -m venv .venv

then you can activate the virtual environment (in bash) and install the dependencies

.. code:: shell

   source .venv/bin/activate
   pip install -r requirements.txt

and then you can use ``make`` the usual way

.. code:: shell

   make html     # for html
   make latex    # for latex
   make latexpdf # for latex (will require latexpdf installed)
   make          # list all the available output format

all the outputs will be in docs folder (for html: docs/html)

The Chinese version can be built by

.. code:: shell

   make -e SPHINXOPTS="-D language='zh_CN'" html # for html in Chinese


With Docker
-----------

Requirements (system):

* docker
* git

To create the custom docker image (with python and its dependencies):

.. code:: shell

   docker build -t spinaldoc-rtd .

Then to build the docs:

.. code:: shell

   docker run -it --rm -v $PWD:/docs spinaldoc-rtd

You can still run custom commands in the docker, for instance to clean:

.. code:: shell

   docker run -it --rm -v $PWD:/docs spinaldoc-rtd make clean

It is also possible to create the custom docker image to build a pdf (heavier):

.. code:: shell

   docker build -f pdf.Dockerfile -t spinaldoc-pdf .

And to run it:

.. code:: shell

   docker run -it --rm -v $PWD:/docs spinaldoc-pdf


Native
------

Requirements (system):

* make
* git

Requirements (Python 3):

* sphinx
* sphinx-rtd-theme
* sphinxcontrib-wavedrom
* sphinx-multiversion

After installing the requirements you can run

.. code:: shell

   make html     # for html
   make latex    # for latex
   make latexpdf # for latex (will require latexpdf installed)
   make          # list all the available output format

you can create build multiple version of the doc via

.. code:: shell

   sphinx-multiversion source docs/html

in the docs/html there will be a folder with the builded doc for each branch and tag