mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-07-02 11:58:34 -06:00
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.: https://github.com/GrammaticalFramework/gf-core/blob/a7e43d872f5e612f93131f2d8caf811fbee9aa83/doc/gf-refman.html
This commit is contained in:
+1
-1
@@ -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
File diff suppressed because it is too large
Load Diff
+2770
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user