Personal website statically generated using POSIX-compliant shell.
$ make # creates dist/
The dist
folder generated by Make serves as a default www root and can be served using nginx, apache httpd, python http.server etc.
General site content/styling is changed through editing the main template files such as project.template.html (for project pages), index.template.html (for landing page changes) as well as the index.scss and index.js (these are site-wide).
Adding new projects is done by creating a new project directory in projects. It must contain the following files
This file provides metadata about the specific project used when building the project HTML file.
export interface ProjectDefinition {
name: string; // Name to display.
github_link: string; // Link to github repository page.
preview_ext: string; // File extension of preview image.
language: string; // Primary programming language (used for styling).
}
Example:
{
"name": "GNU Linux dotfiles",
"github_link": "https://github.com/Kruhlmann/dotfiles",
"preview_ext": "png",
"language": "shell"
}
Markdown file to render in the sidebar of the project page when browsing on a large monitor. Intended to show common GitHub badge markdown but anything can go in here.
Markdown file for the main body of the project page. Usually contains the contents of the README.md in the repository.
Main image for the project page. Extension is defined in definition.json
. Default HTML image files are supported.
The build system consists of the following files:
Main entrypoint for building files with dependencies. By default make
or make all
will create/update the dist
folder.
Business logic container for the build scripts. Define new functionality here and implement it in the specific build scripts.
Builds a project html file.
Arguments:
- Project directory
- Output directory
Example:
$ ./scripts/build_html src/projects/dotfiles dist/projects/
Make target:
$ make dist/projects/dotfiles.html
Builds the landing page HTML file.
Arguments:
- Output directory
Example:
$ ./scripts/build_html dist/
Make target:
$ make dist/index.html