Markdown support for pages
parent
6b42aef7a1
commit
508981884a
8
Makefile
8
Makefile
|
@ -17,7 +17,9 @@
|
|||
# #
|
||||
|
||||
pages := $(patsubst %.pg, %.html, \
|
||||
$(shell find docs/ -name '*.pg'))
|
||||
$(shell find docs/ -name '*.pg'))
|
||||
pages_md := $(patsubst %.md, %.html, \
|
||||
$(shell find docs/ -name '*.md'))
|
||||
articles := $(patsubst %.txt, %.html, \
|
||||
$(shell find docs/ -maxdepth 2 -name '*.txt'))
|
||||
# articles in TeX with an inappropriate var name
|
||||
|
@ -64,6 +66,8 @@ thoughts:
|
|||
# "pages"
|
||||
%.html: %.pg docs/papers/.list
|
||||
$(repo2html) -icontent -ftools/extfmt <$< >$@
|
||||
%.html: %.md
|
||||
$(repo2html) -icontent -ftools/mdfmt <$< >$@
|
||||
|
||||
# TeX papers are expected to have their own makefiles as well as an abstract.tex
|
||||
%.html: coope/%.tex
|
||||
|
@ -73,7 +77,7 @@ thoughts:
|
|||
docs/papers/.list: thoughts articles
|
||||
echo "$(articles) $(texticles)" | tr ' ' '\n' | tools/doclist >$@
|
||||
|
||||
pages: $(pages)
|
||||
pages: $(pages) $(pages_md)
|
||||
articles: $(articles) $(texticles)
|
||||
docs: pages articles
|
||||
www-root: docs thoughts
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# Formatter for Markdown
|
||||
#
|
||||
# Copyright (C) 2015 Mike Gerwitz
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This processes works written in Markdown.
|
||||
##
|
||||
|
||||
exec pandoc -S -fmarkdown -thtml5
|
|
@ -51,5 +51,4 @@ test "$timestamp" -gt "$md_cutoff" \
|
|||
|| fmt-old
|
||||
|
||||
# it's just that simple.
|
||||
exec pandoc -S -fmarkdown -thtml5
|
||||
|
||||
exec "$(dirname "$0" )"/mdfmt
|
||||
|
|
Loading…
Reference in New Issue