fakestache-ssg

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

README.md (3719B)


      1 # FakeStache SSG
      2 
      3 Yep! An Other Static Website Generator!
      4 
      5 Made with [Bash >= 4](https://www.gnu.org/software/bash/) (&
      6 coreutils), [Pandoc](http://pandoc.org/)
      7 and [Mustache](http://mustache.github.io/).
      8 
      9 *The documentation is a WIP*.
     10 
     11 ## Installation
     12 
     13 1. `git clone git@github.com:hs0ucy/fakestache-ssg.git && cd
     14    fakestache-ssg`
     15 2. `git submodule init`
     16 3. `git submodule update`
     17 
     18 ## Usage
     19 
     20 * To simply build the web site:
     21     * `./fakestache`
     22 * To build the site in development mode:
     23     * `./fakestache -d`
     24 * You can force the complete reset of the web site before building it:
     25     * `./fakestache -r`
     26 
     27 ## Content
     28 
     29 All the content of your site should be markdown (`*.md`) file and
     30 belongs in the `content/` repository. That folder must contains at
     31 least an `index.md` file.
     32 
     33 ## Archetypes
     34 
     35 Archetypes are presets files for writing content faster. When you
     36 create a content through an archetype, the basic metadatas of your
     37 markdown file are prefilled and it is put in the right place of the content
     38 tree.
     39 
     40 ### Create a content from an archetype
     41 
     42 1. The first argument is the name (whithout the `*.md` extension) of an existing archetype.
     43 2. The second (and the last) argument is the title you want to give to your content.
     44 
     45 * `./fakestache nameofthearchetype "The title you want for your content"`
     46 
     47 So if i'm using the `sample.md` archetype to create a new content it
     48 will look like this :
     49 
     50 * `./fakestache sample "This is my first content made from an archetype"`
     51 
     52 If it is a success FakeStache will output something like this :
     53 
     54 * `- The file '/home/hs0ucy/Documents/fakestache-ssg/content/sample/2017/03/this-is-my-first-content-made-from-an-archetype.md' hab been created.`
     55 
     56 Now you can open the file you have created and start to write right
     57 away whithout the need of filling the metadatas.
     58 
     59 ## Templates
     60 
     61 FakeStache uses
     62 the [mustache template engine](http://mustache.github.io/)
     63 ([for bash](https://github.com/tests-always-included/mo)) to give more
     64 flexibility to build your theme. When you build your project
     65 FakeStache converts mustache templates to pandoc HTML templates.
     66 
     67 A lot of params in `config/site.cfg` are includes by mustache during
     68 the creation of
     69 the [pandoc's templates](https://github.com/jgm/pandoc-templates).
     70 
     71 * ./templates
     72     * mustache/
     73         * partials/
     74             * head.mustache
     75         * feed/
     76             * feed-entry.mustache
     77             * feed.mustache
     78         * default-index.inc.mustache
     79         * default-index.mustache
     80         * default.mustache
     81         * index.mustache
     82     * pandoc
     83         * _empty: dynamically created_
     84 
     85 <!-- ## Architecture of Fakestache SSG -->
     86 
     87 <!-- * `archetypes/` -->
     88 <!--     * `note.md` -->
     89 <!-- * `config/` -->
     90 <!--     * `config` -->
     91 <!-- * `content/` -->
     92 <!--     * `index.md` -->
     93 <!-- * `functions/` -->
     94 <!--     * `build-pandoc-templates` -->
     95 <!--     * `clean-content-folder` -->
     96 <!--     * `create-feed` -->
     97 <!--     * `create-html-pages` -->
     98 <!--     * `create-html-sections` -->
     99 <!--     * `get-archetypes` -->
    100 <!--     * `get-pandoc-templates` -->
    101 <!--     * `get-static-files` -->
    102 <!--     * `move-html-to-publichtml` -->
    103 <!--     * `parse_yaml` -->
    104 <!-- * `lib/` -->
    105 <!--     * `mo/` -->
    106 <!-- * `public_html/` -->
    107 <!-- * `static/` -->
    108 <!-- * `templates` -->
    109 <!--     * `mustache/` -->
    110 <!--         * `partials/` -->
    111 <!--             * `head.mustache` -->
    112 <!--         * `feed/` -->
    113 <!--             * `feed-entry.mustache` -->
    114 <!--             * `feed.mustache` -->
    115 <!--         * `default-index.inc.mustache` -->
    116 <!--         * `default-index.mustache` -->
    117 <!--         * `default.mustache` -->
    118 <!--         * `index.mustache` -->
    119 <!--     * `pandoc/` -->
    120 <!-- * `.gitignore` -->
    121 <!-- * `.gitmodules` -->
    122 <!-- * `fakestache` -->