summary refs log tree commit diff
path: root/bin/Makefile
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-02-17 21:30:00 -0500
committerJune McEnroe <june@causal.agency>2019-02-17 21:30:00 -0500
commitc5c30c613722567b9cd67b8bc575f6d79370940f (patch)
tree67bea00fad44e49ca341ecc566acb0fea487fcb1 /bin/Makefile
parentAdd hi -f html -o anchor for line number links (diff)
downloadsrc-c5c30c613722567b9cd67b8bc575f6d79370940f.tar.gz
src-c5c30c613722567b9cd67b8bc575f6d79370940f.zip
Generate HTML with hi -n -f html -o anchor
Running hi twice to insert stuff between the head and the content is a
bit of a hack but oh well.
Diffstat (limited to 'bin/Makefile')
-rw-r--r--bin/Makefile10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/Makefile b/bin/Makefile
index 9fa34ce9..43d2cce1 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -101,18 +101,16 @@ $(HTMLS): ttpre hi
 .SUFFIXES: .html
 
 .c.html:
-	@echo '<!DOCTYPE html>' > $@
-	@echo '<title>$(<:%.c=%)</title>' >> $@
+	@./hi -f html -o document,anchor,tab=4 -m $< /dev/null > $@
 	@echo '<code><a href="$(GITEA_URL)/$<">$< in git</a></code>' >> $@
 	man -P cat ./man1/$(<:%.c=%.1) | ./ttpre >> $@
-	./hi -f html -o inline,tab=4 $< >> $@
+	./hi -n -f html -o anchor $< >> $@
 
 .sh.html:
-	@echo '<!DOCTYPE html>' > $@
-	@echo '<title>$(<:%.sh=%)</title>' >> $@
+	@./hi -f html -o document,anchor,tab=4 -m $< /dev/null > $@
 	@echo '<code><a href="$(GITEA_URL)/$<">$< in git</a></code>' >> $@
 	man -P cat ./man1/$(<:%.sh=%.1) | ./ttpre >> $@
-	./hi -f html -o inline,tab=4 $< >> $@
+	./hi -n -f html -o anchor $< >> $@
 
 clean:
 	rm -f $(BINS_ALL) $(LINKS) tags scheme.h scheme.png *.o *.html