Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
📝 Easily manage your bibliography and in-text citations with Hugo, the popular static-site generator.
Hugo Cite is a Hugo theme component that manages CSL-JSON bibliography files and renders in-text citations inside static sites built with the Hugo static site generator. It provides two shortcodes — one to output a reference list and one to insert parenthetical citations — plus a small CSS file, and it supports a range of citation formatting options such as page numbers, page ranges, author suppression, and grouped citations.
Hugo Cite is an open-source Hugo theme extension, released under the WTFPL license, that adds a citation system to any Hugo site by stacking itself after your main theme in the site's theme list. It takes a CSL-JSON bibliography file as input — either stored in a leaf bundle, set in front matter, passed as a shortcode argument, or fetched from a URL — and produces formatted bibliographies and in-text citations in APA style. The project maintainer hosts documentation and a live demo at labs.loupbrun.ca/hugo-cite, and the source is available from the GitHub repository loup-brun/hugo-cite.
{{< bibliography >}} renders a list of works and {{< cite >}} produces an in-text citation; both are Hugo-native shortcodes, so no JavaScript or build step is required.bib.json file in a leaf bundle is loaded by default, but you can override the path with a bibFile front-matter parameter, a shortcode position parameter, named src / cited parameters, or a remote URL pulled in through Hugo's getJSON function.cited flag to the bibliography shortcode filters the list to only the works referenced on the page via in-text citations.p. prefix, and a range like 5-6 adds pp. before the numbers.hugo-cite.css stylesheet that you reference in your HTML templates, and no external dependencies are needed.{{< bibliography >}} with a local JSON file and show only cited works.{{< bibliography cited >}} to automatically display only the sources actually cited on each page.{{< cite "Lessig2002;Nussbaum2011" >}}.Installation has three steps: add the theme as a Git submodule in the themes/hugo-cite directory, append hugo-cite to the theme list in your Hugo config, and reference the hugo-cite.css stylesheet in your templates. Then save a CSL-JSON file with a filename containing bib in a leaf bundle or set the bibFile front-matter parameter, and place the shortcodes in your Markdown. The citation key in {{< cite >}} must match the id field of a reference in the JSON file.
Free — the theme is open source and released under the WTFPL license.
No. The theme accepts only CSL-JSON bibliography files, which is the standard export format from Zotero and other reference managers. BibTeX, .bib, or other formats must be converted to CSL-JSON before use.
Currently only APA is available, and the project warns that it does not match the entire APA specification. Additional styles may be contributed later, but the maintainer notes they are unlikely to appear soon due to the amount of work involved.
Pass the page numbers as a second positional parameter in the cite shortcode, using a dash without spaces — for example, {{< cite "Lessig 2002" 5-6 >}} renders (Lessig, 2002, pp. 5-6). The theme adds the pp. prefix automatically.
Add the cited flag when calling the bibliography shortcode, like {{< bibliography cited >}}. For this to work with in-text citations, the same CSL-JSON file must also be referenced in the page's front matter under the bibFile parameter.
Yes. The project is released under the WTFPL license, and all source code is available on GitHub.
