Ferron is a fast and simple static website generator made with Lua.

Hugo Soucy 37547d9852 Add a missing return 3 months ago
bin 87ddb5eed0 Replaces some arguments 5 months ago
ferron 37547d9852 Add a missing return 3 months ago
lua_modules 2a7ccdd56d Add the `lua_modules/` repository. 2 years ago
sites 09ac4ff86d Update the gitignore 1 year ago
spec 642e04ffae Add new folders 1 year ago
.editorconfig b2a6519d57 Use only two spaces 1 year ago
.gitmodules 460f5fc1fe Add `lua-slugify` for create the slug in `content.lua` 2 years ago
LICENSE 2401e8e57b Create LICENSE 2 years ago
README.md f40cff3058 Modifies the README 5 months ago
cornelius 63f6b958a9 Move & rename cornelius ... it's now a symlink 8 months ago
ferron.lua acdeecd20b Replace double quotes by single ones 1 year ago



Ferron is a static site generator (SSG) crafted with Lua >= 5.3.

This documentation is a WIP.


  1. Make sure Lua 5.3 (or up), and Luarocks 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.


Get Started

First you need to copy the default site and give it the name of the website you want to create... to do so just type this and follow the instructions:

  • ./cornelius start

After that with your favorite texteditor or IDE edit the config.lua to meet the needs of your web site:

  • emacs 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
      • config.lua
      • static
      • templates
  • To simply build a web site:

    • ./cornelius build
  • To build a site in development mode:

    • ./cornelius build --dev


All the content of your site must be markdown (*.md) file and belongs in the content/ repository. That folder must contains at least an index.md file and an index.{lua, json} (optional now). Lua or JSON files are used for the metadatas of the web pages.


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

  • ./cornelius create

If it is a success Ferron will output something like this:

  • - The file '/home/hs0ucy/Documents/Ferron/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.


Ferron uses the mustache template engine (for lua) to give more flexibility to build your theme.