diff --git a/doc/gfdoc/Makefile b/doc/gfdoc/Makefile index 14f0024f..9074eaa8 100644 --- a/doc/gfdoc/Makefile +++ b/doc/gfdoc/Makefile @@ -2,14 +2,16 @@ TMP=tmp.html TEMPLATE=../synopsis/template.html ROOT=../.. +TITLE=$(shell head -n 1 sources.txt) sources.html: sources.txt $(TEMPLATE) - txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$< + txt2tags --target=html --no-headers --quiet --outfile=$@ --infile=$< pandoc \ --from=html \ --to=html5 \ --standalone \ --template=$(TEMPLATE) \ - --metadata='title:"More modules in the GF Resource Grammar Library"' \ + --metadata='title:"$(TITLE)"' \ + --variable='lang:en' \ --variable='rel-root:$(ROOT)/..' \ --output=$(TMP) \ $@ diff --git a/doc/synopsis/Makefile b/doc/synopsis/Makefile index 87d0d2b1..61f9f271 100644 --- a/doc/synopsis/Makefile +++ b/doc/synopsis/Makefile @@ -29,6 +29,7 @@ index: index.html index.txt: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES) runghc -i$(ROOT) MkSynopsis.hs +TITLE=$(shell head -n 1 index.txt) index.html: index.txt $(TEMPLATE) txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$< pandoc \ @@ -36,9 +37,11 @@ index.html: index.txt $(TEMPLATE) --to=html5 \ --standalone \ --template=$(TEMPLATE) \ - --css="synopsis.css" \ - --metadata='title:"GF Resource Grammar Library: Synopsis"' \ + --metadata='title:"$(TITLE)"' \ + --variable='lang:en' \ --variable='rel-root:$(ROOT)/..' \ + --css="synopsis.css" \ + --include-after-body="quicklinks.html" \ --output=$(TMP) \ $@ mv $(TMP) $@ diff --git a/doc/synopsis/additional.txt b/doc/synopsis/additional.txt index 43a47891..c618b79a 100644 --- a/doc/synopsis/additional.txt +++ b/doc/synopsis/additional.txt @@ -7,8 +7,7 @@ ==The Prelude module== -The ``Prelude`` defines commonly used utility functions, in particular for -strings and booleans. +The ``Prelude`` defines commonly used utility functions, in particular for strings and booleans. || Oper | Type | Explanation | | ``SS`` | ``Type`` | the type ``{s : Str}`` diff --git a/doc/synopsis/quicklinks.html b/doc/synopsis/quicklinks.html new file mode 100644 index 00000000..a7f4fa82 --- /dev/null +++ b/doc/synopsis/quicklinks.html @@ -0,0 +1 @@ + diff --git a/doc/synopsis/template.html b/doc/synopsis/template.html index 5e5c134b..bf691e58 100644 --- a/doc/synopsis/template.html +++ b/doc/synopsis/template.html @@ -28,6 +28,9 @@ $for(header-includes)$ $endfor$
+$for(include-before)$ +$include-before$ +$endfor$