English
About this handbook

This handbook belongs to the Quartz plugin quartz-layout-box. And it is built with it: this box is a layout box.

It comes from a Markdown file, not from the configuration — which way is better when is in The snippet.

2.2 – Where the file comes from

file is a name inside dir. The default for dir is quartz/static/snippets, counted from the root of the site:

options:
  dir: quartz/static/snippets   # default
  file: snippet.html            # -> darin

Subfolders are allowed: file: header/mark.html reads quartz/static/snippets/header/mark.html.

The line

A path leading out of dir is refused — the box outputs nothing and the build warns once:

options:
  file: ../../../etc/passwd   # refused

What is checked is not the string but the resolved path. A .. in the middle of the name helps as little as a link pointing out of the folder.

Why a line at all

The configuration of a Quartz site gets passed around — as a template package, as a repository, as an example in a forum. A file allowed to read any path on the machine would turn a shared entry into a tool for reading other people’s files. The line costs nothing and rules that out.

Why quartz/static/

The folder belongs to the site, not to the content. That is deliberate: a snippet is design, and design has no business in the vault — otherwise it shows up in the explorer, in the search and in the graph.

Everything under quartz/static/ is shipped by Quartz anyway. Which also means: the snippet files themselves are reachable through the site’s address. For markup that appears on every page anyway that is of no consequence — but it is not a place for anything meant to stay private.