aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-15 01:07:58 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-15 01:07:58 -0300
commit1af7b8a62891016cfa26ac2cf3e5b5046398b0e9 (patch)
tree0571e0ab351d5b8e07397c0e953f611b38ebaa6e /README.md
parent239198f570ca3f601a61ceb4e31c124a84d4e216 (diff)
downloadblogc-1af7b8a62891016cfa26ac2cf3e5b5046398b0e9.tar.gz
blogc-1af7b8a62891016cfa26ac2cf3e5b5046398b0e9.tar.bz2
blogc-1af7b8a62891016cfa26ac2cf3e5b5046398b0e9.zip
random design notes updates
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/README.md b/README.md
index 397639e..7b74e25 100644
--- a/README.md
+++ b/README.md
@@ -11,15 +11,15 @@ The source file must provide (almost) all the data needed to build the result fi
The compiler will always generate a single file, no matter how many source files are provided to it. If more than one source file is provided, the template must know how to convert them to a single result file.
-The templates can define blocks. If something is defined outside of blocks, it should be used for any source. If it is inside a block, it should only be used if the block matches the compiler arguments, e.g: ``single_source`` is used if just one source file is provided, ``multiple_sources`` is used if more than one source file is provided, being used once for each source file, and ``multiple_sources_once`` is used if more than one source file is provide, but only once.
+The templates can define blocks. If something is defined outside of blocks, it should be used for any source. If it is inside a block, it should only be used if the block matches the compiler argument expectations, e.g.: ``single_source`` should be used if just one source file is provided, ``multiple_sources`` should be used if more than one source file is provided, being used once for each source file, and ``multiple_sources_once`` should be used if more than one source file is provided, but only once. Templates blocks can't be nested.
-The variables defined in the source file are only available inside blocks. If something does not depends the source files, and is global, it must be hardcoded in templates, for the sake of simplicity.
+The variables defined in the source file are only available inside blocks. If something does not depends on the source files, and is global, it must be hardcoded in the template, for the sake of simplicity.
As the compiler is output-agnostic, Atom feeds and sitemaps should be generated using templates as well.
-The content defined in source files must be written using Markdown syntax. Javascript and CSS are allowed, then be careful!
+The content defined in source files must be written using Markdown syntax. Javascript and CSS are allowed. Be careful!
-The compiler is designed to be used with any POSIX-compatible implementation of ``make``.
+The compiler is designed to be easily used with any POSIX-compatible implementation of ``make``.
### Source file syntax
@@ -33,11 +33,11 @@ DATE: 2007-04-05T12:30-02:00
test content
```
-``DATE`` is the only variable required by the compiler, because it will be used to sort the source files, if you provide multiple source files. It is an ISO-8601 date-time, with seconds, and always in UTC. If you want to show the date of your posts in your blog, you can use the ``DATE`` variable, but it won't be nicely formated, it will always be an ISO-8601 date-time.
+``DATE`` is the only variable required by the compiler, because it will be used to sort the source files, needed. It is an ISO-8601 date-time, with seconds, and always in UTC. If you want to show the date of your posts in your blog, you can use the ``DATE`` variable, but it won't be nicely formated, it will always be an ISO-8601 date-time.
-All the variables used in templates are mandatory. The compiler will raise errors if template requires a variable and it is not found in the source file.
+All the variables used in templates are mandatory. The compiler will raise errors if a template requires a variable and it is not found in the source file.
-Variables are single line, and all the whitespace characters, including tabs, before and after the leading and trailing letters will be removed.
+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.
Markdown-parsed content is available in template blocks as the ``CONTENT`` variable.
@@ -62,10 +62,10 @@ Markdown-parsed content is available in template blocks as the ``CONTENT`` varia
{{ CONTENT }}
{% endblock %}
{% block multiple_sources_once %}<ul>{% endblock %}
- {% block multiple_sources %}<p><a href="{{ HREF }}">{{ TITLE }}</a> - {{ DATE }}</p>{% endblock %}
+ {% block multiple_sources %}<p><a href="{{ FILENAME }}.html">{{ TITLE }}</a> - {{ DATE }}</p>{% endblock %}
{% block multiple_sources_once %}</ul>{% endblock %}
</body>
</html>
```
-This template would generate a list of posts, if multiple source files were provided, and single pages for each post, if only one source file was provided. The ``HREF`` variable is generated by the compiler, and is a relative url, suitable to create link. (TODO: decide on how to generate the ``HREF`` variable).
+This template would generate a list of posts, if multiple source files were provided, and single pages for each post, if only one source file was provided. The ``FILENAME`` variable is generated by the compiler, and is the source file name without its last extension.