monis

Version, currently master branch1 version
  • master branchlatestDec 28, 2021

github.com/l3gacyb3ta/monis

Monis is a hyper-fast light-weight SSG written in Crystal.

6 stars
0 dependents
License: UNLICENSE

Installation

# Add this to your shard.yml
dependencies:
  monis:
    github: l3gacyb3ta/monis
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.0.0
License
UNLICENSE
Author
l3gacy
Target
  • monis from src/monis.cr

Dependencies

Runtime Dependencies

  • markd*github: icyleaf/markd
  • crinja*github: straight-shoota/crinja

README

Monis

Artwork

Monis is a hyper-fast light-weight SSG written in Crystal.

Under my benchmarks (rendering this readme a 100 times), a large site can be generated in less then 25ms!

Build

To build run make, then to install sudo make install.
To build the docs, run make docs

File formating

Template:

---
title: "Home page"
permalink: "/index"
---
# Welcome to my website
Hello and welcome!

The frontmatter contains the permalink and the title, and the page content is after the frontmatter. Anything defined in the fronmatter will be passed into the jinja theme, so you could do something like this:

# content/index.md
---
title: "Home page"
permalink: "/index"
favicon: "/static/favicon.png"
---
# Welcome to my website
Hello and welcome!
# theme/index.html.j2
<html>
    <head>
        <title>{{ title }}</title>
        <link rel="icon" href="{{ favicon }}">
    </head>
    <body>
        {{ content | safe }}
    </body>
</html>

Note: the title config option used to be hard-coded into monis, but now depends on the theme to implement it.

File structure for sites

/content: Anything here gets rendered
/static: These files just get copied over to /out/static
/theme: Currently only index.html.js gets used in this, but this is the Jinja2 template for the website.
/theme/static: These are static files for a theme
/out: This is the output of the generator once it has been run !!DONT STORE ANYTHING IMPORTANT HERE IT GETS WIPED ON EACH RUN!!
/config.yml: Anything in here gets passed to the config attribute in the jinja template.

Contributing

  1. Fork it (https://github.com/your-github-user/monis/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • l3gacy - creator and maintainer