From 163cfb9dce35ba2fd1c33a7a6cb02187393dd7bd Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 21 Jul 2021 13:58:16 +0200 Subject: [PATCH 1/6] Update usage instructions --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index ceebc74..3750efc 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Make sure you have python and node installed + git remote rename origin boilerplate + git remote add origin git@... + + Install python packages pip install -U pipenv @@ -16,6 +20,13 @@ Install node packages ## Usage +### First steps + +Clean this repository + +Change the remote + + ### Watch mode This mode allows you the result on-the-fly as you makea changes in the content. From 03dc8e36c83faa71a929e35372bdd67a8e0efa8f Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Wed, 21 Jul 2021 13:59:28 +0200 Subject: [PATCH 2/6] Add missing doc line --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3750efc..8bba8d8 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Make sure you have python and node installed git remote rename origin boilerplate git remote add origin git@... + git checkout -b upstream/boilerplate/master --track Install python packages From 7ae04dee64daee0ccc2a307de165dfed33afc9bf Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Fri, 23 Jul 2021 15:51:16 +0200 Subject: [PATCH 3/6] Add dependency to makefiles-forever --- .gitmodules | 3 +++ .makefiles | 1 + 2 files changed, 4 insertions(+) create mode 160000 .makefiles diff --git a/.gitmodules b/.gitmodules index 69e424c..db3b4ac 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "ext/marp-assets"] path = ext/marp-assets url = git@bitbucket.org:glenux/marp-assets.git +[submodule ".makefiles"] + path = .makefiles + url = https://github.com/glenux/makefiles-forever diff --git a/.makefiles b/.makefiles new file mode 160000 index 0000000..d70b96a --- /dev/null +++ b/.makefiles @@ -0,0 +1 @@ +Subproject commit d70b96a071a1e2bf919d57464c9e1ba1d0d8db56 From 5e6f017f0cb11b8fcc93d510bc40747cdd184bbc Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Fri, 23 Jul 2021 16:15:53 +0200 Subject: [PATCH 4/6] Add support for mdpp slides --- Makefile | 39 +++++++++++++++++---- slides/{index.md => 010-demo/_010-about.md} | 0 slides/010-demo/_020-about.md | 0 slides/index.mdpp | 35 ++++++++++++++++++ 4 files changed, 68 insertions(+), 6 deletions(-) rename slides/{index.md => 010-demo/_010-about.md} (100%) create mode 100644 slides/010-demo/_020-about.md create mode 100644 slides/index.mdpp diff --git a/Makefile b/Makefile index 884d671..cf0cd8d 100755 --- a/Makefile +++ b/Makefile @@ -9,19 +9,31 @@ SLIDES_DIR=slides DOCS_DIR=docs IMAGES_DIR=images BUILD_DIR=_build +CACHE_DIR=_cache + +## Internal directories +CACHE_SLIDES_DIR=$(CACHE_DIR)/slides ## Output directories BUILD_SLIDES_DIR=$(BUILD_DIR)/slides BUILD_DOCS_DIR=$(BUILD_DIR)/docs BUILD_IMAGES_DIR=images + ## Ports DOCS_PORT=5100 SLIDES_PORT=5200 ## Find .md slides -SLIDES_MD=$(shell find $(SLIDES_DIR) \( -name '*.md' ! -name '_*' \)) -SLIDES_PDF=$(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MD)) +SLIDES_MDPP=$(shell find $(SLIDES_DIR) \( -name '*.mdpp' ! -name '_*' \)) +SLIDES_MDPP_MD=$(patsubst $(SLIDES_DIR)/%.mdpp,$(CACHE_SLIDES_DIR)/%.mdpp.md,$(SLIDES_MDPP)) +SLIDES_MDPP_MD_PDF=$(patsubst $(CACHE_SLIDES_DIR)/%.mdpp.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MDPP_MD)) + +SLIDES_MD=$(shell find $(SLIDES_DIR) \( -name '*.md' ! -name '_*' \)) $(SLIDES_MDPP_MD) +SLIDES_MD_PDF=$(patsubst $(SLIDES_DIR)/%.md,$(BUILD_SLIDES_DIR)/%.pdf,$(SLIDES_MD)) + +SLIDES_MD_ALL=$(SLIDES_MDPP_MD) $(SLIDES_MD) +SLIDES_PDF_ALL=$(SLIDES_MDPP_MD_PDF) $(SLIDES_MD_PDF) ## Find .uml graphs DOCS_IMAGES_UML=$(shell find $(IMAGES_DIR) \( -name '*.uml' ! -name '_*' \)) @@ -85,6 +97,11 @@ images: $(DOCS_IMAGES_SVG) $(DOCS_IMAGES_PNG) ## build images %.circo.svg: %.circo circo -Tsvg $< > $@ +$(CACHE_SLIDES_DIR)/%.mdpp.md: $(SLIDES_DIR)/%.mdpp + mkdir -p "$$(dirname "$@")" + m4 -d -I$(SLIDES_DIR) -I$(CACHE_SLIDES_DIR) $< > $@ \ + || ( rm -f $@ && exit 1 ) + .marp/theme.css: cd .marp && $(MAKE) theme.css @@ -126,9 +143,7 @@ serve-docs: watch-docs tocupdate: pipenv run ./scripts/update-toc $(DOCS_DIR) ; \ - -$(BUILD_SLIDES_DIR)/%.pdf: $(SLIDES_DIR)/%.md - mkdir -p $(BUILD_SLIDES_DIR) +$(BUILD_SLIDES_DIR)/%.pdf: $(CACHE_SLIDES_DIR)/%.mdpp.md | $(BUILD_SLIDES_DIR) npx marp --allow-local-files \ --engine $$(pwd)/.marp/engine.js \ --html \ @@ -136,6 +151,16 @@ $(BUILD_SLIDES_DIR)/%.pdf: $(SLIDES_DIR)/%.md $< \ -o $@ +$(BUILD_SLIDES_DIR)/%.pdf: $(SLIDES_DIR)/%.md | $(BUILD_SLIDES_DIR) + npx marp --allow-local-files \ + --engine $$(pwd)/.marp/engine.js \ + --html \ + --theme $$(pwd)/.marp/theme.css \ + $< \ + -o $@ + +$(BUILD_SLIDES_DIR): + mkdir -p $(BUILD_SLIDES_DIR) ## ## Build final documents @@ -146,7 +171,9 @@ $(BUILD_SLIDES_DIR)/%.pdf: $(SLIDES_DIR)/%.md build: build-docs build-slides ## build all documents -build-slides: $(SLIDES_PDF) $(SLIDES_MD) ## build PDF slides only +build-slides: $(SLIDES_PDF_ALL) $(SLIDES_MD_ALL) ## build PDF slides only + +merge-slides: $(SLIDES_MDPP_MD) $(SLIDES_MD_ALL) build-docs: ## build static docs site only $(MAKE) tocupdate diff --git a/slides/index.md b/slides/010-demo/_010-about.md similarity index 100% rename from slides/index.md rename to slides/010-demo/_010-about.md diff --git a/slides/010-demo/_020-about.md b/slides/010-demo/_020-about.md new file mode 100644 index 0000000..e69de29 diff --git a/slides/index.mdpp b/slides/index.mdpp new file mode 100644 index 0000000..03349df --- /dev/null +++ b/slides/index.mdpp @@ -0,0 +1,35 @@ + + + + +![bg w:512 left:50%](images/logo.png) + +# Teaching boilerplate + +---- + +changequote(`{{',`}}')dnl + +include({{slides/010-demo/_010-about.md}})dnl + +---- + +include({{slides/010-demo/_020-about.md}})dnl + +---- + + + +![bg right](images/background.png) + +## Questions ? + From 5ed9a58bac2723bb63aecf3fbeddf2fcf4d40801 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Fri, 23 Jul 2021 16:16:58 +0200 Subject: [PATCH 5/6] Update .makefiles --- .makefiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.makefiles b/.makefiles index d70b96a..d562740 160000 --- a/.makefiles +++ b/.makefiles @@ -1 +1 @@ -Subproject commit d70b96a071a1e2bf919d57464c9e1ba1d0d8db56 +Subproject commit d5627404e17e12ff6349007efc25fa01db4c9c54 From 65f8b8a07daba47520914097fce8b041fbb7dc2e Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Fri, 23 Jul 2021 16:52:57 +0200 Subject: [PATCH 6/6] Add sample images for .dot and .circo --- images/sample-graph.circo | 8 ++++++++ images/sample-graph.dot | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 images/sample-graph.circo create mode 100644 images/sample-graph.dot diff --git a/images/sample-graph.circo b/images/sample-graph.circo new file mode 100644 index 0000000..4fe87a8 --- /dev/null +++ b/images/sample-graph.circo @@ -0,0 +1,8 @@ +digraph G { + A -> B; + B -> C; + B -> D; + C -> E; + C -> F; + C -> G; +} diff --git a/images/sample-graph.dot b/images/sample-graph.dot new file mode 100644 index 0000000..4fe87a8 --- /dev/null +++ b/images/sample-graph.dot @@ -0,0 +1,8 @@ +digraph G { + A -> B; + B -> C; + B -> D; + C -> E; + C -> F; + C -> G; +}