From 5100ebc54aa4906f4e97f7fba5f29c2d80e53a2b Mon Sep 17 00:00:00 2001 From: Aaron O'Leary Date: Mon, 10 Nov 2014 19:01:43 +0000 Subject: [PATCH 1/2] pandoc filter to convert blockquotes to divs This filter converts all blockquote-with-attributes to div-with-attributes. A blockquote-with-attributes is defined as a blockquote that has a header with attributes defined on it as it's first element, e.g. > # valid blockquote {.class} > text This example would be converted into this markdown:
# valid blockquote text
And the equivalent html. The class must be one of the allowed classes defined in the filter (i.e. one of 'callout', 'objectives' or 'challenge'). --- pages/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/Makefile b/pages/Makefile index fae66bd20..ae8e8d1ae 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -24,6 +24,7 @@ $(DST_DIR)/%.html : $(SRC_DIR)/%.md pandoc -s -t html \ --title-prefix='Software Carpentry' \ --template=../_layouts/page \ + --filter=../tools/blockquote2div.py \ $(INCLUDES) \ -o $@ $< From efc51c5c630e42636f738f2741cab5005823db77 Mon Sep 17 00:00:00 2001 From: Aaron O'Leary Date: Wed, 12 Nov 2014 12:39:57 +0000 Subject: [PATCH 2/2] add pandoc dependencies to README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 6839737c9..dc703f004 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,17 @@ create a new lesson: 8. Push your changes to GitHub for viewing. 9. Tell us where your lesson is so that we can use it and help you improve it. +### Dependencies + +1. [Install Pandoc]http://www.johnmacfarlane.net/pandoc/installing.html) + +2. Install pandocfilters, a python module that helps with writing + filters for pandoc: + + ~~~ + pip install pandocfilters + ~~~ + ## Why Use a Template? We organize our lessons in a standard way so that: