<?xml version="1.0" encoding="utf-8"?>



<feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:fh="http://purl.org/syndication/history/1.0"
    xmlns:at="http://purl.org/atompub/tombstones/1.0">

    <title>Publ: File formats</title>
    <subtitle>A personal publishing system for the modern web</subtitle>
    <link href="https://publ.beesbuzz.biz/manual/formats/feed" rel="self" />
    <link href="https://publ.beesbuzz.biz/manual/formats/feed" rel="current" />
    <link href="https://busybee.superfeedr.com" rel="hub" />
    
    
    <link href="https://publ.beesbuzz.biz/manual/formats/" />
    
    <id>tag:publ.beesbuzz.biz,2020-01-07:manual/formats</id>
    <updated>2019-08-10T01:46:14-07:00</updated>

    
    <entry>
        <title>User configuration file</title>
        <link href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file" rel="alternate" type="text/html" />
        <published>2019-08-10T01:46:14-07:00</published>
        <updated>2019-08-10T01:46:14-07:00</updated>
        <id>urn:uuid:144f6409-7745-518c-bcbc-dc30050f8839</id>
        <author><name>fluffy</name></author>
        <content type="html">
<![CDATA[
<p>The file format for configuring user authentication.</p>

<p>The authentication file, normally stored in <code>users.cfg</code> unless <a href="https://publ.beesbuzz.biz/api/python">configured differently</a>, stores a set of permissions groups for different authenticated users.</p><p>The format is pretty simple:</p><figure class="blockcode"><pre class="highlight" data-language="cfg" data-line-numbers><span class="line" id="e1341cb1L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L1"></a><span class="line-content"><span class="k">[admin]</span></span></span>
<span class="line" id="e1341cb1L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L2"></a><span class="line-content"><span class="na">http</span><span class="o">:</span><span class="s">//example.com/</span></span></span>
<span class="line" id="e1341cb1L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L3"></a><span class="line-content"><span class="na">mailto</span><span class="o">:</span><span class="s">me@example.com</span></span></span>
<span class="line" id="e1341cb1L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L4"></a><span class="line-content"></span></span>
<span class="line" id="e1341cb1L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L5"></a><span class="line-content"><span class="k">[friends]</span></span></span>
<span class="line" id="e1341cb1L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L6"></a><span class="line-content"><span class="na">mailto</span><span class="o">:</span><span class="s">someone@example.com</span></span></span>
<span class="line" id="e1341cb1L7"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L7"></a><span class="line-content"><span class="na">mailto</span><span class="o">:</span><span class="s">someone-else@example.com</span></span></span>
<span class="line" id="e1341cb1L8"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L8"></a><span class="line-content"><span class="na">http</span><span class="o">:</span><span class="s">//example.com/~friend/</span></span></span>
<span class="line" id="e1341cb1L9"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L9"></a><span class="line-content"><span class="na">good-friends</span></span></span>
<span class="line" id="e1341cb1L10"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L10"></a><span class="line-content"></span></span>
<span class="line" id="e1341cb1L11"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L11"></a><span class="line-content"><span class="k">[enemies]</span></span></span>
<span class="line" id="e1341cb1L12"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L12"></a><span class="line-content"><span class="na">mailto</span><span class="o">:</span><span class="s">mark@facebook.com</span></span></span>
<span class="line" id="e1341cb1L13"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L13"></a><span class="line-content"><span class="na">http</span><span class="o">:</span><span class="s">//tumblr.com/</span></span></span>
<span class="line" id="e1341cb1L14"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L14"></a><span class="line-content"></span></span>
<span class="line" id="e1341cb1L15"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L15"></a><span class="line-content"><span class="k">[good-friends]</span></span></span>
<span class="line" id="e1341cb1L16"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb1L16"></a><span class="line-content"><span class="na">https</span><span class="o">:</span><span class="s">//beesbuzz.biz/</span></span></span>
</pre></figure><p>Simply put, each group is indicated by <code>[group_name]</code>, and each line after the group name indicates the authenticated identities (and other groups) which are a part of that group. So, in this case, anyone who is in the <code>good-friends</code> group will also be in the <code>friends</code> group.  All identities are given as full URIs.</p><p>Identities can also be used as a group name, to help manage those folks who have more than one identity that you want to treat equivalently; for example:</p><figure class="blockcode"><pre class="highlight" data-language="cfg" data-line-numbers><span class="line" id="e1341cb2L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb2L1"></a><span class="line-content"><span class="k">[https://beesbuzz.biz]</span></span></span>
<span class="line" id="e1341cb2L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb2L2"></a><span class="line-content"><span class="na">mailto</span><span class="o">:</span><span class="s">fluffy@beesbuzz.biz</span></span></span>
<span class="line" id="e1341cb2L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb2L3"></a><span class="line-content"><span class="c1">; Twitter URLs are given in /i/user/NNNNN format; this allows things to keep</span></span></span>
<span class="line" id="e1341cb2L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb2L4"></a><span class="line-content"><span class="c1">; working if a user changes their username, and prevents others from hijacking</span></span></span>
<span class="line" id="e1341cb2L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb2L5"></a><span class="line-content"><span class="c1">; their identity as well.</span></span></span>
<span class="line" id="e1341cb2L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb2L6"></a><span class="line-content"><span class="na">https</span><span class="o">:</span><span class="s">//twitter.com/i/user/993171</span></span></span>
<span class="line" id="e1341cb2L7"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file#e1341cb2L7"></a><span class="line-content"><span class="na">https</span><span class="o">:</span><span class="s">//plush.city/@fluffy</span></span></span>
</pre></figure><p>This will give the identities <a href="mailto:fluffy@beesbuzz.biz"><code>mailto:fluffy@beesbuzz.biz</code></a>, <a href="https://twitter.com/i/user/993171"><code>https://twitter.com/i/user/993171</code></a>, and <a href="https://plush.city/@fluffy"><code>https://plush.city/@fluffy</code></a> membership in all groups that <a href="https://beesbuzz.biz"><code>https://beesbuzz.biz</code></a> is in as well. However, the opposite is not true; <code>https://beesbuzz.biz</code> won&rsquo;t automatically have access to entries that are only allowed for <code>https://plush.city/@fluffy</code>, for example.</p><p>Any identities which belong to the administrative group (which is <code>admin</code> by default but can configured differently) will have access to all entries, as well as the administrative dashboard. Otherwise, users are subject to the <a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#auth">permissions system</a>.</p><p>You can also start a line with <code>#</code> or <code>;</code> to indicate that it is a comment.</p>

]]>
        </content>
    </entry>
    
    <entry>
        <title>Category file format</title>
        <link href="https://publ.beesbuzz.biz/manual/formats/1204-Category-file-format" rel="alternate" type="text/html" />
        <published>2018-12-22T00:00:17-08:00</published>
        <updated>2018-12-22T00:00:17-08:00</updated>
        <id>urn:uuid:bcd60715-31ef-5ccb-9f3a-f5a225c0e0ac</id>
        <author><name>fluffy</name></author>
        <content type="html">
<![CDATA[
<p>How to specify metadata for categories.</p>

]]>
        </content>
    </entry>
    
    <entry>
        <title>Entry files</title>
        <link href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files" rel="alternate" type="text/html" />
        <published>2018-04-02T14:04:32-07:00</published>
        <updated>2019-05-08T07:39:26+00:00</updated>
        <id>urn:uuid:9b03da44-da6a-46a7-893a-d4ecbe813681</id>
        <author><name>fluffy</name></author>
        <content type="html">
<![CDATA[
<p>A guide to writing page content for Publ.</p>

<h2 id="322_h2_1_Overall-format"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h2_1_Overall-format"></a>Overall format</h2><p>Publ entries are files saved as <code>.md</code> or <code>.html</code> in your content directory. An
entry consists of three parts: Headers, above-the-fold, and below-the-fold (also
known as a &ldquo;cut&rdquo;).</p><p>Here is what an entry might look like:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb1L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L1"></a><span class="line-content">Title: My first blog entry</span></span>
<span class="line" id="e322cb1L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L2"></a><span class="line-content">Date: 2018/01/04 12:34PM</span></span>
<span class="line" id="e322cb1L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L3"></a><span class="line-content">Category: /blog/random</span></span>
<span class="line" id="e322cb1L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L4"></a><span class="line-content"></span></span>
<span class="line" id="e322cb1L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L5"></a><span class="line-content">Hi, this is my first blog entry. I guess I don&#39;t have a lot to say.</span></span>
<span class="line" id="e322cb1L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L6"></a><span class="line-content"></span></span>
<span class="line" id="e322cb1L7"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L7"></a><span class="line-content">.....</span></span>
<span class="line" id="e322cb1L8"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L8"></a><span class="line-content"></span></span>
<span class="line" id="e322cb1L9"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb1L9"></a><span class="line-content">Well, maybe a *little* more.</span></span>
</pre></figure><h2 id="322_h2_2_Headers"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h2_2_Headers"></a><span id="headers">Headers</span></h2><p>Headers follow the <a href="https://datatracker.ietf.org/doc/html/rfc2822">RFC 2822</a>
email message format. They are, more or less, a series of lines like:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb2L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb2L1"></a><span class="line-content">Header-Name: Header-Value</span></span>
<span class="line" id="e322cb2L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb2L2"></a><span class="line-content">Another-Header-Name: Header-Value</span></span>
</pre></figure><p>followed by a blank line. Long values can also be split on multiple lines by
using a hanging indent:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb3L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb3L1"></a><span class="line-content">Header-Name: Long value which continues</span></span>
<span class="line" id="e322cb3L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb3L2"></a><span class="line-content">    on to a second line and maybe</span></span>
<span class="line" id="e322cb3L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb3L3"></a><span class="line-content">    a third</span></span>
</pre></figure><p>You can define whatever headers you want for your templates, and can also have
multiple headers of the same name. For example:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb4L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb4L1"></a><span class="line-content">My-Header: foo</span></span>
<span class="line" id="e322cb4L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb4L2"></a><span class="line-content">My-Header: bar</span></span>
<span class="line" id="e322cb4L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb4L3"></a><span class="line-content">My-Header: baz</span></span>
</pre></figure><p>Header names are case-insensitive (so, for example, <code>my-header</code>, <code>My-header</code>,
and <code>My-HEADER</code> all mean the same thing).</p><p>When using these headers from a template, they appear as part of their <a href="https://publ.beesbuzz.biz/manual/api/115-Entry-objects">entry object</a>, and can be accessed using the <a href="https://publ.beesbuzz.biz/manual/api/115-Entry-objects#get"><code>get</code> mechanism</a>.</p><h3 id="322_h3_3_Publ-defined-headers"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h3_3_Publ-defined-headers"></a>Publ-defined headers</h3><p>Publ defines a number of headers for its own use. They are as follows:</p>
<ul>
<li><p><strong><code>Title</code></strong>: The display title of the entry</p><p><strong>Default value</strong>: None</p></li>
<li><p><span id="sort-title"><strong><code>Sort-Title</code></strong>: The sorting title of the entry</span></p><p>This affects the title for the purpose of <a href="https://publ.beesbuzz.biz/manual/api/150-View-object#order">sorting</a>, but is otherwise unused.
If none is given it defaults to the entry&rsquo;s display title.</p></li>
<li><p><strong><code>Entry-ID</code></strong>: The numerical ID of the entry</p><p>This must be unique across all
entries and will be automatically assigned if missing. It must also be just
a number.</p><p>Entry IDs also provide a convenient linking mechanism; this entry has ID of 322 so
<a href="https://publ.beesbuzz.biz/322">a link to /322</a> or <a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files">322</a> works fine regardless of where the
entry gets moved to in the future.</p></li>
<li><p><span id="date"><strong><code>Date</code></strong>: The publication date and time</span></p><p>This can be in any format that <a href="http://arrow.readthedocs.io">Arrow</a>
understands. If no timezone is specified it will use the timezone indicated
in <code>config.py</code>.</p><p><strong>Default value</strong>: the modification time of the entry file (which will be added to the
file for later).</p><p>If you set this to a non-date value (e.g. <code>now</code>) then it will be replaced with the
file modification time when the file is scanned, as if the header were omitted.</p></li>
<li><p><strong><code>Category</code></strong>: Which category to put this entry in</p><p><strong>Default value:</strong> the entry file&rsquo;s directory</p></li>
<li><p><span id="status"><strong><code>Status</code></strong>: The publish status of the entry</span></p><p>Allowed values:</p>
<ul>
<li><p><code>DRAFT</code>: This entry is not visible at all</p></li>
<li><p><code>HIDDEN</code>: This entry is visible when accessed directly, but will not be included in entry listings or in previous/next links</p></li>
<li><p><code>UNLISTED</code>: A synonym for <code>HIDDEN</code></p></li>
<li><p><code>ATTACHMENT</code>: Similar to <code>HIDDEN</code>, except it will also be included in an entry&rsquo;s attachment list</p></li>
<li><p><code>ATTACH</code>: A synonym for <code>ATTACHMENT</code></p></li>
<li><p><code>PUBLISHED</code>: This entry is visible at all times</p></li>
<li><p><code>SCHEDULED</code>: Until the publication date, this acts as <code>HIDDEN</code>; afterwards, it acts as <code>PUBLISHED</code></p></li>
<li><p><code>GONE</code>: The entry has been deleted and will not be coming back; attempts to access this entry will result in an HTTP 410 GONE error</p></li>
<li><p><code>DELETED</code>: A synonym for <code>GONE</code></p></li>
</ul>
<p><strong>Default value:</strong> <code>SCHEDULED</code></p></li>
<li><p><strong><code>Slug-Text</code></strong>: The human-readable part of the URL</p><p>In some circles this is known as &ldquo;SEO text.&rdquo;</p><p><strong>Default value:</strong> the entry title</p></li>
<li><p><span id="redirect-to"><strong><code>Redirect-To</code></strong>: A URL to redirect this entry to</span></p><p>This is useful if you want to remove an entry and redirect to another entry, or if
you want an entry to be a placeholder for some external content (e.g. when the entry
was syndicated from an external source).</p></li>
<li><p><span id="path-alias"><strong><code>Path-Alias</code></strong>: An alternate path to this entry</span></p><p>This is useful for providing easy-to-remember short names for an entry, and
for redirecting old, non-Publ URLs to this entry. For example, if you&rsquo;re
migrating from a legacy site and you have a URL like
<code>http://example.com/blog/0012345.php</code> you can set a header like:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb5L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb5L1"></a><span class="line-content">Path-Alias: /blog/0012345.php</span></span>
</pre></figure><p>Any number of these may be added to any given URL.</p><p>For example, this entry has a <code>Path-Alias</code> of <a href="https://publ.beesbuzz.biz/entry-format"><code>/entry-format</code></a>,
and the template format page can be similarly reached at <a href="https://publ.beesbuzz.biz/template-format"><code>/template-format</code></a>.</p><p><strong>Note:</strong> A path-alias will never override another entry at its canonical URL;
however, it can potentially override any other kind of URL, including URLs for
category views and non-canonical entry URLs.</p><p>You can also optionally specify a category template to use, by writing it after the aliased path:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb6L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb6L1"></a><span class="line-content">Path-Alias: /blog/0012345.php archive</span></span>
</pre></figure><p>which will cause the legacy URL to remap to showing this view within the category using the <code>archive</code> template.
If you would like to just go to the category without any specific template, use <code>index</code>.</p><p>The path portion is URL-encoded; for example:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb7L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb7L1"></a><span class="line-content">Path-Alias: /entry%20with%20spaces</span></span>
<span class="line" id="e322cb7L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb7L2"></a><span class="line-content">Path-Alias: %28parentheses%29</span></span>
</pre></figure><p>Typically, only whitespace and percent signs must be URL-encoded.</p></li>
<li><p><span id="path-mount"><strong><code>Path-Mount</code></strong>: An alternate path to this entry</span></p><p>This is similar to <a href="https://publ.beesbuzz.biz/manual/formats/feed#path-alias"><code>Path-Alias</code></a>, except that the browser will not be redirected to the canonical location; for example, if you have an entry like:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb8L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb8L1"></a><span class="line-content">Title: Test</span></span>
<span class="line" id="e322cb8L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb8L2"></a><span class="line-content">Category: blog</span></span>
<span class="line" id="e322cb8L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb8L3"></a><span class="line-content">Entry-ID: 12345</span></span>
<span class="line" id="e322cb8L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb8L4"></a><span class="line-content">Path-Mount: /faq</span></span>
</pre></figure><p>then both <code>/blog/12345-test</code> and <code>/faq</code> will render as the entry directly.</p><p>Also, unlike <code>Path-Alias</code>, if a template is specified, this will be treated as an <em>entry</em> template (i.e. there will be an <code>entry</code> object and no <code>view</code> object).</p></li>
<li><p><span id="path-canonical"><strong><code>Path-Canonical</code></strong>: Specify the canonical path to this entry</span></p><p><strong>Default value:</strong> <code>/{category}/{entry id}-{slug text}</code> (for example, <code>/articles/general/1924-this-is-a-test</code>)</p><p>For example, if there&rsquo;s an entry with:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb9L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb9L1"></a><span class="line-content">Title: Test</span></span>
<span class="line" id="e322cb9L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb9L2"></a><span class="line-content">Category: blog</span></span>
<span class="line" id="e322cb9L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb9L3"></a><span class="line-content">Entry-ID: 12345</span></span>
<span class="line" id="e322cb9L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb9L4"></a><span class="line-content">Path-Alias: /faq.html</span></span>
<span class="line" id="e322cb9L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb9L5"></a><span class="line-content">Path-Canonical: /faq</span></span>
<span class="line" id="e322cb9L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb9L6"></a><span class="line-content">Path-Mount: /faque</span></span>
</pre></figure><p>then any access to <code>/blog/12345-test</code>, <code>/blog/12345</code>, <code>/12345</code>, <code>/faq.html</code>, etc. will be redirected to <code>/faq</code>.  However, <code>Path-Mount</code> paths (<code>/faque</code> in the above example) will still be a non-redirecting alias.</p><p>As with <code>Path-Mount</code>, if a template is specified then this will be treated as an entry template.</p><p>If you specify more than one <code>Path-Canonical</code> header, all but one of them will be treated as <code>Path-Mount</code> instead; it is undefined as to which one becomes the canonical path.</p></li>
<li><p><strong><code>UUID</code></strong>: A globally-unique identifier for the entry</p><p>While Publ doesn&rsquo;t use this internally, having this sort of generated ID is
useful for Atom feeds and the like. As such, a UUID will be automatically
generated if not present.</p><p>It is <em>highly recommended</em> (but not technically required) that this be
unique to every entry, including between different websites.</p></li>
<li><p><span id="entry-type"><strong><code>Entry-Type</code></strong>: An arbitrary string which you can use
to define an entry type</span></p><p>This allows you to differentiate entry types however you want; with this you
can, for example, set up something similar to what WordPress and Tumblr call
&ldquo;page&rdquo;-type content, or use this to manage entries within a navigation
sidebar or a linkroll or the like.</p><p>Note that this is intended for affecting the layout/structure of the site,
and each entry only has a single type. If you set more than one, only one of
them will be used (and which one is undefined). For making content that can
be filtered on multiple criteria, use <a href="https://publ.beesbuzz.biz/manual/formats/feed#tag">tags</a> instead.</p></li>
<li><p><span id="template-override"><strong><code>Entry-Template</code></strong></span>: Use the specified
template instead of <code>entry</code> when rendering this entry</p></li>
<li><p><span id="last-modified"><strong><code>Last-Modified</code></strong>: The date to use for the
last-modified time for this entry.</span></p><p>Like with <code>Date</code>, if you set this to a non-date value (e.g. <code>now</code>) then it
will be replaced with the file modification time when the file is scanned.</p><p><strong>Default value:</strong> the entry&rsquo;s <code>Date</code></p></li>
<li><p><span id="tag"><strong><code>Tag</code></strong>: Add the specified tag to the entry. To add more than
one tag, use separate <code>Tag:</code> headers.</span></p></li>
<li><p><span id="hiddentag"><strong><code>Hidden-Tag</code></strong>: Like <code>Tag</code>, but the tag will not appear
in the entry&rsquo;s tag list. This lets you filter an entry without making its
filter criteria visible.</span></p></li>
<li><p><span id="summary"><strong><code>Summary</code></strong></span>: A plain-text summary/description of
the entry. Markdown is supported.</p><p><strong>Default value:</strong> The first paragraph of text in the entry body.</p></li>
<li><p><span id="auth"><strong><code>Auth</code></strong>: A list of permissions for who can and cannot see
the entry.</span></p><p>This is a list of identities or groups, separated by spaces.
Identities/groups which start with a <code>!</code> means that they <em>cannot</em> access the
entry. For example, this line:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb10L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb10L1"></a><span class="line-content">Auth: friends !mailto:erik@example.com</span></span>
</pre></figure><p>means that members of <code>friends</code> can access the entry, but not
<code>erik@example.com</code> (even if they are a member of <code>friends</code>).</p><p>This list can grow arbitrarily long, and the rightmost rule wins.</p><p>There is also a special access group, <code>*</code>, which just refers to anyone who
is logged in; for example:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb11L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb11L1"></a><span class="line-content">Auth: *</span></span>
</pre></figure><p>will be visible to anyone who is logged in, and</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb12L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb12L1"></a><span class="line-content">Auth: !*</span></span>
</pre></figure><p>will only be visible to anyone who is <em>not</em> logged in. These rules can also
stack; for example:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb13L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb13L1"></a><span class="line-content">Auth: * !enemies mailto:bob@example.com</span></span>
</pre></figure><p>will be visible to anyone who&rsquo;s logged in except for members of the
<code>enemies</code> group, but <code>mailto:bob@example.com</code> will be allowed even if they
are in <code>enemies</code>. This is one way that you can make an entry which is open
to everyone <em>except</em> people who have been blocked, for example.</p><p>Note that identities won&rsquo;t necessarily be an email address; they are only
listed as such here for illustrative purposes. For example, a Mastodon user
will appear as e.g. <code>https://plush.city/@fluffy</code>. See the <a href="https://publ.beesbuzz.biz/manual/formats/1341-User-configuration-file">user
configuration file</a> and <a href="https://publ.beesbuzz.biz/manual/admin">admin guide</a> for more information.</p><p><mark>Note:</mark> Only a single <code>Auth:</code> header is supported. If more than one is
present, only one will be used, and it is undefined as to which one that is.
If you want nicer formatting on long per-entry access lists, you can format
it using hanging indents:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb14L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb14L1"></a><span class="line-content">Title: Bob&#39;s surprise birthday party</span></span>
<span class="line" id="e322cb14L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb14L2"></a><span class="line-content">Auth: mailto:someone@example.com</span></span>
<span class="line" id="e322cb14L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb14L3"></a><span class="line-content">    mailto:someone-else@example.com</span></span>
<span class="line" id="e322cb14L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb14L4"></a><span class="line-content">    friends</span></span>
<span class="line" id="e322cb14L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb14L5"></a><span class="line-content">    !bob</span></span>
</pre></figure></li>
<li><p><span id="attach"><strong><code>Attach</code></strong>: Another entry to &ldquo;attach&rdquo; to this one, useful for defining arbitrary content sections or the like. This can be by file path or by entry ID.</p><p>This is to be used with the <a href="https://publ.beesbuzz.biz/manual/api/115-Entry-objects#attachments"><code>entry.attachments</code></a> and <a href="https://publ.beesbuzz.biz/manual/api/115-Entry-objects#attached"><code>entry.attached</code></a> template functions, as well as the related <a href="https://publ.beesbuzz.biz/manual/api/150-View-object#attachments">view parameters</a></p></li>
</ul>
<h2 id="322_h2_4_Entry-content"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h2_4_Entry-content"></a><span id="markdown-extensions">Entry content</span></h2><p>After the headers, you can have entry content; if the file has a <code>.htm</code> or <code>.html</code>
extension it will just render directly as HTML (with internal <code>href</code> and <code>src</code> links rewritten to local files and entries), but with a <code>.md</code> extension it will
render as <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a>.</p><p>Publ supports a number of extensions to Markdown, specifically via <a href="http://misaka.61924.nl">Misaka</a> (which in turn uses <a href="https://github.com/hoedown/hoedown" title="My, Earth certainly is full of things!">Hoedown</a>). The extensions are <a href="https://publ.beesbuzz.biz/manual/865-Python-API#markdown_extensions">configurable</a>; by default it is configured to resemble <a href="https://guides.github.com/features/mastering-markdown/">GitHub-flavored markdown</a> with the addition of <a href="https://kramdown.gettalong.org/syntax.html#math-blocks">Kramdown-style math</a> (which in turn works with <a href="https://mathjax.org/">MathJax</a> or <a href="https://katex.org/">KaTeX</a>).</p><p>Markdown entries can use code fences, which support syntax highlighting via <a href="http://pygments.org">Pygments</a>; see its <a href="http://pygments.org/docs/lexers/">rather large list of syntaxes</a>. There are <a href="https://publ.beesbuzz.biz/manual/formats/feed#fenced-code">Publ-specific extensions</a> to this.</p><p>There are also some Publ-specific extensions for things like cuts, image renditions, and galleries.</p><h3 id="322_h3_5_Custom-tags"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h3_5_Custom-tags"></a>Custom tags</h3>
<ul>
<li><strong><code>.....</code></strong>: Indicates the cut from above-the-fold to below-the-fold content (must be on a line by itself)</li>
</ul>
<h3 id="322_h3_6_Images"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h3_6_Images"></a><span name="image-renditions">Images</span></h3><p>Publ extends the standard Markdown image tag (<code>![](imageFile)</code>) syntax with some added features for
generating display-resolution-independent renditions and <a href="http://lokeshdhakar.com/projects/lightbox2/">Lightbox</a> galleries. The syntax is based on the standard Markdown for an image, which is:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb15L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb15L1"></a><span class="line-content">![<span class="nt">alt text</span>](<span class="na">image-path.jpg &quot;title text&quot;</span>)</span></span>
</pre></figure><p>(where <code>alt text</code> and <code>&quot;title text&quot;</code> are optional), but it adds a few features:</p>
<ul>
<li><p>Multiple images can be specified in the image list, separated by <code>|</code> characters; for example:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb16L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb16L1"></a><span class="line-content">![](image1.jpg &quot;title text&quot; | image2.jpg | image3.jpg &quot;also title text&quot;)</span></span>
</pre></figure></li>
<li><p>Images can be configured by adding <code>{arguments}</code> to the filename portion or to the alt text; for example:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb17L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb17L1"></a><span class="line-content">&lt;!-- A single image being configured --&gt;</span></span>
<span class="line" id="e322cb17L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb17L2"></a><span class="line-content">![](image.jpg{width=320,height=200})</span></span>
<span class="line" id="e322cb17L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb17L3"></a><span class="line-content"></span></span>
<span class="line" id="e322cb17L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb17L4"></a><span class="line-content">&lt;!-- Three images configured to a width of 640, with one of them further overridden --&gt;</span></span>
<span class="line" id="e322cb17L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb17L5"></a><span class="line-content">![<span class="nt">{width=640}</span>](<span class="na">image1.jpg | image2.jpg{width=320} &quot;this one is narrower&quot; | image3.jpg</span>)</span></span>
</pre></figure></li>
</ul>
<p>You can also specify the width and height as the first one or two unnamed arguments to an argument list;
for example, these two invocations are equivalent:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb18L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb18L1"></a><span class="line-content">![<span class="nt">{320,240}</span>](<span class="na">image1.jpg | image2.jpg | image3.jpg</span>)</span></span>
<span class="line" id="e322cb18L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb18L2"></a><span class="line-content"></span></span>
<span class="line" id="e322cb18L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb18L3"></a><span class="line-content">![<span class="nt">{width=320,height=240}</span>](<span class="na">image1.jpg | image2.jpg | image3.jpg</span>)</span></span>
</pre></figure><p>For the shorthand notation, if you want to specify only height you can use <code>None</code> for the width, e.g.:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb19L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb19L1"></a><span class="line-content">![<span class="nt">{None,240}</span>](<span class="na">image1.jpg | image2.jpg | image3.jpg</span>)</span></span>
</pre></figure><p>For a full list of the configurations available, please see the manual entry on <a href="https://publ.beesbuzz.biz/image-renditions#arguments">image renditions</a>.</p><p>If the image path is absolute (i.e. starts with a <code>/</code>) it will search for the image within the content directory. Otherwise it will search in the following order:</p>
<ol>
<li>Relative to the entry file</li>
<li>Relative to the entry category in the content directory</li>
</ol>
<p>So, for example, if content directory is <code>content/entries</code> and your entry is in
<code>content/entries/photos/my vacation/vacation.md</code> but indicates a category of <code>photos</code>,
and you have your static directory set to <code>content/static</code>,
an image called <code>DSC_12345.jpg</code> will be looked up in the following order:</p>
<ol>
<li><code>content/entries/photos/my vacation/DSC_12345.jpg</code></li>
<li><code>content/entries/photos/DSC_12345.jpg</code></li>
</ol>
<p>Relative paths will also be interpreted, including <code>../</code> parent directory paths.</p><p>This approach allows for greater flexibility in how you manage your images; the simple
case is that the files simply live in the same directory as the entry file, and in more complex cases
things work in a hopefully-intuitive manner.</p><p>Of course, external absolute URLs (e.g. <code>http://example.com/image.jpg</code> or <code>//example.com/protocol-relative.gif</code>) are still allowed, although they are
more limited in what you can do with them (for example, scaling will be done client-side and cropping
options will not work). Also, keep in mind that URLs that are not under your control may change without notice.</p><p>This functionality is also available for links to images; for example:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb20L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb20L1"></a><span class="line-content">Here is [<span class="nt">a graph I made</span>](<span class="na">my-graph.png</span>).</span></span>
</pre></figure><p>In this variant you can also specify the image attributes:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb21L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb21L1"></a><span class="line-content">Here is [<span class="nt">the same graph at smaller size</span>](<span class="na">my-graph.png{320,240}</span>),</span></span>
<span class="line" id="e322cb21L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb21L2"></a><span class="line-content">and here it is [<span class="nt">as a JPEG</span>](<span class="na">my-graph.png{format=&#39;jpg&#39;}</span>).</span></span>
</pre></figure><p>Note that these links to images do <em>not</em> inherit the default image arguments from the page template (this is by design). And, of course, only a single image is supported.</p><h4 id="322_h4_7_Image-sets"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h4_7_Image-sets"></a>Image sets</h4><p>To support image sets, the following options can be added to the <code>alt text</code> section to wrap the image(s) in a <code>&lt;div&gt;</code>:</p>
<ul>
<li><strong><code>div_class</code></strong>: Sets the <code>class</code> attribute on the containing <code>&lt;div&gt;</code></li>
<li><strong><code>div_style</code></strong>: A string or list of strings which are added to the containing <code>&lt;div&gt;</code>&rsquo;s <code>&lt;style&gt;</code> element</li>
</ul>
<p>For example, this Markdown fragment:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb22L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb22L1"></a><span class="line-content">![<span class="nt">{div_class=&quot;foo&quot;}</span>](<span class="na">test.jpg | test2.jpg</span>)</span></span>
</pre></figure><p>will produce the equivalent of the following HTML:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb23L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb23L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;foo&quot;</span><span class="p">&gt;&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;test.jpg&quot;</span><span class="p">&gt;&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;test2.jpg&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">div</span><span class="p">&gt;</span></span></span>
</pre></figure><h4 id="322_h4_8_HTML-tags"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h4_8_HTML-tags"></a>HTML tags</h4><p>HTML <code>&lt;img&gt;</code> tags will use their <code>width</code> and <code>height</code> attributes to determine the image rendition size. For example:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb24L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb24L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;foo.jpg&quot;</span> <span class="na">width</span><span class="o">=</span><span class="s">&quot;320&quot;</span> <span class="na">height</span><span class="o">=</span><span class="s">&quot;200&quot;</span> <span class="na">title</span><span class="o">=</span><span class="s">&quot;Custom title&quot;</span><span class="p">&gt;</span></span></span>
</pre></figure><p>is equivalent to:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb25L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb25L1"></a><span class="line-content">![](foo.jpg{320,200} &quot;Custom title&quot;)</span></span>
</pre></figure><p>You can also use most of the Markdown image rendition flags, for example:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb26L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb26L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;foo.jpg{200,format=&#39;png&#39;}&quot;</span> <span class="na">title</span><span class="o">=</span><span class="s">&quot;Converted to PNG at 200 pixels across&quot;</span><span class="p">&gt;</span></span></span>
</pre></figure><p>This <code>&lt;img&gt;</code> functionality is available on both HTML and Markdown entries.</p><h3 id="322_h3_9_Linking-to-things"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h3_9_Linking-to-things"></a><span id="link-targets"></span>Linking to things</h3><p>Both Markdown and HTML entries support a number of enhancements to how link targets are handled; this allows the transparent use of local file paths in your entries.</p><p>In HTML tags, this applies to all <code>href</code> and <code>src</code> attributes (e.g. <code>&lt;a href=&quot;example.md&quot;&gt;link&lt;/a&gt;</code> and <code>&lt;audio src=&quot;example.mp3&quot; controls&gt;</code>).</p><p>In Markdown entries, this also applies to images (e.g. <code>![](example.jpg)</code>) and hyperlinks (e.g. <code>[example link](example.md)</code>) in addition to applying to embedded HTML content.</p><p><span id="rendition-attrs">In HTML tags, you can also force this to apply to other attributes by prefixing them with a $, which is useful for supporting various JavaScript libraries and the like.</span> For example:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb27L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb27L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">img</span> <span class="err">$</span><span class="na">data-ondemand</span><span class="o">=</span><span class="s">&quot;image.jpg{320,320}&quot;</span><span class="p">&gt;</span>  <span class="cm">&lt;!-- becomes &lt;img data-ondemand=&quot;/path/to/image_320x320.jpg&quot;&gt; --&gt;</span></span></span>
<span class="line" id="e322cb27L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb27L2"></a><span class="line-content"></span></span>
<span class="line" id="e322cb27L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb27L3"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">iframe</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;other-entry.md&quot;</span><span class="p">&gt;</span>  <span class="cm">&lt;!-- becomes &lt;iframe src=&quot;/category/1234-other-entry&quot;&gt; --&gt;</span></span></span>
<span class="line" id="e322cb27L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb27L4"></a><span class="line-content"></span></span>
<span class="line" id="e322cb27L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb27L5"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;@some-asset.txt&quot;</span><span class="p">&gt;</span>  <span class="cm">&lt;!-- becomes &lt;a href=&quot;/static/some-asset.txt&quot;&gt; --&gt;</span></span></span>
</pre></figure><h4 id="322_h4_10_Local-files"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h4_10_Local-files"></a>Local files</h4><p>Entries can link to files that are stored within the content directory, using the same relative path rules as images. For example, if you have
a file <code>term paper.pdf</code> in the same directory as <code>my entry.md</code>, then from the entry you can link to it with:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb28L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb28L1"></a><span class="line-content">You want to read [<span class="nt">my paper</span>](<span class="na">term paper.pdf</span>)? Well here you go!</span></span>
</pre></figure><p>This also works in HTML links; for example:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb29L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb29L1"></a><span class="line-content">You want to read <span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;term paper.pdf&quot;</span><span class="p">&gt;</span>my paper<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>? I&#39;m flattered!</span></span>
</pre></figure><p>Any file type is supported; however, keep in mind that an HTML or Markdown file will be interpreted as an <a href="https://publ.beesbuzz.biz/manual/formats/feed#entry-links">entry</a>. If you would like to
serve one up as just their plain content, you can give it headers like:</p><figure class="blockcode"><pre class="highlight" data-language="publ" data-line-numbers><span class="line" id="e322cb30L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb30L1"></a><span class="line-content">Status: HIDDEN</span></span>
<span class="line" id="e322cb30L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb30L2"></a><span class="line-content">Entry-Template: _plain</span></span>
</pre></figure><p>and create a <code>templates/_plain.html</code> file that is simply:</p><figure class="blockcode"><pre class="highlight" data-language="jinja" data-line-numbers><span class="line" id="e322cb31L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb31L1"></a><span class="line-content"><span class="cp">{{</span><span class="nv">entry.body</span><span class="cp">}}</span></span></span>
<span class="line" id="e322cb31L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb31L2"></a><span class="line-content"><span class="cp">{%</span>- <span class="k">if</span> <span class="nv">entry.more</span> -<span class="cp">%}</span></span></span>
<span class="line" id="e322cb31L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb31L3"></a><span class="line-content"><span class="x">.....</span></span></span>
<span class="line" id="e322cb31L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb31L4"></a><span class="line-content"><span class="cp">{{</span><span class="nv">entry.more</span><span class="cp">}}</span></span></span>
<span class="line" id="e322cb31L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb31L5"></a><span class="line-content"><span class="cp">{%</span>- <span class="k">endif</span> -<span class="cp">%}</span></span></span>
</pre></figure><h4 id="322_h4_11_Static-assets"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h4_11_Static-assets"></a>Static assets</h4><p>Starting a link target with <code>@</code> acts as a shorthand for linking to a file in the static assets directory. For example,</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb32L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb32L1"></a><span class="line-content">[<span class="nt">here is a file</span>](<span class="na">@files/file.txt</span>)</span></span>
</pre></figure><p>will link to the file <code>files/file.txt</code> within the static files for the site. This is more portable than linking
to the static files directly, e.g. <code>/static/files/file.txt</code>.</p><p>This also applies to images (e.g. <code>![](@foo.jpg)</code> will display the image <code>/static/foo.jpg</code>), although it will be
treated the same way as an external image; if you want the image to be scaled to save bandwidth, it is better to
put it into your content tree instead.</p><p>When writing HTML, the following is equivalent to the above two examples:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb33L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb33L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;@files/file.txt&quot;</span><span class="p">&gt;</span>here is a file<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb33L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb33L2"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;@foo.jpg&quot;</span><span class="p">&gt;</span></span></span>
</pre></figure><h4 id="322_h4_12_Entries"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h4_12_Entries"></a><span id="entry-links"></span>Entries</h4><p>You can also link to an entry by its entry ID or by an absolute or relative file path to the source file. This also
supports anchors (<code>#</code>). Some examples:</p>
<ul>
<li><code>[link to entry 322](322)</code> &rarr; <a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files">link to entry 322</a></li>
<li><code>[link to `Template format.md`](Template format.md)</code> &rarr; <a href="https://publ.beesbuzz.biz/manual/formats/Template format.md">link to <code>Template format.md</code></a></li>
<li><code>[link to `/faq.md`](/faq.md)</code> &rarr; <a href="https://publ.beesbuzz.biz/faq">link to <code>/faq.md</code></a></li>
<li><code>[link to `../api/view.md#order`](../api/view.md#order)</code> &rarr; <a href="https://publ.beesbuzz.biz/manual/api/150-View-object#order">link to <code>../api/view.md#order</code></a></li>
</ul>
<p>And the HTML equivalents to the above:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb34L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb34L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;322&quot;</span><span class="p">&gt;</span>link to entry 322<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb34L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb34L2"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;Template format.md&quot;</span><span class="p">&gt;</span>Link to <span class="p">&lt;</span><span class="nt">code</span><span class="p">&gt;</span>Template format.md<span class="p">&lt;/</span><span class="nt">code</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb34L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb34L3"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;/faq.md&quot;</span><span class="p">&gt;</span>Link to <span class="p">&lt;</span><span class="nt">code</span><span class="p">&gt;</span>/faq.md<span class="p">&lt;/</span><span class="nt">code</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb34L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb34L4"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;../api/view.md#order&quot;</span><span class="p">&gt;</span>Link to <span class="p">&lt;</span><span class="nt">code</span><span class="p">&gt;</span>../api/view.md#order<span class="p">&lt;/</span><span class="nt">code</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
</pre></figure><p>As above, you can also use these in any HTML element with the <code>src</code>, <code>href</code>, or arbitrary attributes annotated with <code>$</code>; for example:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb35L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb35L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">iframe</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;some entry.md&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">iframe</span><span class="p">&gt;</span> <span class="cm">&lt;!-- by filename --&gt;</span></span></span>
<span class="line" id="e322cb35L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb35L2"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">div</span> <span class="err">$</span><span class="na">data-popup</span><span class="o">=</span><span class="s">&quot;12345#anchor&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> <span class="cm">&lt;!-- by entry ID --&gt;</span></span></span>
</pre></figure><h3 id="322_h3_13_Fenced-code-blocks"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h3_13_Fenced-code-blocks"></a><span id="fenced-code">Fenced code blocks</span></h3><p>As is typical for Markdown, Publ supports fenced code blocks, with a syntax like:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb36L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb36L1"></a><span class="line-content"><span class="sb">```language</span></span></span>
<span class="line" id="e322cb36L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb36L2"></a><span class="line-content"><span class="s">Text goes here</span></span></span>
<span class="line" id="e322cb36L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb36L3"></a><span class="line-content"><span class="s">More text</span></span></span>
<span class="line" id="e322cb36L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb36L4"></a><span class="line-content"><span class="s">More text</span></span></span>
<span class="line" id="e322cb36L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb36L5"></a><span class="line-content"><span class="sb">```</span></span></span>
</pre></figure><h4 id="322_h4_14_Syntax-extensions"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h4_14_Syntax-extensions"></a>Syntax extensions</h4><p>Publ allows you to add a title to a fenced code block, by putting it on the first line and prefixed with <code>!</code>:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb37L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb37L1"></a><span class="line-content"><span class="sb">```python</span></span></span>
<span class="line" id="e322cb37L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb37L2"></a><span class="line-content"><span class="err">!</span> <span class="n">example</span><span class="o">.</span><span class="n">py</span></span></span>
<span class="line" id="e322cb37L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb37L3"></a><span class="line-content"><span class="k">def</span><span class="w"> </span><span class="nf">foo</span><span class="p">():</span></span></span>
<span class="line" id="e322cb37L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb37L4"></a><span class="line-content">    <span class="k">return</span> <span class="kc">None</span></span></span>
<span class="line" id="e322cb37L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb37L5"></a><span class="line-content"><span class="sb">```</span></span></span>
</pre></figure><p>This will render as:</p><figure class="blockcode"><figcaption> example.py</figcaption><pre class="highlight" data-language="python" data-line-numbers><span class="line" id="e322cb38L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb38L1"></a><span class="line-content"><span class="k">def</span><span class="w"> </span><span class="nf">foo</span><span class="p">():</span></span></span>
<span class="line" id="e322cb38L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb38L2"></a><span class="line-content">    <span class="k">return</span> <span class="kc">None</span></span></span>
</pre></figure><p>Note: If you need the first line of code to start with a literal <code>!</code> character, put a blank line before it, or prefix it with a <code>\</code>. For example,</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb39L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb39L1"></a><span class="line-content"><span class="sb">```markdown</span></span></span>
<span class="line" id="e322cb39L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb39L2"></a><span class="line-content">\![<span class="nt">alt text</span>](<span class="na">image.jpg &quot;This is an image&quot;</span>)</span></span>
<span class="line" id="e322cb39L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb39L3"></a><span class="line-content"><span class="sb">```</span></span></span>
</pre></figure><p>renders as:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb40L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb40L1"></a><span class="line-content">![<span class="nt">alt text</span>](<span class="na">image.jpg &quot;This is an image&quot;</span>)</span></span>
</pre></figure><p>You can also provide template override arguments to the code block by putting parameters after the language declaration; for example:</p><figure class="blockcode"><pre class="highlight" data-language="markdown" data-line-numbers><span class="line" id="e322cb41L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L1"></a><span class="line-content">```{code_number_links=False}</span></span>
<span class="line" id="e322cb41L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L2"></a><span class="line-content">This block has had its line number links suppressed.</span></span>
<span class="line" id="e322cb41L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L3"></a><span class="line-content"><span class="sb">```</span></span></span>
<span class="line" id="e322cb41L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L4"></a><span class="line-content"></span></span>
<span class="line" id="e322cb41L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L5"></a><span class="line-content"><span class="sb">```bash{code_highlight=False}</span></span></span>
<span class="line" id="e322cb41L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L6"></a><span class="line-content"><span class="sb">cat &lt;&lt; EOF</span></span></span>
<span class="line" id="e322cb41L7"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L7"></a><span class="line-content"><span class="sb">This code has had highlighting disabled.</span></span></span>
<span class="line" id="e322cb41L8"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L8"></a><span class="line-content"></span></span>
<span class="line" id="e322cb41L9"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L9"></a><span class="line-content"><span class="sb">Test 1</span></span></span>
<span class="line" id="e322cb41L10"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L10"></a><span class="line-content"><span class="sb">Test 2</span></span></span>
<span class="line" id="e322cb41L11"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L11"></a><span class="line-content"><span class="sb">EOF</span></span></span>
<span class="line" id="e322cb41L12"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb41L12"></a><span class="line-content"><span class="sb">```</span></span></span>
</pre></figure><p>These render as:</p><figure class="blockcode"><pre><span class="line"><span class="line-content">This block has had its line number links suppressed.</span></span>
</pre></figure><figure class="blockcode"><pre data-language="bash"><span class="line"><span class="line-content">cat &lt;&lt; EOF</span></span>
<span class="line"><span class="line-content">This code has had highlighting disabled.</span></span>
<span class="line"><span class="line-content"></span></span>
<span class="line"><span class="line-content">Test 1</span></span>
<span class="line"><span class="line-content">Test 2</span></span>
<span class="line"><span class="line-content">EOF</span></span>
</pre></figure><h4 id="322_h4_15_HTML-output"><a href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#322_h4_15_HTML-output"></a>HTML output</h4><p>The overall code block structure is:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb44L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">figure</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;blockcode&quot;</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb44L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L2"></a><span class="line-content">    <span class="p">&lt;</span><span class="nt">figcaption</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb44L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L3"></a><span class="line-content">        Block caption</span></span>
<span class="line" id="e322cb44L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L4"></a><span class="line-content">    <span class="p">&lt;/</span><span class="nt">figcaption</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb44L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L5"></a><span class="line-content">    <span class="p">&lt;</span><span class="nt">pre</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb44L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L6"></a><span class="line-content">        /* code goes in here */</span></span>
<span class="line" id="e322cb44L7"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L7"></a><span class="line-content">    <span class="p">&lt;/</span><span class="nt">pre</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb44L8"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb44L8"></a><span class="line-content"><span class="p">&lt;/</span><span class="nt">figure</span><span class="p">&gt;</span></span></span>
</pre></figure><p>If a language is specified, the <code>&lt;pre&gt;</code> also gets <code>class=&quot;highlight&quot;</code> and a <code>data-language</code> attribute that is set to the language.</p><p>If code highlighting is enabled, the code is also run through <a href="https://pygments.org/">Pygments</a>.</p><p>If line number links are enabled, the <code>&lt;pre&gt;</code> gets an empty attribute of <code>data-line-numbers</code>.</p><p>Each line is wrapped in a <code>&lt;span class=&quot;line&quot;&gt;</code> and a <code>&lt;span class=&quot;line-content&quot;&gt;</code>, to allow for additional CSS formatting. If both <code>code_highlight</code> and <code>code_number_links</code> are enabled, there will also be a <code>&lt;a class=&quot;line-number&quot;&gt;&lt;/a&gt;</code> inserted before the <code>line-content</code> span, and the <code>line</code> span will have an ID that this links to. This allows for code-line permalinks:</p><figure class="blockcode"><pre class="highlight" data-language="html" data-line-numbers><span class="line" id="e322cb45L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L1"></a><span class="line-content"><span class="p">&lt;</span><span class="nt">pre</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L2"></a><span class="line-content">    <span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;xxxL1&quot;</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L3"></a><span class="line-content">        <span class="p">&lt;</span><span class="nt">a</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line-number&quot;</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;#xxxL1&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L4"></a><span class="line-content">        <span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line-content&quot;</span><span class="p">&gt;</span>first line<span class="p">&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L5"></a><span class="line-content">    <span class="p">&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L6"></a><span class="line-content">    <span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;xxxL2&quot;</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L7"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L7"></a><span class="line-content">        <span class="p">&lt;</span><span class="nt">a</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line-number&quot;</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;#xxxL2&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L8"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L8"></a><span class="line-content">        <span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line-content&quot;</span><span class="p">&gt;</span>second line<span class="p">&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L9"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L9"></a><span class="line-content">    <span class="p">&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L10"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L10"></a><span class="line-content">    <span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;xxxL3&quot;</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L11"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L11"></a><span class="line-content">        <span class="p">&lt;</span><span class="nt">a</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line-number&quot;</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;#xxxL3&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">a</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L12"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L12"></a><span class="line-content">        <span class="p">&lt;</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;line-content&quot;</span><span class="p">&gt;</span>third line<span class="p">&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L13"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L13"></a><span class="line-content">    <span class="p">&lt;/</span><span class="nt">span</span><span class="p">&gt;</span></span></span>
<span class="line" id="e322cb45L14"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L14"></a><span class="line-content">   ...</span></span>
<span class="line" id="e322cb45L15"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb45L15"></a><span class="line-content"><span class="p">&lt;/</span><span class="nt">pre</span><span class="p">&gt;</span></span></span>
</pre></figure><p>This markup is intended to be used with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters">CSS counters</a> to actually add the line numbering, which allows copy-and-paste to still function correctly. For a minimal example:</p><figure class="blockcode"><pre class="highlight" data-language="css" data-line-numbers><span class="line" id="e322cb46L1"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L1"></a><span class="line-content"><span class="p">.</span><span class="nc">highlight</span><span class="w"> </span><span class="p">{</span></span></span>
<span class="line" id="e322cb46L2"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L2"></a><span class="line-content"><span class="w">    </span><span class="k">counter-reset</span><span class="p">:</span><span class="w"> </span><span class="n">codeline</span><span class="p">;</span></span></span>
<span class="line" id="e322cb46L3"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L3"></a><span class="line-content"><span class="p">}</span></span></span>
<span class="line" id="e322cb46L4"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L4"></a><span class="line-content"></span></span>
<span class="line" id="e322cb46L5"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L5"></a><span class="line-content"><span class="p">.</span><span class="nc">highlight</span><span class="w"> </span><span class="p">.</span><span class="nc">line-number</span><span class="p">::</span><span class="nd">before</span><span class="w"> </span><span class="p">{</span></span></span>
<span class="line" id="e322cb46L6"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L6"></a><span class="line-content"><span class="w">    </span><span class="k">content</span><span class="p">:</span><span class="w"> </span><span class="nb">counter</span><span class="p">(</span><span class="n">codeline</span><span class="p">);</span></span></span>
<span class="line" id="e322cb46L7"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L7"></a><span class="line-content"><span class="w">    </span><span class="k">display</span><span class="p">:</span><span class="w"> </span><span class="kc">inline-block</span><span class="p">;</span></span></span>
<span class="line" id="e322cb46L8"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L8"></a><span class="line-content"><span class="w">    </span><span class="k">min-width</span><span class="p">:</span><span class="w"> </span><span class="mi">3</span><span class="kt">em</span><span class="p">;</span></span></span>
<span class="line" id="e322cb46L9"><a class="line-number" href="https://publ.beesbuzz.biz/manual/formats/322-Entry-files#e322cb46L9"></a><span class="line-content"><span class="p">}</span></span></span>
</pre></figure><p>For a more thorough example of how to format fancy code, look at the <a href="https://publ.beesbuzz.biz/static/fancy-code.css">code block CSS file</a> for this website.</p>

]]>
        </content>
    </entry>
    

    
</feed>