ferron

Ferron is a fast and simple static website generator made with Lua.
Log | Files | Refs | Submodules | README | LICENSE

commit 7e6f50500a0e65116f155e5fe79d81a668b61519
parent 1d0b006c1011970865263b40c3095bfc8219c358
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Mon, 20 Nov 2017 16:20:52 -0500

Start the ferron documentation.

Diffstat:
Msites/ferron-ssg.tld/content/index.md | 142++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 138 insertions(+), 4 deletions(-)

diff --git a/sites/ferron-ssg.tld/content/index.md b/sites/ferron-ssg.tld/content/index.md @@ -1,7 +1,141 @@ -# Welcome to Ferron SSG +# Ferron SSG -Sed tamen haec cum ita tutius observentur, quidam vigore artuum inminuto rogati ad nuptias ubi aurum dextris manibus cavatis offertur, inpigre vel usque Spoletium pergunt. haec nobilium sunt instituta. +Ferron is a static website generator crafted +with [Lua >= 5.3](https://www.lua.org/). -Illud autem non dubitatur quod cum esset aliquando virtutum omnium domicilium Roma, ingenuos advenas plerique nobilium, ut Homerici bacarum suavitate Lotophagi, humanitatis multiformibus officiis retentabant. +*This documentation is a WIP*. -Quibus ita sceleste patratis Paulus cruore perfusus reversusque ad principis castra multos coopertos paene catenis adduxit in squalorem deiectos atque maestitiam, quorum adventu intendebantur eculei uncosque parabat carnifex et tormenta. et ex is proscripti sunt plures actique in exilium alii, non nullos gladii consumpsere poenales. nec enim quisquam facile meminit sub Constantio, ubi susurro tenus haec movebantur, quemquam absolutum. +## Installation + +1. `git clone git@github.com:hs0ucy/ferron-ssg.git && cd ferron-ssg` +2. Install all the dependencies above. + +### Dependencies + +* dkjson +* lua-path +* luafilesysem +* lustache +* markdown + +## Architecture of `ferron-ssg` directory + +* `config.lua` +* `ferron-1.0-alpha.rockspec` +* `rhino` +* `ferron.lua` +* **`functions`** +* **`sites`** + * **`ferron-ssg.tld`** + * **`archetypes`** + * **`content`** + * **`public_html`** + * `site.config.lua` + * **`static`** + * **`templates`** + +## Usage + +* To simply build the web site: + * `./fakestache` +* To build the site in development mode: + * `./fakestache -d` +* You can force the complete reset of the web site before building it: + * `./fakestache -r` + +## Content + +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 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 + +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 : + +* `./fakestache sample "This is my first content made from an archetype"` + +If it is a success Ferron 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 + +Ferron 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 +Ferron converts mustache templates to pandoc HTML templates. + +A lot of params in `config/site.cfg` are includes by mustache during +the creation of +the [pandoc's templates](https://github.com/jgm/pandoc-templates). + +* ./templates + * mustache/ + * partials/ + * head.mustache + * feed/ + * feed-entry.mustache + * feed.mustache + * default-index.inc.mustache + * default-index.mustache + * default.mustache + * index.mustache + * pandoc + * _empty: dynamically created_ + +<!-- ## Architecture of Fakestache SSG --> + +<!-- * `archetypes/` --> +<!-- * `note.md` --> +<!-- * `config/` --> +<!-- * `config` --> +<!-- * `content/` --> +<!-- * `index.md` --> +<!-- * `functions/` --> +<!-- * `build-pandoc-templates` --> +<!-- * `clean-content-folder` --> +<!-- * `create-feed` --> +<!-- * `create-html-pages` --> +<!-- * `create-html-sections` --> +<!-- * `get-archetypes` --> +<!-- * `get-pandoc-templates` --> +<!-- * `get-static-files` --> +<!-- * `move-html-to-publichtml` --> +<!-- * `parse_yaml` --> +<!-- * `lib/` --> +<!-- * `mo/` --> +<!-- * `public_html/` --> +<!-- * `static/` --> +<!-- * `templates` --> +<!-- * `mustache/` --> +<!-- * `partials/` --> +<!-- * `head.mustache` --> +<!-- * `feed/` --> +<!-- * `feed-entry.mustache` --> +<!-- * `feed.mustache` --> +<!-- * `default-index.inc.mustache` --> +<!-- * `default-index.mustache` --> +<!-- * `default.mustache` --> +<!-- * `index.mustache` --> +<!-- * `pandoc/` --> +<!-- * `.gitignore` --> +<!-- * `.gitmodules` --> +<!-- * `fakestache` -->