/~jecxjo

random stuff you should forget about

static-shell-site

A static site and blog generator using just shell commands.

Disclaimer

This project consists of multiple projects, some mine some not. I put them all together into a single project. Please see the headers of each file for the copyright and license information.

How to get it

Latest version v2

Or clone it git clone https://commentedcode.org/git/static-shell-site.git

Commands

Most of the build process is setup in the Makefile Configure your remote host in this file, then use targets all to build locally and deploy to push it to your host.

To generate a new blog post, run ./bloggen new "Post Title"

To create a new static page, just create a markdown file in your site directory.

Configuration

There are two sections of configuration: rawkrc which handles the static site and bloggenrc which handles the blog specifically.

rawkrc

In this rc file you configure the markdown parser, Markdown.pl is included but use whatever parser you want. Header and footer templates defined by hdr_tpl and ftr_tpl respectively. Site title, description and css all listed here as well.

The blacklist allows you to remove directories and files from being added into the navigation bar at the top of the page. Defaults are provided by add in any of file types or paths you wish to ignore. Paths are evaluated to those items found in the . directory of the page you are looking at.

bloggenrc

This rc file contains blog specific items. An additional header and footer are available for blog posts. site defines the location to put the markdown files and base_url is the location where the files will be hosted.

Templates

rawkrc template files are not run through the markdown parser, they are applied to the head and foot of the output generated by the markdown parser. Put whatever you want there. The bloggenrc templates will be run through the markdown parser so add whatever your parser supports.

Note that the blog posts will have the rawkrc header, bloggenrc header, body, bloggenrc footer, rawkrc footer applied to each post.

Variables

I've added the ability to inject variables into rawk processed files by using markdown link references that point to #.

[rawkrc::site_title] # ($site_title/blog)

If the above line is added to a file, the variable site_title will be modified when processing the output. This allows you to make page specific modifications.