forked from GitHub/gf-rgl
Make HTML template a bit more generic
This commit is contained in:
@@ -2,14 +2,16 @@ TMP=tmp.html
|
|||||||
TEMPLATE=../synopsis/template.html
|
TEMPLATE=../synopsis/template.html
|
||||||
ROOT=../..
|
ROOT=../..
|
||||||
|
|
||||||
|
TITLE=$(shell head -n 1 sources.txt)
|
||||||
sources.html: sources.txt $(TEMPLATE)
|
sources.html: sources.txt $(TEMPLATE)
|
||||||
txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$<
|
txt2tags --target=html --no-headers --quiet --outfile=$@ --infile=$<
|
||||||
pandoc \
|
pandoc \
|
||||||
--from=html \
|
--from=html \
|
||||||
--to=html5 \
|
--to=html5 \
|
||||||
--standalone \
|
--standalone \
|
||||||
--template=$(TEMPLATE) \
|
--template=$(TEMPLATE) \
|
||||||
--metadata='title:"More modules in the GF Resource Grammar Library"' \
|
--metadata='title:"$(TITLE)"' \
|
||||||
|
--variable='lang:en' \
|
||||||
--variable='rel-root:$(ROOT)/..' \
|
--variable='rel-root:$(ROOT)/..' \
|
||||||
--output=$(TMP) \
|
--output=$(TMP) \
|
||||||
$@
|
$@
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ index: index.html
|
|||||||
index.txt: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES)
|
index.txt: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES)
|
||||||
runghc -i$(ROOT) MkSynopsis.hs
|
runghc -i$(ROOT) MkSynopsis.hs
|
||||||
|
|
||||||
|
TITLE=$(shell head -n 1 index.txt)
|
||||||
index.html: index.txt $(TEMPLATE)
|
index.html: index.txt $(TEMPLATE)
|
||||||
txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$<
|
txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$<
|
||||||
pandoc \
|
pandoc \
|
||||||
@@ -36,9 +37,11 @@ index.html: index.txt $(TEMPLATE)
|
|||||||
--to=html5 \
|
--to=html5 \
|
||||||
--standalone \
|
--standalone \
|
||||||
--template=$(TEMPLATE) \
|
--template=$(TEMPLATE) \
|
||||||
--css="synopsis.css" \
|
--metadata='title:"$(TITLE)"' \
|
||||||
--metadata='title:"GF Resource Grammar Library: Synopsis"' \
|
--variable='lang:en' \
|
||||||
--variable='rel-root:$(ROOT)/..' \
|
--variable='rel-root:$(ROOT)/..' \
|
||||||
|
--css="synopsis.css" \
|
||||||
|
--include-after-body="quicklinks.html" \
|
||||||
--output=$(TMP) \
|
--output=$(TMP) \
|
||||||
$@
|
$@
|
||||||
mv $(TMP) $@
|
mv $(TMP) $@
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
|
|
||||||
==The Prelude module==
|
==The Prelude module==
|
||||||
|
|
||||||
The ``Prelude`` defines commonly used utility functions, in particular for
|
The ``Prelude`` defines commonly used utility functions, in particular for strings and booleans.
|
||||||
strings and booleans.
|
|
||||||
|
|
||||||
|| Oper | Type | Explanation |
|
|| Oper | Type | Explanation |
|
||||||
| ``SS`` | ``Type`` | the type ``{s : Str}``
|
| ``SS`` | ``Type`` | the type ``{s : Str}``
|
||||||
|
|||||||
1
doc/synopsis/quicklinks.html
Normal file
1
doc/synopsis/quicklinks.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<script src="quicklinks.js"></script>
|
||||||
@@ -28,6 +28,9 @@ $for(header-includes)$
|
|||||||
$endfor$
|
$endfor$
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
$for(include-before)$
|
||||||
|
$include-before$
|
||||||
|
$endfor$
|
||||||
<div class="container-fluid my-4">
|
<div class="container-fluid my-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
@@ -81,7 +84,7 @@ $endif$
|
|||||||
<h6 class="text-muted">Documentation</h6>
|
<h6 class="text-muted">Documentation</h6>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li><a href="$rel-root$/doc/gf-shell-reference.html">GF Shell Reference</a></li>
|
<li><a href="$rel-root$/doc/gf-shell-reference.html">GF Shell Reference</a></li>
|
||||||
<li><a href="$rel-root$/lib/doc/synopsis.html">RGL Library Synopsis</a></li>
|
<li><a href="$rel-root$/lib/doc/synopsis/index.html">RGL Library Synopsis</a></li>
|
||||||
<li><a href="$rel-root$/gf-book">The GF Book</a></li>
|
<li><a href="$rel-root$/gf-book">The GF Book</a></li>
|
||||||
<li><a href="$rel-root$/doc/gf-refman.html">Reference Manual</a></li>
|
<li><a href="$rel-root$/doc/gf-refman.html">Reference Manual</a></li>
|
||||||
<li><a href="$rel-root$/doc/tutorial/gf-tutorial.html">Tutorial</a></li>
|
<li><a href="$rel-root$/doc/tutorial/gf-tutorial.html">Tutorial</a></li>
|
||||||
@@ -109,9 +112,9 @@ $endif$
|
|||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
</footer>
|
</footer>
|
||||||
|
$for(include-after)$
|
||||||
<script src="quicklinks.js"></script>
|
$include-after$
|
||||||
|
$endfor$
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||||
|
|||||||
Reference in New Issue
Block a user