From 3ee8a6dbcdc3c8afaea2b83fdc2437b8868c60d1 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 22 Feb 2024 21:38:57 +0100 Subject: Import some basic files --- .exrc | 8 ++++++++ .gitignore | 2 ++ GNUmakefile | 26 ++++++++++++++++++++++++++ LICENSE | 14 ++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 .exrc create mode 100644 .gitignore create mode 100644 GNUmakefile create mode 100644 LICENSE diff --git a/.exrc b/.exrc new file mode 100644 index 0000000..1eb5cfb --- /dev/null +++ b/.exrc @@ -0,0 +1,8 @@ +" Autowrap lines +set tw=80 + +" Auto-compile the site +nnoremap M :w \| make + +let g:netrw_sort_sequence = '^index.gsp$,[\/]$,' +let g:netrw_list_hide .= ',^.*\.html$' diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27e48c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.html +.aspell.en.prepl diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..852c272 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,26 @@ +.PHONY: check clean serve watch + +MAKEFLAGS := -j$(shell nproc) +export PATH := $(PATH):./bin +export LANG := en_US.UTF-8 + +srcs := $(shell find src -type f -name 'index.gsp') +dsts := $(srcs:%.gsp=%.html) + +all: $(dsts) + +%.html: %.gsp + m4 -P -Iinclude m4/* $< | gsp >$@ + +check: + find src -name '*.gsp' -exec \ + aspell --home-dir=./ --ignore-case check {} \; + +clean: + find . -name '*.html' -delete + +serve: + darkhttpd src --daemon + +watch: + git ls-files --others | entr -n $(MAKE) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..276994d --- /dev/null +++ b/LICENSE @@ -0,0 +1,14 @@ +BSD Zero Clause License + +Copyright © 2023 Thomas Voss + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. -- cgit v1.2.3