fakestache-ssg

[Archived] A static site generator in Bash 4.
Log | Files | Refs | Submodules | README

commit a471e6fab00a8ba098b9f3b181ce61617b025ac5
parent a17051f99f657d4a22c029efae092400a78eb9de
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Thu, 16 Mar 2017 14:08:49 -0400

Start the templates documentation.

Diffstat:
MREADME.md | 40+++++++++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md @@ -24,27 +24,28 @@ Made with [Bash](https://www.gnu.org/software/bash/), * You can force the complete reset of the web site before building it: * `./fakestache -r` -### Content +## Content -All the content of your site should be markdown (*.md) file and +All the content of your site should be markdown (`*.md`) file and belongs in the `content/` repository. That folder must contains at least an `index.md` file. -#### Archetypes +## Archetypes Archetypes are presets files for writing content faster. When you create a content through an archetype, the basic metadatas of your markdown file are prefilled and it is put in the right place of the content tree. -##### Create a content from an archetype +### Create a content from an archetype 1. The first argument is the name (whithout the `*.md` extension) of an existing archetype. 2. The second (and the last) argument is the title you want to give to your content. * `./fakestache nameofthearchetype "The title you want for your content"` -So if i'm using the `sample.md` archetype to create a new content it will look like this : +So if i'm using the `sample.md` archetype to create a new content it +will look like this : * `./fakestache sample "This is my first content made from an archetype"` @@ -52,10 +53,31 @@ If it is a success FakeStache will output something like this : * `- The file '/home/hs0ucy/Documents/fakestache-ssg/content/sample/2017/03/this-is-my-first-content-made-from-an-archetype.md' hab been created.` -Now you can open the file you have created and start to write right away whithout the need of filling the metadatas. - -### Templates - +Now you can open the file you have created and start to write right +away whithout the need of filling the metadatas. + +## Templates + +FakeStache uses +the [mustache template engine](http://mustache.github.io/) +([for bash](https://github.com/tests-always-included/mo)) to give more +flexibility to build your theme. When you build your project +FakeStache converts mustache templates to pandoc HTML templates. + +A lot of params in `config/site.cfg` are included during the creation +of the pandoc's templates by mustache. + +* `templates` + * `mustache/` + * `partials/` + * `head.mustache` + * `feed/` + * `feed-entry.mustache` + * `feed.mustache` + * `default-index.inc.mustache` + * `default-index.mustache` + * `default.mustache` + * `index.mustache` <!-- ## Architecture of Fakestache SSG -->