Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Use pandoc to generate README and doc.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jung-kurt committed May 4, 2019
1 parent a07f8a6 commit f948d2a
Show file tree
Hide file tree
Showing 18 changed files with 1,377 additions and 1,903 deletions.
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
all : ok documentation lint

documentation : doc/index.html doc.go README.md

lint : ok/index.html

ok :
mkdir ok

ok/%.html : doc/%.html
tidy -quiet -output /dev/null $<
touch $@

cov : all
go test -v -coverprofile=coverage && go tool cover -html=coverage -o=coverage.html

check :
golint .
go vet -all .
gofmt -s -l .

README.md : doc/document.md
pandoc --read=markdown --write=gfm < $< > $@

doc/index.html : doc/document.md doc/html.txt doc/caddy.xml
pandoc --read=markdown --write=html --template=doc/html.txt \
--metadata pagetitle="CGI for Caddy" --syntax-definition=doc/caddy.xml < $< > $@

doc.go : doc/document.md doc/go.awk
pandoc --read=markdown --write=plain $< | awk -f doc/go.awk > $@
gofmt -s -w $@

build :
cd ../caddy-custom
go build -v
sudo setcap cap_net_bind_service=+ep ./caddy
./caddy -plugins | grep cgi
./caddy -version

clean :
rm -f coverage.html coverage ok/* doc/index.html doc.go README.md
952 changes: 497 additions & 455 deletions README.md

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions check

This file was deleted.

848 changes: 430 additions & 418 deletions doc.go

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions doc/Makefile

This file was deleted.

33 changes: 33 additions & 0 deletions doc/caddy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="caddyfile" version="2" kateversion="5.0" section="3D" extensions="*.caddyfile" mimetype="application/sla" author="jung" license="mit">
<highlighting>
<list name="keywords">
<item>cgi</item>
<item>dir</item>
<item>empty_env</item>
<item>env</item>
<item>except</item>
<item>exec</item>
<item>inspect</item>
<item>match</item>
<item>pass_all_env</item>
<item>pass_env</item>
<item>root</item>
</list>
<contexts>
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces/>
<Float attribute="Float" context="#stay"/>
<Int attribute="Decimal" context="#stay"/>
<keyword attribute="Keyword" context="#stay" String="keywords"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsKeyword"/>
<itemData name="Decimal" defStyleNum="dsDecVal"/>
<itemData name="Float" defStyleNum="dsFloat"/>
</itemDatas>
</highlighting>
</language>
93 changes: 0 additions & 93 deletions doc/doc.lua

This file was deleted.

Loading

0 comments on commit f948d2a

Please sign in to comment.