Commit b51fc826 authored by PoroCYon's avatar PoroCYon

tweaked the build script

parent c1507f08
......@@ -16,7 +16,8 @@ SCSSC ?= sassc
PDMARKDOWN:=markdown_github+raw_tex+yaml_metadata_block+table_captions+implicit_figures+simple_tables+multiline_tables+grid_tables+tex_math_dollars+fenced_code_attributes+inline_code_attributes+markdown_attribute+fancy_lists+all_symbols_escapable+superscript+subscript+header_attributes-emoji-hard_line_breaks
PDFLAGS=-s --ascii -M date=$(DATE) \
-V maintitle=$(MAINTITLE) -c /stc/style-light.css --mathml \
--template=tpl/template -H tpl/header.html
--template=tpl/template -H tpl/header.html \
$(SIDEBAR_FILES_CLEAN)
#-B tpl/before.html -A tpl/after.html
# dev machine has 2.0, prod one has 1.7
......@@ -28,18 +29,21 @@ else
endif
INPUT_FILES:=$(shell find src/ -type f -name "*.md")
SIDEBAR_FILES:=$(shell find src/ -mindepth 1 -maxdepth 1 -type f -name "*.md" -and -not -name "index.md")
SIDEBAR_FILES_CLEAN=$(patsubst src/%.md, -V sidebar-links=%, $(SIDEBAR_FILES))
OUTPUT_FILES:=$(patsubst src/%.md, out/%.html, $(INPUT_FILES))
%/:
mkdir -p "$@"
out/%.html: src/%.md
@if ! [ -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi
$(PANDOC) $(PDFLAGS) -f $(PDMARKDOWN) -t html "$<" -o "$@"
out/stc/%.css: sty/%.scss
out/stc/%.css: sty/%.scss out/stc/
$(SCSSC) -t compact -M "$<" "$@"
all: out/stc/ $(wildcard stc/*) $(wildcard tpl/*.html) \
all: $(wildcard stc/*) $(wildcard tpl/*.html) \
out/stc/style-dark.css out/stc/style-light.css \
$(OUTPUT_FILES)
@cp -vr stc/ out/
......
......@@ -50,8 +50,9 @@ $endfor$
</tr>
<tr>
<td class="left">
<!-- TODO: write a macro for this -->
<p><a href="/projects.html">Projects</a></p>
$for(sidebar-links)$
<p><a href="/$sidebar-links$.html">$sidebar-links$</a></p>
$endfor$
</td>
<td class="middle">
$body$
......@@ -69,8 +70,8 @@ $endfor$
</a>
<br />
This work is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
<hr />
$if(date)$
<hr />
<p>Last update: $date$</p>
$endif$
</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment