-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy patharticle1.xml
More file actions
49 lines (49 loc) · 2.58 KB
/
article1.xml
File metadata and controls
49 lines (49 loc) · 2.58 KB
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
<article data-sblg-article="1" data-sblg-tags="howto">
<header>
<h2>How do I 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>
<pre class="prettyprint lang-html"><article data-sblg-article="1">
<header>
<h1>Title</h1>
<address>Kristaps Dzonsons</address>
<time datetime="2013-01-01">1 January, 2013</time>
</header>
<aside>
The article's <b>summary</b>
</aside>
<code>Mu.</code>
</article></pre>
<p>
An article is any element with the <code class="prettyprint lang-html">data-sblg-article="1"</code> Boolean attribute, usually
<code class="prettyprint lang-html"><article data-sblg-article="1"></code>. 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 template as follows (and omitting the surrounding HTML stuff):
</p>
<pre class="prettyprint lang-html"><body>
<nav data-sblg-nav="1" data-sblg-navsz="1"></nav>
<article data-sblg-article="1"></article>
</body></pre>
<p>
Here, the <code class="prettyprint lang-html"><article data-sblg-article="1"></code> is replaced by ordered article data,
with a little <q>permanent link</q> thing following.
The <code class="prettyprint lang-html"><nav data-sblg-nav="1"></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>