forked from GitHub/gf-core
Replace gf-refman.html with Markdown version gf-refman.md
The raw HTML was invalid, and this way we use the common website template
for a uniform look without any duplication.
It seems gf-refman.html was once generated from txt2tags, although I have
been unable to find this original .t2t file.
I also tried to re-generate txt2tags from HTML but was not able to.
However I was able to convert HTML to Markdown using Pandoc and I think
the result is pretty good, so I think we should use this.
The original gf-refman.html can be obtained from git history, e.g.:
a7e43d872f/doc/gf-refman.html
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -54,7 +54,7 @@ doc/gf-bibliography.html
|
||||
doc/gf-developers.html
|
||||
doc/gf-editor-modes.html
|
||||
doc/gf-people.html
|
||||
doc/gf-reference.html
|
||||
doc/gf-refman.html
|
||||
doc/gf-shell-reference.html
|
||||
doc/icfp-2012.html
|
||||
download/*.html
|
||||
|
||||
@@ -93,10 +93,18 @@ function render_md_html {
|
||||
html="$2"
|
||||
relroot="$( dirname $md | sed -E 's/^.\///' | sed -E 's/[^/]+/../g' )"
|
||||
|
||||
# Look for `toc: true` in metadata (first ten lines of file)
|
||||
if head -n 10 "$md" | grep --quiet 'toc: true' ; then
|
||||
toc='--table-of-contents'
|
||||
else
|
||||
toc=''
|
||||
fi
|
||||
|
||||
pandoc \
|
||||
--from=markdown \
|
||||
--to=html5 \
|
||||
--standalone \
|
||||
$toc \
|
||||
--template="$template" \
|
||||
--variable="lang:en" \
|
||||
--variable="rel-root:$relroot" \
|
||||
|
||||
4622
doc/gf-refman.html
4622
doc/gf-refman.html
File diff suppressed because it is too large
Load Diff
2770
doc/gf-refman.md
Normal file
2770
doc/gf-refman.md
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user