Skip to content

Commit 1d17201

Browse files
authored
Merge pull request #90 from tomeshnet/remark-module-1
The Remark-able Overhaul!
2 parents a8be5de + 48e2b80 commit 1d17201

File tree

185 files changed

+24669
-886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+24669
-886
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ This course can be facilitated in an environment without internet access. Partic
5252

5353
## Workshop Materials
5454

55-
Class materials are written as [Markdown](https://en.wikipedia.org/wiki/Markdown) files and presentation slides are created as a Markdown-based [GitBook](https://www.gitbook.com). All generated assets are hosted on [GitHub Pages](https://tomeshnet.github.io/p2p-internet-workshop/) and packaged as a downloadable archive on [GitHub Releases](https://github.com/tomeshnet/p2p-internet-workshop/releases/latest).
56-
57-
When facilitating the workshop in an offline environment, you can run `gitbook serve` from a `presentation` directory to serve the slides on `http://localhost:4000`.
55+
Class materials are written as [Markdown](https://en.wikipedia.org/wiki/Markdown) files and presentation slides are created as Markdown-based [Remark slides](https://github.com/gnab/remark). All generated assets are hosted on [GitHub Pages](https://tomeshnet.github.io/p2p-internet-workshop/) and packaged as a downloadable archive on [GitHub Releases](https://github.com/tomeshnet/p2p-internet-workshop/releases/latest).
5856

5957
If you want to generate course assets yourself, simply run `./install-dependencies.sh` and `./build.sh`. You will find the generated assets in the `output` folder. The `./package.sh` script is used to zip up the generated assets into downloadable archives and to create the course website.
6058

@@ -92,7 +90,7 @@ Other accessories:
9290

9391
The first version of this syllabus is created by [Toronto Mesh](https://tomesh.net) contributors: [@benhylau](https://github.com/benhylau), [@darkdrgn2k](https://github.com/darkdrgn2k), [@dcwalk](https://github.com/dcwalk), [@uditvira](https://github.com/uditvira), [@Shrinks99](https://github.com/Shrinks99), and [@Pedro-on-a-bike](https://github.com/Pedro-on-a-bike). While most of the material is created new, the course also incorporates many prior works listed [here](https://tomeshnet.github.io/p2p-internet-workshop/articles/general/general-extra-resources.pdf), or otherwise referenced in their individual course modules.
9492

95-
Hands-on activities rely on software from many projects: [mesh-orange](https://github.com/tomeshnet/mesh-orange), [mesh-router-builder](https://github.com/benhylau/mesh-router-builder), [mesh-workshop](https://github.com/benhylau/mesh-workshop/), [steamlink](https://github.com/steamlink), [cjdns](https://github.com/cjdelisle/cjdns/), [Yggdrasil](https://yggdrasil-network.github.io/about.html), [IPFS](https://ipfs.io/), [Secure Scuttlebutt](https://github.com/ssbc/). Course material generation uses [markdown-pdf](https://github.com/alanshaw/markdown-pdf) and [gitbook-cli](https://github.com/GitbookIO/gitbook-cli). The course website is built with [Jekyll](https://jekyllrb.com/), and the theme is from [Mozilla's Open Leadership Training Series](https://github.com/mozilla/open-leadership-training-series). Icons from [Font Awesome](http://fontawesome.io/) and [Jake Ingman](https://thenounproject.com/search/?q=mesh&i=74809) are used.
93+
Hands-on activities rely on software from many projects: [mesh-orange](https://github.com/tomeshnet/mesh-orange), [mesh-router-builder](https://github.com/benhylau/mesh-router-builder), [mesh-workshop](https://github.com/benhylau/mesh-workshop/), [steamlink](https://github.com/steamlink), [cjdns](https://github.com/cjdelisle/cjdns/), [Yggdrasil](https://yggdrasil-network.github.io/about.html), [IPFS](https://ipfs.io/), [Secure Scuttlebutt](https://github.com/ssbc/). Course material generation uses [markdown-pdf](https://github.com/alanshaw/markdown-pdf) and [decktape](https://github.com/astefanutti/decktape). The course website is built with [Jekyll](https://jekyllrb.com/), and the theme is from [Mozilla's Open Leadership Training Series](https://github.com/mozilla/open-leadership-training-series). Icons from [Font Awesome](http://fontawesome.io/) and [Jake Ingman](https://thenounproject.com/search/?q=mesh&i=74809) are used.
9694

9795
## License
9896

build.sh

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@ mkdir output
88
css="pdf.css"
99
echo "Using CSS styles from $css"
1010

11+
# Define starting directory
12+
base_dir="$(pwd)"
13+
14+
# Create folder for general assets
15+
mkdir output/general
16+
1117
# Generate general assets
1218
for doc in general/*.md; do
13-
# Create folder for general assets
14-
mkdir output/general
1519

1620
# Generate assets as .pdf
1721
if [ -f $doc ]; then
@@ -21,10 +25,13 @@ for doc in general/*.md; do
2125
fi
2226
done
2327

28+
# Copy technical files used by Remark
29+
cp -r "slide-files" "output/"
30+
2431
# Go through each module
2532
for mod in module-*; do
2633
# Create folder for module
27-
mkdir "$mod"
34+
mkdir "output/$mod"
2835

2936
# Generate lesson plan .pdf
3037
doc="$mod/README.md"
@@ -34,21 +41,29 @@ for mod in module-*; do
3441
markdown-pdf "$doc" --out "$out" --cwd "$mod" --css-path "$css"
3542
fi
3643

37-
# Generate worksheets as .pdf
38-
mkdir "output/$mod/worksheet"
39-
for doc in $mod/worksheet/*.md; do
44+
# Generate handouts as .pdf
45+
mkdir "output/$mod/handouts"
46+
for doc in $mod/handouts/*.md; do
4047
if [ -f $doc ]; then
41-
out="output/$mod/worksheet/$(echo "$doc" | sed 's|/|-|g' | sed 's|.md|.pdf|')"
42-
echo "Generating worksheet from $doc to $out"
43-
markdown-pdf "$doc" --out "$out" --cwd "$mod/worksheet" --css-path "$css"
48+
out="output/$mod/handouts/$(echo "$doc" | sed 's|/|-|g' | sed 's|.md|.pdf|')"
49+
echo "Generating handouts from $doc to $out"
50+
markdown-pdf "$doc" --out "$out" --cwd "$mod/handouts" --css-path "$css"
4451
fi
4552
done
4653

47-
# Generate presentation GitBook
48-
book="$mod/presentation"
49-
if [ -d $book ]; then
50-
out="output/$mod/presentation"
51-
echo "Generating presentation from $book to $out"
52-
gitbook build "$book" "$out"
53-
fi
54+
# Copy Remark presentation and generate .pdf copy with DeckTape
55+
doc="presentation.html"
56+
cd $mod
57+
if [ -f $doc ]; then
58+
# Generate .pdf
59+
out="../output/$mod/handouts/$mod-presentation.pdf"
60+
echo "Generating presentation from $mod/$doc to $out"
61+
decktape remark "$doc" "$out" --chrome-arg=--allow-file-access-from-files
62+
63+
# Copy Remark presentation
64+
cp -r "slide-images" "../output/$mod/"
65+
cp "$doc" "../output/$mod/"
66+
fi
67+
cd $base_dir
68+
5469
done

install-dependencies.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22

3-
# For generating course materials in PDF
3+
# For rendering course materials to .pdf
44
npm install -g markdown-pdf
55

6-
# For generating presentation slides with GitBook
7-
npm install -g gitbook-cli
6+
# For converting Remark presentations to .pdf
7+
npm install -g decktape
88

99
# For generating course website with Jekyll
1010
gem install bundler
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)