ferron

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

commit be64862675c751206845a84632eec9e1749989b6
parent acb54929f19f29a9cd25be6a7a951c57905a88e3
Author: Hugo Soucy <hugo@soucy.cc>
Date:   Mon, 27 Apr 2020 14:03:22 -0400

Rename the sample site

Diffstat:
Msites/.gitignore | 4++--
Dsites/ferron-ssgtld/archetypes/.gitignore | 5-----
Dsites/ferron-ssgtld/content/index.md | 107-------------------------------------------------------------------------------
Asites/sample/archetypes/.gitignore | 5+++++
Rsites/ferron-ssgtld/archetypes/doc.json -> sites/sample/archetypes/default.json | 0
Rsites/ferron-ssgtld/archetypes/doc.md -> sites/sample/archetypes/default.md | 0
Rsites/ferron-ssgtld/config.lua -> sites/sample/config.lua | 0
Rsites/ferron-ssgtld/content/index.json -> sites/sample/content/index.json | 0
Asites/sample/content/index.md | 36++++++++++++++++++++++++++++++++++++
Rsites/ferron-ssgtld/data/.gitignore -> sites/sample/data/.gitignore | 0
Rsites/ferron-ssgtld/public_html/.gitignore -> sites/sample/public_html/.gitignore | 0
Rsites/ferron-ssgtld/static/css/style.css -> sites/sample/static/css/style.css | 0
Rsites/ferron-ssgtld/templates/default-index.mustache -> sites/sample/templates/default-index.mustache | 0
Rsites/ferron-ssgtld/templates/default.mustache -> sites/sample/templates/default.mustache | 0
Rsites/ferron-ssgtld/templates/feed/atom.mustache -> sites/sample/templates/feed/atom.mustache | 0
Rsites/ferron-ssgtld/templates/feed/rss2.mustache -> sites/sample/templates/feed/rss2.mustache | 0
Rsites/ferron-ssgtld/templates/partials/footer.mustache -> sites/sample/templates/partials/footer.mustache | 0
Rsites/ferron-ssgtld/templates/partials/head.mustache -> sites/sample/templates/partials/head.mustache | 0
18 files changed, 43 insertions(+), 114 deletions(-)

diff --git a/sites/.gitignore b/sites/.gitignore @@ -2,5 +2,5 @@ * # Except those files !.gitignore -!/ferron-ssgtld -!/ferron-ssgtld/**/* +!/sample +!/sample/**/* diff --git a/sites/ferron-ssgtld/archetypes/.gitignore b/sites/ferron-ssgtld/archetypes/.gitignore @@ -1,5 +0,0 @@ -# Ignore everything in this directory -* -# Except those files -!.gitignore -!doc.* diff --git a/sites/ferron-ssgtld/content/index.md b/sites/ferron-ssgtld/content/index.md @@ -1,107 +0,0 @@ -# Ferron - -Ferron is a static site generator (SSG) crafted with Lua >= 5.3. - -*This documentation is a WIP*. - -## Installation - -1. Make sure [Lua](https://www.lua.org/) 5.3 (or up), and - [Luarocks](https://luarocks.org/) are installed on your machine. -2. Then: - * `git clone git@github.com:hs0ucy/Ferron.git && cd Ferron` - * `git submodule update --init && git submodule update --recursive --remote` -3. The rest of the installation process is made with the Ferron CLI - (command-line interface) named `cornelius`. -4. So make sure the `cornelius` file have the right permissions to be execute has a script. -5. Otherwise: `chmod a+x cornelius`. -6. After that `./cornelius install`. The `install` will check if Luarocks is - installed on your system and then install all the dependencies with it. -7. If all went well, you are up and ready to create your site. - -### Dependencies - -* [dkjson](https://luarocks.org/modules/dhkolf/dkjson) -* [lua-path](https://luarocks.org/modules/moteus/lua-path) -* [LuaFileSysem](https://luarocks.org/modules/hisham/luafilesystem) -* [lustache](https://luarocks.org/modules/olivine-labs/lustache) -* [Markdown](https://luarocks.org/modules/mpeterv/markdown) -* [mimetypes](https://luarocks.org/modules/luarocks/mimetypes) - -## Get Started - -First you need to copy the default site and give it the name of the -website you want to create: - -``` -./cornelius start -``` - -After that with your favorite texteditor or IDE edit the -`site-config.lua` to meet the needs of your web site: - -``` -emacs site-config.lua -``` - -### Architecture of a ferron website - -* **`sites`** - * .gitignore - * **`ferron-ssg.tld`** - * **`archetypes`** - * `.gitignore` - * `doc.json` - * `doc.md` - * **`content`** - * `index.json` - * `index.md` - * **`public_html`** - * `.gitignore` - * `site-config.lua` - * **`static`** - * **`templates`** - -* To simply build a web site: - * `lua ferron.lua` -* To build a site in development mode: - * `lua ferron.lua --dev` - -## 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 and an `index.json`. - -## 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. - -* `lua ferron.lua 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 : - -* `lua ferron.lua 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 lua](https://github.com/Olivine-Labs/lustache)) to give more -flexibility to build your theme. diff --git a/sites/sample/archetypes/.gitignore b/sites/sample/archetypes/.gitignore @@ -0,0 +1,5 @@ +# Ignore everything in this directory +* +# Except those files +!.gitignore +!default.* diff --git a/sites/ferron-ssgtld/archetypes/doc.json b/sites/sample/archetypes/default.json diff --git a/sites/ferron-ssgtld/archetypes/doc.md b/sites/sample/archetypes/default.md diff --git a/sites/ferron-ssgtld/config.lua b/sites/sample/config.lua diff --git a/sites/ferron-ssgtld/content/index.json b/sites/sample/content/index.json diff --git a/sites/sample/content/index.md b/sites/sample/content/index.md @@ -0,0 +1,36 @@ +# Ferron SSG + +Proinde concepta rabie saeviore, quam desperatio incendebat et fames, +amplificatis viribus ardore incohibili in excidium urbium matris +Seleuciae efferebantur, quam comes tuebatur Castricius tresque +legiones bellicis sudoribus induratae. + +Intellectum est enim mihi quidem in multis, et maxime in me ipso, sed +paulo ante in omnibus, cum M. Marcellum senatui reique publicae +concessisti, commemoratis praesertim offensionibus, te auctoritatem +huius ordinis dignitatemque rei publicae tuis vel doloribus vel +suspicionibus anteferre. Ille quidem fructum omnis ante actae vitae +hodierno die maximum cepit, cum summo consensu senatus, tum iudicio +tuo gravissimo et maximo. Ex quo profecto intellegis quanta in dato +beneficio sit laus, cum in accepto sit tanta gloria. + +Hacque adfabilitate confisus cum eadem postridie feceris, ut +incognitus haerebis et repentinus, hortatore illo hesterno clientes +numerando, qui sis vel unde venias diutius ambigente agnitus vero +tandem et adscitus in amicitiam si te salutandi adsiduitati dederis +triennio indiscretus et per tot dierum defueris tempus, reverteris ad +paria perferenda, nec ubi esses interrogatus et quo tandem miser +discesseris, aetatem omnem frustra in stipite conteres summittendo. + +Post quorum necem nihilo lenius ferociens Gallus ut leo cadaveribus +pastus multa huius modi scrutabatur. quae singula narrare non refert, +me professione modum, quod evitandum est, excedamus. + +Cuius acerbitati uxor grave accesserat incentivum, germanitate Augusti +turgida supra modum, quam Hannibaliano regi fratris filio antehac +Constantinus iunxerat pater, Megaera quaedam mortalis, inflammatrix +saevientis adsidua, humani cruoris avida nihil mitius quam maritus; +qui paulatim eruditiores facti processu temporis ad nocendum per +clandestinos versutosque rumigerulos conpertis leviter addere quaedam +male suetos falsa et placentia sibi discentes, adfectati regni vel +artium nefandarum calumnias insontibus adfligebant. diff --git a/sites/ferron-ssgtld/data/.gitignore b/sites/sample/data/.gitignore diff --git a/sites/ferron-ssgtld/public_html/.gitignore b/sites/sample/public_html/.gitignore diff --git a/sites/ferron-ssgtld/static/css/style.css b/sites/sample/static/css/style.css diff --git a/sites/ferron-ssgtld/templates/default-index.mustache b/sites/sample/templates/default-index.mustache diff --git a/sites/ferron-ssgtld/templates/default.mustache b/sites/sample/templates/default.mustache diff --git a/sites/ferron-ssgtld/templates/feed/atom.mustache b/sites/sample/templates/feed/atom.mustache diff --git a/sites/ferron-ssgtld/templates/feed/rss2.mustache b/sites/sample/templates/feed/rss2.mustache diff --git a/sites/ferron-ssgtld/templates/partials/footer.mustache b/sites/sample/templates/partials/footer.mustache diff --git a/sites/ferron-ssgtld/templates/partials/head.mustache b/sites/sample/templates/partials/head.mustache