Skip to content
🦴 Blog skeleton
Makefile HTML Nix
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
en
src
.gitignore
LICENSE.md
Makefile
README.md
default.nix
index.html

README.md

Skeleton

Table of contents

Overview

This is the skeleton of the blog that I use with emem. Change it as it suits you.

Prerequisites

Structure

There is a top-level Makefile that handles the files that reside in the root directory. There is another Makefile that lives inside the en/ directory. The key variables to modify there are: OG_IMAGE, and ANALYTICS. The other parts of the Makefiles that must be modified are the values for the -D, -K, --og-title, and --og-url flags.

The URL in the file index.html must also be updated accordingly.

The contents of the file en/src/index.md will be rendered as the index file for the en/ directory.

Posts

To write posts, write Markdown files in en/src/. The first line will serve as the page title and the value of OG_TITLE in the Makefile. The rest is free form. In addition to the source Markdown files, write the equivalent .md.dat files, per .md files. The contents of this file will be used for the site keywords.

The file en/src/footer.md is appended to every file in en/src/ during the build phase. The file src/404.md serves as the 404 page.

Building

Inside the root directory, run:

make

If you use Nixpkgs, instead run:

nix-shell --pure --run make

If we have the file en/src/foo.md, this command creates the equivalent en/foo/index.html file.

Previewing

To see how the site will look like, run a local web server:

python -m SimpleHTTPServer

Then, go to http://localhost:8000/en to preview it.

Publishing

If you want GitHub to host your pages, go to https://pages.github.com/. You may then push this directory to that repository.

Miscellany

GNU Parallel is not a hard requirement but it makes building much faster. Also, don’t forget to update the README and LICENSE files.

You can’t perform that action at this time.