diff --git a/Makefile b/Makefile index 812c00a..c8b1e6b 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,9 @@ clean: deploy: rsync -avP --delete output/ root@knazarov.com:/var/www/knazarov.com/ +serve: + darkhttpd output/ + install: install -d $(DESTDIR)$(PREFIX)/srv/knazarov.com rsync -av --no-o --no-g output/ $(DESTDIR)$(PREFIX)/srv/knazarov.com diff --git a/README.md b/README.md new file mode 100644 index 0000000..3cd85c3 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# My personal website + +This is source code for [knazarov.com](https://knazarov.com), my personal website. +It is written mostly in bash, and uses [markdown.awk](https://git.sr.ht/~knazarov/markdown.awk) to convert +markdown posts and pages to HTML. + +The site has very minimal CSS (about 110 lines) that should be enough to display fine in most browsers +including mobile. + +I don't intend the code to be easily readable, but given that it's not much, you can probably figure +things out. + +## Building + +If you're on any Linux system, you can just type `make` in your terminal, and the result will be in the +`./output` directory. However, if you're on a Mac, you probably would need to use gnu awk/sed. diff --git a/bin/mdpage.sh b/bin/mdpage.sh index 8cb25ad..930d40b 100755 --- a/bin/mdpage.sh +++ b/bin/mdpage.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/bin/page.sh b/bin/page.sh index 1708c48..f37c76f 100755 --- a/bin/page.sh +++ b/bin/page.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash expand() { TITLE="$1" diff --git a/bin/rss.sh b/bin/rss.sh index a09330b..d7285f6 100755 --- a/bin/rss.sh +++ b/bin/rss.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash remove_nbsp() { sed 's#\ # #g' diff --git a/bin/toc.sh b/bin/toc.sh index 6aed27e..6cc7347 100755 --- a/bin/toc.sh +++ b/bin/toc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/knazarov.com.nix b/knazarov.com.nix index 57b2914..6055457 100644 --- a/knazarov.com.nix +++ b/knazarov.com.nix @@ -18,6 +18,7 @@ stdenv.mkDerivation rec { gawk gnused rsync + darkhttpd ]; src = ./.;