Community Team - The Tor Project
This is a reveal.js slides compiler similar to Onion TeX Slim.
It was written during a Tor Hackweek project.
This software could works like this:
Onion Reveal’s repository is hosted at https://gitlab.torproject.org/tpo/web/onion-reveal/.
Onion Reveal requires the following software:
An example installation script tested on Debian Bookworm is available at scripts/onion-reveal-provision-build.
This repository is ready to be used in any existing repository. It can be installed in a number of ways as follows.
Simply fork this project and change whatever you need.
You can simply put it as a Git submodule somewhere, like in
a vendors
folder of your project:
mkdir -p vendor && \
git submodule add --depth 1 \
https://gitlab.torproject.org/tpo/web/onion-reveal vendors/onion-reveal
You also need to initialize Onion Reveal’s submodules:
git -C vendors/onion-reveal submodule update --init --depth 1
Then use symbolic links to reference all the needed files from the root of your repository.
Even simpler, copy all the relevant files from this repository into your project.
The Onion Reveal repository can be installed anywhere in your system. In fact, it does not need to be stored inside your project if you don’t want to. You just need to make sure to invoke the scripts from your project folder or pass the appropriate folder or file path as arguments to it’s scripts.
git-subtree(1)
.Example project layout:
* /path/to/my/project
* slides
* README.md
* slide-for-conference-1
* slide-for-conference-1.md
* slide-for-conference-2
* slide-for-conference-2.md
* vendors
* onion-reveal
To build the theme, follow the instructions at vendors/onion-reveal/vendors/revealjs_tor_theme/README or use the following script, if you’re using a Debian-like system:
./vendors/onion-reveal/scripts/onion-reveal-build-theme
Onion Reveal can be used to build static websites from any set of Markdown files it finds, so it’s recommended to run it against your project slides folder.
Once all dependencies are installed and the required files are in place in your repository, just run the build script:
vendors/onion-reveal/scripts/onion-reveal-build-all slides/
If invoked without arguments, the script above will build slides from all Markdown file it finds recursively from the current folder.
You can also build a single slide deck:
vendors/onion-reveal/scripts/onion-reveal-build \
slides/slide-for-conference-1/slide-for-conference-1.md
Onion Reveal plays well with localization (l10n). Out of the box, it supports translations through L10n for Markdown. If you have po4a installed, you can use it by copying/customizing the provided l10n.sample and running the following script everytime you want to sync your translations:
./vendors/l10n-for-markdown/scripts/l10n-for-markdown-update-locales
Onion Reveal also comes with a sample Makefile that can be customized to your needs, placed in the desired folder and then used to build all your slides through
make onion-reveal-build-all
You can also build specific slides using
make
:
make -C slides slides/slide-for-conference-1/slide-for-conference-1.html
Onion Reveal support Continuous Integration (CI) through GitLab. Check the .gitlab-ci-onion-reveal.yml file for details.
Check existing and report new issues in the ticket queue.