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

Hugo Soucy c9c890278c Remove the partials argument 3 weeks ago
bin 63f6b958a9 Move & rename cornelius ... it's now a symlink 1 month ago
ferron c9c890278c Remove the partials argument 3 weeks ago
lua_modules 2a7ccdd56d Add the `lua_modules/` repository. 1 year ago
sites 09ac4ff86d Update the gitignore 6 months ago
spec 642e04ffae Add new folders 9 months ago
.editorconfig b2a6519d57 Use only two spaces 4 months ago
.gitmodules 460f5fc1fe Add `lua-slugify` for create the slug in `content.lua` 1 year ago
LICENSE 2401e8e57b Create LICENSE 2 years ago
README.md 7d40aca8d4 Modify documentation 1 month ago
cornelius 63f6b958a9 Move & rename cornelius ... it's now a symlink 1 month ago
ferron.lua acdeecd20b Replace double quotes by single ones 9 months ago

README.md

Ferron

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

This documentation is a WIP.

Installation

  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.

Dependencies

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

Content

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

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/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 (for lua) to give more flexibility to build your theme.