Official Documents of the World Cube Association.
Whenever changes are made, GitHub builds PDF files out of each Markdown document, pushes the generated files to the build branch and deploys them to the website. Documents in documents
then become available at worldcubeassociation.org/documents/[path to doc].pdf
, and documents in edudoc
become available at worldcubeassociation.org/edudoc/[path to doc].pdf
. Pre-rendered PDFs are simply copied into build
during the build process.
Example: documents/policies/external/Competition Requirements.md
gets converted to PDF and becomes available at https://documents.worldcubeassociation.org/documents/policies/external/Competition Requirements.pdf
.
Run these scripts from the root directory of the repository:
Script | Description |
---|---|
bin/install_dependencies.sh |
Installs dependencies necessary to generate PDFs*. Run this once. |
bin/build.sh |
Builds PDF files into the build directory. documents or edudoc can be passed as the first argument to only build documents from the specified directory. |
bin/docker_build.sh |
Builds PDF files using Docker. Use the --rebuild flag if you need to rebuild the image. The same directory argument as in build.sh is also supported. |
bin/deploy.sh |
WCA deployment script used by GitHub. You don't need to use this. |
* This only supports Debian-based distributions. If you are not using a Debian-based distribution, install these dependencies manually: pandoc, weasyprint, Liberation Sans font, a font with full Unicode support (e.g. Google Noto).
This document explains everything necessary to create a new document or translate an Educational Resources document.
The build script (bin/build.sh
) works in the following steps:
build
folder if it exists and create a new one.documents
folder into build
(all changes are applied inside of the build
folder).wca{[url]}
and wcadoc{[url]}
with the actual URL to the website (used as a shortcut).{logo}
with the actual absolute path to the WCA logo in assets/WCAlogo_notext.svg
(used as a shortcut).assets/style.css
. HTML files are created and put next to each corresponding Markdown file.documents
to PDF. PDF files are created and put next to each corresponding Markdown file.edudoc
folder, except with the use of the stylesheet in assets/edudoc-style.css
.assets/edudoc-header.html
, where DOCUMENT_TITLE is replaced with the actual title, WCA_LOGO_PATH is replaced with the absolute path to the logo and DATE is replaced with the current date at the time of the build.edudoc
files, except also apply the custom header and a footer that shows the document page.build
.