[hugo] Install hugo if not present

Developers would like to have an easy way to preview the documentation.
Since hugo is distributed as a static binary, we can simply download it
and drop it into the build folder if needed.

Implementation note: The curl/tar option isn't overly beautiful, but
using Python to download and then calling tar didn't seem significantly
nicer to invest too much time into it.
1 file changed
tree: c598394978342fb0f8cd8bb92954aa41cb8399b9
  1. .github/
  2. ci/
  3. doc/
  4. hw/
  5. site/
  6. sw/
  7. test/
  8. util/
  9. .clang-format
  10. .gitignore
  11. .style.yapf
  12. _index.md
  13. azure-pipelines.yml
  14. CONTRIBUTING.md
  15. LICENSE
  16. meson.build
  17. meson_init.sh
  18. meson_options.txt
  19. python-requirements.txt
  20. README.md
  21. toolchain.txt
README.md

OpenTitan

This repository contains hardware, software and utilities written as part of the OpenTitan project. It is structured as monolithic repository, or “monorepo”, where all components live in one repository.

Documentation

The project contains comprehensive documentation of all IPs and tools. You can either access it online or build it locally by following the steps below.

  1. Download and install hugo-extended.

  2. Ensure that you have the required Python modules installed (to be executed in the repository root):

$ sudo apt install python3 python3-pip
$ pip3 install --user -r python-requirements.txt
  1. Execute the build script:
$ ./util/build_docs.py --preview

This compiles the documentation into ./build/docs and starts a local server, which allows you to access the documentation at http://127.0.0.1:1313.

How to contribute

Have a look at CONTRIBUTING for guidelines how to contribute code to this repository.

Licensing

Unless otherwise noted, everything in this repository is covered by the Apache License, Version 2.0 (see LICENSE for full text).