From 582cbc6cf67919ec189098817ab1e4541c8e761d Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 28 Apr 2015 02:31:40 -0300 Subject: implemented datetime parsing/formatting --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ad8f40d..89b8b35 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,8 @@ If more than one source file is provided to the compiler with the ``-t`` argumen Variables are single-line, and all the whitespace characters, including tabs, before the leading non-whitespace character and after the trailing non-whitespace character will be removed. +``DATE`` variable, if provided in the correct format, as shown in the example, will be parsed and set to ``DATE_FORMATTED`` variable. User can set ``DATE_FORMAT`` variable with ``strftime(3)`` format string, to change the default formatting, e.g. using the -D command line argument: ``-D DATE_FORMAT="%H:%M:%S"`` + Raw content is available in template blocks as the ``CONTENT`` variable. @@ -69,11 +71,11 @@ Raw content is available in template blocks as the ``CONTENT`` variable.

My cool blog

{% block entry %}

{{ TITLE }}

- {% if DATE %}

Published in: {{ DATE }}

{% endif %} + {% if DATE_FORMATTED %}

Published in: {{ DATE_FORMATTED }}

{% endif %}
{{ CONTENT }}
{% endblock %} {% block listing_once %}{% endblock %} -- cgit v1.2.3-18-g5258