Finalize initial import

This commit is contained in:
Glenn Y. Rolland 2020-04-15 14:07:35 +02:00
parent 99c8d5931d
commit 59304fb6d0
8 changed files with 3685 additions and 4 deletions

2
.gitignore vendored
View file

@ -1,7 +1,9 @@
\.vagrant
.sass-cache
node_modules
_inspiration/
*.pdf
*.epub
*.docx
/site
/tmp

View file

@ -1,13 +1,22 @@
SLIDES_MD=$(shell find slides \( -name '*.md' ! -name '_*' \))
SLIDES_PDF=$(patsubst slides/%.md,build/slides/%.pdf,$(SLIDES_MD))
all: help
echo:
@echo "SLIDES = $(SLIDES_PDF)"
prepare:
pipenv install
watch: ## run development server
pipenv run honcho start
watch-mkdocs:
watch-slides:
npx marp --engine $$(pwd)/engine.js --html --theme theme.css -w slides -s
watch-docs:
pipenv run mkdocs serve --dev-addr 0.0.0.0:5001
serve: watch
@ -18,9 +27,23 @@ tocupdate:
pipenv run ./scripts/update-toc ; \
done
build:## build static pages
build/slides/%.pdf: slides/%.md
mkdir -p build/slides
npx marp --allow-local-files \
--engine $$(pwd)/engine.js \
--html \
--theme theme.css \
$< \
-o $@
build-slides: $(SLIDES_PDF) $(SLIDES_MD)
build-docs:
pipenv run mkdocs build
build: build-docs build-slides ## build static pages
.PHONY: build build-slides
install: ## deploy static pages to github
git push
pipenv run mkdocs gh-deploy

View file

@ -1,2 +1,3 @@
web: make watch-mkdocs
docs: make watch-docs
slides: make watch-slides
toc: make tocupdate

12
engine.js Normal file
View file

@ -0,0 +1,12 @@
// engine.js
// You have to run `npm i @marp-team/marp-core` at first.
const { Marp } = require('@marp-team/marp-core')
module.exports = opts => {
const marp = new Marp(opts)
// Disable parsing fragmented list
marp.markdown.core.ruler.disable('marpit_fragment')
return marp
}

3643
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@marp-team/marp-cli": "^0.16.2",
"@marp-team/marp-cli": "^0.17.3",
"foreman": "^3.0.1",
"node-sass": "^4.13.0"
}

View file