forked from kristapsdz/sblg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
article1.xml
52 lines (52 loc) · 3.14 KB
/
article1.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<article data-sblg-article="1" data-sblg-tags="howto">
<header>
<h2>How should one write articles?</h2>
<div>Posted by <address>Kristaps Dzonsons</address> on <time datetime="2013-06-30">30 June, 2013</time></div>
</header>
<aside>How to write blog article mark-up for sblg.</aside>
<p>
Articles are fragments or full XML documents (usually <a href="http://www.w3.org/html/wg/drafts/html/master/">HTML5</a>).
The simplest article is structured as follows:
</p>
<p class="code">
<code class="prettyprint lang-html"><article data-sblg-article="1"></code>
<code class="prettyprint lang-html tab"><header></code>
<code class="prettyprint lang-html dtab"><h1>Title</h1></code>
<code class="prettyprint lang-html dtab"><address>Kristaps Dzonsons</address></code>
<code class="prettyprint lang-html dtab"><time datetime="2013-01-01">1 January, 2013</time></code>
<code class="prettyprint lang-html tab"></header></code>
<code class="prettyprint lang-html tab"><aside></code>
<code class="prettyprint lang-html dtab">The article's <b>summary</b></code>
<code class="prettyprint lang-html tab"></aside></code>
<code class="prettyprint lang-html tab"><code>Mu.</code></code>
<code class="prettyprint lang-html"></article></code>
</p>
<p>
An article is any <code class="prettyprint lang-html"><article data-sblg-article="1"></code> Boolean attribute. The
article publication time is parsed from the first <code class="prettyprint lang-html"><time datetime=""></code> first
<code class="prettyprint lang-html"><header></code>.
The title is parsed from the first <code class="prettyprint lang-html"><hn></code> tag (where <var>n</var> = 1–4),
as is the author from the <code class="prettyprint lang-html"><address></code> tag.
These are used to order articles on the main page and title the article page.
Both of these are optional — the system will default to <q>Untitled article</q>, <q>Unknown author</q>, and the file's
ctime, if no information is otherwise provided.
Furthermore, the first <code class="prettyprint lang-html"><aside></code> is used for the <a href="article4.html">Atom</a> summary.
</p>
<p>
Articles are linked into a front page as follows (and omitting the surrounding HTML stuff):
</p>
<p class="code">
<code class="prettyprint lang-html"><body></code>
<code class="prettyprint lang-html tab"><nav data-sblg-nav="1" data-sblg-navsz="1" /></code>
<code class="prettyprint lang-html tab"><article data-sblg-article="1" /></code>
<code class="prettyprint lang-html tab"><article data-sblg-article="1" /></code>
<code class="prettyprint lang-html"></body></code>
</p>
<p>
Here, the <code class="prettyprint lang-html"><article></code> is replaced by ordered article data, with a little
<q>permanent link</q> thing following.
The <code class="prettyprint lang-html"><nav></code> is replaced by newest-first blog posting history. The rest is up to
you.
The <a href="sblg.1.html">sblg(1)</a> manual contains all the details.
</p>
</article>