Project

zepto

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Simple static site generator with battries included
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

zepto

Gem Version

Really tiny static site generator

Usage

  1. To install zepto run
$ gem install zepto
  1. Create _layout for storing all layouts (with extension .erb)
  2. Create folder _assets for storing all assets
  3. Place all your markdown files inside content folder
  4. To build run
$ zepto build

Customization

You can customize zepto using zepto.json in project root

You can specify the following options in it

key Description Value Default Value Required
assets Location of assets String _assets false
styles Location of styles String _styles false
javascript Location of javascript String _javascript false
layout Location of layouts String _layout false

Pagewise customization

At the top of the page you can attributes between as follows

---
title: "Title of the page"
date: "Date"
layout: "blog.erb"
tags: ["blog", "ruby", "javascript"]
---

Content of the page
  1. layout: is used to speficy the layout file
  2. tags: When you speficy a tag you can access blogs group by content using get_tag function in your layout.erb file as follows
  <ul>
    <% for | blog | in get_tag("blog") %>
    <li><%=  blog.title %></li>
    <% end %>
  </ul>
  1. You can get list of all tags by calling get_tags
  <ul>
    <% for tag in get_tags %>
    <li><%= tag %></li>
    <% end %>
  </ul>
  1. To get all posts that belong in a particular path
  <ul>
    <% for blog  in get_path("/posts") %>
      <li>
        <a href="<%= blog[:path].delete_suffix("/") %>.html"><%= blog[:title] %></a>
      </li>
    <% end %>
  </ul>
  1. You can include whatever additional keys here that you need. They are exposed in the layout.erb