~japanoise/webdir

Static web directory generator

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~japanoise/webdir
read/write
git@git.sr.ht:~japanoise/webdir

You can also use your local clone with git send-email.

#webdir - static web directory generator

This program generates a web directory, inspired by href.cool and awesomeblog.club. The generated pages are no-nonsense, all-killer no-filler, plain static html.

#Usage

Build:

export GOPATH="$HOME/src/go"
mkdir -p ~/src/go/src/git.sr.ht/'~japanoise`/
cd ~/src/go/src/git.sr.ht/'~japanoise`/
git clone "https://git.sr.ht/~japanoise/webdir/"
cd webdir
go build

Create an example config and load it in:

./webdir -x
cp example.json links.json

Edit the config using the visual editor (unless you want to use a text editor):

./webdir -e

Render it:

./webdir

Content is now in public_html.

#Hacking

Currently the customization you can do to the base program is a little limited. However, Golang is an easy language to learn and it shouldn't be too difficult to tweak the program to your needs.

  • The main entrypoint to the program is func main in main.go.
  • The list data structure and operations on it are defined in list.go.
  • Actually rendering to html is done in render.go; starting from func render.
    • func header and func footer are where the header and footer are rendered
  • The visual editor is in edit.go, starting with func visualEditor.

#Copying

Licensed MIT. The author requests but does not require that you buy her a beer if you ever meet her.