From b2aeb6d05dfa613ff4d9263a7c08c5773e302483 Mon Sep 17 00:00:00 2001 From: adnano Date: Tue, 10 Nov 2020 19:34:05 -0500 Subject: [PATCH] Add documentation --- .gitignore | 1 + Makefile | 22 ++++++++++++++++++---- README.md | 16 +++++++++++++--- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 8c4affa..4fe51c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ kiln +*.1 diff --git a/Makefile b/Makefile index 819981e..151035a 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,27 @@ .POSIX: .SUFFIXES: +.SUFFIXES: .1 .1.scd VERSION=0.0.0 PREFIX?=/usr/local +MANDIR?=$(PREFIX)/share/man +VPATH=doc GO?=go GOFLAGS?= GOSRC!=find . -name '*.go' GOSRC+=go.mod go.sum -all: kiln +DOCS := \ + kiln.1 + +all: kiln doc + +doc: $(DOCS) + +.1.scd.1: + scdoc < $< > $@ kiln: $(GOSRC) $(GO) build $(GOFLAGS) \ @@ -20,13 +31,16 @@ kiln: $(GOSRC) -o $@ clean: - rm -f kiln + $(RM) kiln + $(RM) $(DOCS) install: all - mkdir -p $(DESTDIR)$(PREFIX)/bin + mkdir -p $(DESTDIR)$(PREFIX)/bin $(DESTDIR)$(MANDIR)/man1 install -m755 kiln $(DESTDIR)$(PREFIX)/bin + install -m755 kiln.1 $(MANDIR)/man1/kiln.1 uninstall: $(RM) $(DESTDIR)$(PREFIX)/bin/kiln + $(RM) $(DESTDIR)$(MANDIR)/man1/kiln.1 -.PHONY: all clean install uninstall +.PHONY: all doc clean install uninstall diff --git a/README.md b/README.md index 55a0339..f86da40 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,11 @@ A simple static site generator for Gemini. ## Installation -First install Go version 1.15 or later. +First install the dependencies: + +- Go 1.15 or later +- scdoc + Then compile: $ make @@ -20,6 +24,12 @@ Then compile: ## Usage - kiln +See kiln(1) -For more information, consult the [wiki](https://man.sr.ht/~adnano/kiln/). +## Contributing + +For end-user discussion and questions, start a thread on [~adnano/kiln-discuss](https://lists.sr.ht/~adnano/kiln-discuss). + +Send patches to [~adnano/kiln-devel](https://lists.sr.ht/~adnano/kiln-devel). + +Subscribe to release announcements on [~adnano/kiln-announce](https://lists.sr.ht/~adnano/kiln-announce).