redo-blog
=========
-small blog system using the redo build system
+small blog system using the redo build system, with blog article files written
+in (pandoc) Markdown or ReStructured Text.
dependencies
------------
Some metadata files will also be generated below ./metadata/: For each article,
there will be generated a .uuid and a .intermediate file; furthermore, files for
-data used in ./feed.xml and ./index.html will be built there and can be edited
-to customize the blog – namely the files url, author, uuid, title, index.tmpl,
-index_snippet.tmpl, article.tmpl.
+data used in ./feed.xml and ./index.html will, if non-existant, be built there
+and can be edited to customize the blog – namely the files url, author, uuid,
+title, index.tmpl, index_snippet.tmpl, article.tmpl.
-recipe to use server-side with git
-----------------------------------
+recipe to remotely manage a redo blog with git
+----------------------------------------------
On your server, install the dependencies listed above. Then set up a repository
for your blog files. Let's assume we want it to sit in our home directory and be
git commit -m 'set up blog metadata'
git push origin master
-bugs
-----
+bugs and peculiarities
+----------------------
Don't create a index.rst or index.md in the redo-managed directory, that will
break things.
+
+The article title is derived in .md files from a first line prefixed with "% ",
+while all other headings are treated as sub-headings. In .rst files, the title
+is derived from a heading that must be at the top of the document, and be of an
+adornment style (such as underlining with "=") that must be used only once in
+it.
rstfile="../${1%.intermediate}.rst"
if [ -f "$rstfile" ]; then
redo-ifchange "$rstfile"
- pandoc -f rst --template="$template" --mathml -t html5 "$rstfile" > "$3"
+ pandoc -f rst --template="$template" --mathml -t html5 "$rstfile" --base-header-level=2 > "$3"
elif [ -f "$mdfile" ]; then
redo-ifchange "$mdfile"
- pandoc -f markdown --template="$template" --mathml -t html5 "$mdfile" > "$3"
+ pandoc -f markdown --template="$template" --mathml -t html5 "$mdfile" --base-header-level=2 > "$3"
fi
<link href="http://example.org/test.html" />
<content type="html">
<p>foo</p>
+<h2 id="bar">bar</h2>
+<p>baz</p>
</content>
</entry>
<published>IGNORE</published>
<link href="http://example.org/bar%20baz.html" />
<content type="html">
+<h2 id="bar">bar</h2>
+<p>bar</p>
+<h3 id="bar-1">bar</h3>
<p>bar</p>
</content>
</entry>
<link href="http://example.org/foo.html" />
<content type="html">
<p>this text contains some special characters: /;%'&quot;&gt;&lt;&amp;äöüß</p>
+<h2 id="some-sub-heading">some sub-heading</h2>
<p>and more than one paragraph</p>
+<h2 id="another-sub-heading">another sub-heading</h2>
<p>note that should be ignored but \ should give a backlash</p>
</content>
</entry>
</head>
<body>
<a href="index.html">Yet another blog</a>
+<article>
<h1>a title with some nasty characters: &<>"' %BODY%</h1>
-<section>
<p>this text contains some special characters: /;%'"><&äöüß</p>
+<h2 id="some-sub-heading">some sub-heading</h2>
<p>and more than one paragraph</p>
+<h2 id="another-sub-heading">another sub-heading</h2>
<p>note that should be ignored but \ should give a backlash</p>
-</section>
+</article>
</body>
</html>
\ No newline at end of file