hugo-theme-vivliocli
is a Hugo theme for building document sites that can output typeset PDF. This theme utilizes Vivliostyle CLI to output any section of the site as a typeset PDF.
Any section of the site with an _pdf.md
file can be output as a typeset PDF with cover, table of contents, bookmarks, chapter numbers, and page numbers (powered by Vivliostyle CLI). You can select between a book style with left and right pages or a simple style with all pages being the same. Chapter numbers are automatically assigned based on the hierarchy and header level of the Markdown file. You can specify the output level of chapter numbers and the format of the top-level (e.g. "Chapter X").
This User Guide is also a sample site built with Hugo-theme-vivliocli. The PDF is available here.
With the include
shortcode, you can easily draw complex tables by including a CSV file in Markdown. Vertical ||
and horizontal ->
cell merging is possible. You can use Markdown syntax in each cell. You can also specify style settings such as the width of each column and text alignment.
You can use Mermaid and Mathjax to leverage powerful diagram, chart, and math formula drawing capabilities.
You can use ShowIf
/ HideIf
shortcodes to write blocks or files that are only output in specific editions. This makes it possible to output sets of PDFs with different levels of detail for multiple editions.
hugo new site MySite
cd MySite
git init
git submodule add https://github.com/mochimochiki/hugo-theme-vivliocli themes/hugo-theme-vivliocli
see the User Guide for details. 日本語はこちら
- Install Hugo (v0.114.0 or later).
- Install Vivliostyle CLI (v8.6.0 or later).
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Files in assets/js and static/css are licensed under CC0-1.0 unless otherwise noted.