update syntax style
This commit is contained in:
parent
55adb103cc
commit
cf93279141
10 changed files with 435 additions and 190 deletions
5
Makefile
5
Makefile
|
|
@ -13,6 +13,7 @@ IMAGEDIR := images
|
|||
|
||||
# The name of the stylesheet. This needs to be copied to any directory containing html files that use it.
|
||||
style := $(STYLEDIR)/style.css
|
||||
syntax_style := $(PANDOCDIR)/solarized.theme
|
||||
|
||||
# Main html template that pandoc uses to generate .html from .md files
|
||||
template_html := $(PANDOCDIR)/html-template.html
|
||||
|
|
@ -50,7 +51,7 @@ $(BUILDDIR)/$(ARTICLEDIR)/%.html: $(SRCDIR)/$(ARTICLEDIR)/%.md | $(BUILDDIR)
|
|||
jq 'del(.articles[] | select(.filename == "$(patsubst %.html,%,$(notdir $@))"))' $(article_list) > articles.json.tmp; \
|
||||
mv articles.json.tmp $(article_list); \
|
||||
# Build articles using pandoc
|
||||
pandoc $< --template $(template_html) --css $(style) --highlight-style zenburn --mathml --toc --output $@; \
|
||||
pandoc $< --template $(template_html) --css $(style) --highlight-style $(syntax_style) --mathml --toc --output $@; \
|
||||
# Extract metadata from .md file, append filename field to the article object.
|
||||
# This is used to link to the article from index.html. Append article object to the article list.
|
||||
jq '.articles += [$(shell pandoc $< --template $(list_template) | jq '. += {"filename": "$(patsubst %.html,%,$(notdir $@))", "pubdate": "$(shell date -d $(shell pandoc $< --template $(list_template) | jq '.date') --rfc-2822)"}')]' $(article_list) > articles.json.tmp; \
|
||||
|
|
@ -65,7 +66,7 @@ $(BUILDDIR)/index.html: $(SRCDIR)/index.md $(articles_html) | $(BUILDDIR)
|
|||
jq '.articles |= sort_by(.date) | .articles |= reverse' ${article_list} > articles.json.tmp; \
|
||||
mv articles.json.tmp ${article_list}; \
|
||||
# Build index.html with metadata injected from articles_list
|
||||
pandoc $< --template $(template_html) --include-after-body $(shark_js) --css $(style) --metadata-file $(article_list) --highlight-style zenburn --mathml --toc --output $@;
|
||||
pandoc $< --template $(template_html) --include-after-body $(shark_js) --css $(style) --metadata-file $(article_list) --highlight-style $(syntax_style) --mathml --toc --output $@;
|
||||
|
||||
$(BUILDDIR)/index: $(SRCDIR)/index.md $(articles_ansi) | $(BUILDDIR)
|
||||
pandoc $< --template $(template_ansi) --metadata-file $(article_list) --to ansi --output $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue