Commits

Fred T-H  committed dd028e1

Basic description and instructions.

  • Participants
  • Parent commits 7e30d3c

Comments (0)

Files changed (1)

-== Welcome ==
-
-Welcome to your wiki! This is the default page we've installed for your convenience. Go ahead and edit it.
-
-=== Wiki features ===
-
-This wiki uses the [[http://www.wikicreole.org/|Creole]] syntax, and is fully compatible with the 1.0 specification.
-
-The wiki itself is actually a hg repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
-
-Go ahead and try:
-
-{{{
-$ hg clone http://bitbucket.org/ferd/blogerl/wiki
-}}}
-
-Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.
-
-=== Syntax highlighting ===
-
-You can also highlight snippets of text, we use the excellent [[http://www.pygments.org/|Pygments]] library.
-
-Here's an example of some Python code:
-
-{{{
-#!python
-
-def wiki_rocks(text):
-	formatter = lambda t: "funky"+t
-	return formatter(text)
-}}}
-
-You can check out the source of this page to see how that's done, and make sure to bookmark [[http://pygments.org/docs/lexers/|the vast library of Pygment lexers]], we accept the 'short name' or the 'mimetype' of anything in there.
-
-Have fun!
+== Blogerl ==
+
+Blogerl is a minimalist blog engine written in Erlang. It generates only flat HTML files with an RSS entry and an index, nothing more.
+
+=== Building & Compiling ===
+
+You need to have Erlang, agner and agnerized rebar installed (`agner install rebar`):
+{{{
+rebar get-deps
+rebar compile
+cd rel/
+./build.sh
+}}}
+
+And the Blogerl release is compiled. Try to compile the blogerl demo blog:
+
+{{{
+cd ../demo-blog
+./run sh
+}}}
+
+And open the files in demo-blog/compiled/ a browser.
+
+=== Config File ===
+
+The configuration file should be named `conf.cfg` and be placed in the base directory of the blog files. It contains instructions on where to find everything else:
+
+{{{
+#!erlang
+
+%%% template compiling config
+%% where the blog source (templates) are
+{sourcedir, "src/"}.
+%% where the compiled blog should go
+{outdir, "compiled/"}. 
+%% information on the site index (main page)
+{index, [{files, "index.cfg"}, {tpl, "index.tpl"}, {out, "index.html"}]}.
+%% regex filters indicating what files contain markdown code
+{markdown, [".md.tpl"]}.
+%% RSS options
+%% note: RSS uses the <article> tag from HTML5 to find the entry's content
+%% It must be part of your template in order to be used.
+{rss, [{tpl, "rss.tpl"}, {out, "feed.rss"}, {num_entries, 5}]}.
+
+%%% config available within the templates
+%{vars,
+% [{url, [{base, "/"},
+%         {img, "/static/img/"},
+%         {js, "/static/js/"},
+%         {css, "/static/css/"}]}]}.
+%% Without a web server, just to test, replace the path
+{vars,
+ [{url, [{base, "file:///home/.../blogerl/demo-blog/compiled/"},
+         {img, "file:///home/.../blogerl/demo-blog/compiled/static/img/"},
+         {js, "file:///home/.../blogerl/demo-blog/compiled/static/js/"},
+         {css, "file:///home/..,/blogerl/demo-blog/compiled/static/css/"}]}]}.
+}}}
+
+=== The Blog Index ===
+
+The blog index contains tuples with information relative to the contents of the site. The date format here is the one standard in RSS documents. The entries will be ordered in descending order by date automatically (using the format YYYY-MM-DD).
+
+{{{
+#!erlang
+
+{"Tue, 13 Jul 2010 00:00:00 EDT", "Hello, World", "hello.tpl"}.
+{"Sun, 10 Jul 2011 00:00:00 EST", "Markdown Test", "markdown.md.tpl"}.
+{"Wed, 14 Jul 2010 00:00:00 EST", "Second article", "second.tpl"}.
+}}}
+
+You can take a look to the matching `*.tpl` files in `demo-blog` to see how they work
+
+=== Markdown ===
+
+Files that are scanned as requiring markdown and have markdown code between `{% markdown %}` and `{% endmarkdown %} tags (they can not be nested) will have all the content in between converted by a markdown library. The rest will be left as is.