2.1 metadata.yml

The metadata.yml file is read by Pandoc. Settings in this file affect the behaviour of Pandoc and get inserted in the templates. For more info on templates, see Section 2.3. You can override settings by placing a metadata.yml file at the root directory of your project. For example, the metadata for this project contains:

---
title: Books.jl
subtitle: Create books with Julia
author:
  - Rik Huijzer
  - and contributors

# An example additional header include for html.
# Note that the url will be updated by \`Books.fix_links\`.
header-includes:
- |
  \`\`\`{=html}
  <link rel="stylesheet" href="/files/style.css"/>
  \`\`\`
mousetrap: true

#
# PDF only settings.
#
pdf-footer: ""

# For example, to add extra packages.
extra-pdf-header: |
  \usepackage{cancel}

# Avoid adding a blank page before each chapter.
disable-cleardoublepage: true

bibliography: bibliography.bib

titlepage-top: ""

titlepage-bottom: |
  \`\`\`{=typst}
  #link("https://huijzer.xyz/Books.jl/")
  \`\`\`
---

And, the following defaults are set by Books.jl.

---
title: My book
subtitle: My book subtitle
author:
  - John Doe

# Licenses; can be empty.
html-license: <a href="http://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a>
pdf-license: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International

pdf-footer: "\\url{https://github.com/johndoe/Book.jl}"

links-as-notes: true

tags: [pandoc, Books.jl, JuliaLang]
number-sections: true

code-block-font-size: \scriptsize

titlepage: true
linkReferences: true
link-citations: true

# These table of contents settings only affect the PDF.
toc: true
tocdepth: 1

# Cross-reference prefixes.
eqnPrefix: Equation
figPrefix: Figure
tblPrefix: Table
secPrefix: Section

# Keyboard shortcuts.
mousetrap: true
---

Note that Pandoc has a great templating system. In the template default/template.typ of this project, I tried to get the basics right and haven’t spend hours on making it configurable. However, if you want to add options to the templates, feel free to open a pull request. If you want to configure the template completely by yourself, you can place “template.typ” in “pandoc/” at the root of your project. This same holds for the HTML and CSS template.



CC BY-NC-SA 4.0 Rik Huijzer, and contributors