Raymii.org IEC Resistor logo

Quis custodiet ipsos custodes?
RSS Feed

ingsoc

09-12-2012 | Remy van Elst

ingsoc is a static site generator written in Python with the purpose of generating raymii.org. It differs from other static site generators because it does not create a blog-like site, but it is focused on pages and structure. It also does not use a template engine. It generates categories, pages, tags and a RSS feed. It takes markdown files with a yaml config header as input, and outputs html.

Usage

ingsoc requires three directories and content to work. The directory structure can be as below:

../
src/
-- tutorials/
   -- tutorial1.md
   -- tutorial2.md
-- software/
   -- project1.md
   -- project2.md

inc/
-- style.css
-- css/
-- img/
out/
config.yml
newspeak.py

I have a src directory with my content, which is written in markdown. The inc directory gets copied over to the output folder, it houses the CSS, JS and images. Then the out folder is the one where ingsoc puts its HTML.

Content

A content item is a markdown file, with a yaml header. The header looks like this:

title: "Ubuntu/Debian update mailer"
author: "Remy van Elst"
category: "software"
date: "10-06-2012"
summary: "This is a bash script for Ubuntu and Debian, to be run by cron on a set interval. It checks if there are apt-updates, and if so, mails an overview of the packages which can be updated, whith their local version, the version available and an URL to the Ubuntu package site where you can see the changelog. I wrote this as an addition for my Nagios monitoring, that only shows how many updates there are, this is a lot more verbose. It also runs on Debian since 1 Nov 2012. Only the links don't work then, because the packages are different."
tags: 
  - command-line
  - bash
  - apt
  - update
  - ubuntu
  - debian
---

Then below the three dashes (---) the actual markdown content is placed. The category item is what also end up in the menu. The date and summary are used in the RSS. The summary is the only field which is not required.

Configuration

There is also a config.yml file. It looks like this:

title: "Raymii.org"
subtitle: "Quis custodiet ipsos custodes?"
rootdir: "./src"
outdir: "out"
incfolder: "./inc"
breadcrumbs: "yes"
tags: "yes"
rsstitle: "Raymii.org"
rssdescr: "The raymii.org RSS feed, all about GNU/Linux"
rssurl: "https://raymii.org/s"

homepagetext: >
    

Welcome!

This is the best site on the entire internet.

The homepagetext item is the raw html code which is put on the index.html code. the tags and breadcrumbs are used to define if tags and breadcrumbs should be generated and placed or not.

Requirements

To install them in a standard ubuntu/debian: ingsoc is a static site generator written in Python with the purpose of generating raymii.org. It differs from other static site generators because it does not create a blog-like site, but it is focused on pages and structure. It also does not use a template engine. It generates categories, pages, tags and a RSS feed. It takes markdown files with a yaml config header as input, and outputs html.

Usage

ingsoc requires three directories and content to work. The directory structure can be as below:

../
src/
-- tutorials/
   -- tutorial1.md
   -- tutorial2.md
-- software/
   -- project1.md
   -- project2.md

inc/
-- style.css
-- css/
-- img/
out/
config.yml
newspeak.py

I have a src directory with my content, which is written in markdown. The inc directory gets copied over to the output folder, it houses the CSS, JS and images. Then the out folder is the one where ingsoc puts its HTML.

Content

A content item is a markdown file, with a yaml header. The header looks like this:

title: &"Ubuntu/Debian update mailer&"
author: &"Remy van Elst&"
category: &"software&"
date: &"10-06-2012&"
summary: &"This is a bash script for Ubuntu and Debian, to be run by cron on a set interval. It checks if there are apt-updates, and if so, mails an overview of the packages which can be updated, whith their local version, the version available and an URL to the Ubuntu package site where you can see the changelog. I wrote this as an addition for my Nagios monitoring, that only shows how many updates there are, this is a lot more verbose. It also runs on Debian since 1 Nov 2012. Only the links don't work then, because the packages are different.&"
tags: 
  - command-line
  - bash
  - apt
  - update
  - ubuntu
  - debian
---

Then below the three dashes (---) the actual markdown content is placed. The category item is what also end up in the menu. The date and summary are used in the RSS. The summary is the only field which is not required.

Configuration

There is also a config.yml file. It looks like this:

title: &"Raymii.org&"
subtitle: &"Quis custodiet ipsos custodes?&"
rootdir: &"./src&"
outdir: &"out&"
incfolder: &"./inc&"
breadcrumbs: &"yes&"
tags: &"yes&"
rsstitle: &"Raymii.org&"
rssdescr: &"The raymii.org RSS feed, all about GNU/Linux&"
rssurl: &"https://raymii.org/s&"

homepagetext: &>
    &Welcome!&
    This is the &best site& on the entire internet.

The homepagetext item is the raw html code which is put on the index.html code. the tags and breadcrumbs are used to define if tags and breadcrumbs should be generated and placed or not.

Requirements

To install them in a standard ubuntu/debian:

sudo apt-get install python-pip

and then:

sudo pip install misaka pyyaml dateutils


sudo apt-get install python-pip

and then:

sudo pip install misaka pyyaml dateutils

Tags: ingsoc, markdown, newspeak, raymii.org, static-site,