Browse Source

[revealmd] Initial commit

drymer 1 year ago
parent
commit
084b295727
Signed by: drymer <drymer@autistici.org> GPG Key ID: A307D64D5DDFDAAD
3 changed files with 41 additions and 0 deletions
  1. 5
    0
      reveal-md/Dockerfile
  2. 20
    0
      reveal-md/README.md
  3. 16
    0
      reveal-md/entrypoint.sh

+ 5
- 0
reveal-md/Dockerfile View File

@@ -0,0 +1,5 @@
1
+FROM node:6
2
+RUN npm install -g reveal-md
3
+WORKDIR /revealjs
4
+COPY entrypoint.sh /revealjs
5
+ENTRYPOINT ["./entrypoint.sh"]

+ 20
- 0
reveal-md/README.md View File

@@ -0,0 +1,20 @@
1
+# Reveal-md
2
+
3
+With this image you can use Reveal.js with the
4
+[reveal-md](https://github.com/webpro/reveal-md)
5
+plugin without installing npm, which is always nice. This image will expect to
6
+find your reveal files at `/revealjs/files`. You may use this image with the
7
+next function:
8
+
9
+``` bash
10
+reveal () {
11
+	async () {
12
+		sleep 3 && xdg-open http:localhost:8000
13
+	}
14
+	async &|
15
+	docker run -ti --name registry.daemons.it/revealmd --rm -v `pwd`:/revealjs/files/ -p 8000:8000 revealjs
16
+}
17
+```
18
+
19
+You may use a css called `presentation.css` and a MD preprocessor called
20
+`preproc.js`.

+ 16
- 0
reveal-md/entrypoint.sh View File

@@ -0,0 +1,16 @@
1
+#!/bin/bash
2
+
3
+for file in `ls files`
4
+do
5
+    ln -sf files/$file $file
6
+done
7
+
8
+if [[ -e files/presentation.css ]];then
9
+    css="--css files/presentation.css"
10
+fi
11
+
12
+if [[ -e files/preproc.js ]]; then
13
+    preproc="--preprocessor files/preproc.js"
14
+fi
15
+
16
+reveal-md files -w $css $preproc

Loading…
Cancel
Save