Browse Source

initial commit

master
Brett Langdon 12 years ago
commit
265de447d7
5 changed files with 83 additions and 0 deletions
  1. +1
    -0
      .gitignore
  2. +14
    -0
      Makefile
  3. +42
    -0
      README.md
  4. +0
    -0
      slides/.empty
  5. +26
    -0
      template.html

+ 1
- 0
.gitignore View File

@ -0,0 +1 @@
build

+ 14
- 0
Makefile View File

@ -0,0 +1,14 @@
build: clean
@mkdir ./build
@for file in ./slides/*; do cat $$file >> ./build/slides.md; echo '\r\n---\r\n' >> ./build/slides.md; done;
@sed -i -e :a -e '$$d;N;2,3ba' -e 'P;D' ./build/slides.md
@cp ./template.html ./build/index.html
@sed -i -e "/{{slides}}/r ./build/slides.md" -e "//d" ./build/index.html
clean:
@rm -rf ./build
run:
@cd ./build && python -m SimpleHTTPServer
.PHONY: build

+ 42
- 0
README.md View File

@ -0,0 +1,42 @@
Slideshow Builder
=================
Nothing crazy, just a Makefile which compiles a [remark.js](http://remarkjs.com/)
presentation from a template html file and a directory of markdown slides.
## Usage
### Clone from github
```bash
git clone git://github.com/brettlangdon/slideshow-builder
cd ./slideshow-builder
```
### Write your slides
Create a new file for each individual slide in the `slides`
directory. Make sure they are in the order you wish them to
be in the slideshow. E.g. `1_title.md`, `2_about_me.md`, etc.
Please refer to Remark's [documentation](https://github.com/gnab/remark/wiki)
for information on formatting slides.
### Edit Template, Optional
Edit the `template.html` file to suit your needs.
The slides contents will be replaced with `{{slides}}` in
the template file.
### Build Slideshow
Just run `make` from the root directory
Everything will get put into the `build` directory.
### Viewing slideshow
Either copy `./build/index.html` to a web server or open in a browser,
or you can run `make run` to run `python -m SimpleHTTPServer` from
within the `./build` directory.
## License
Do whatever you want. This is just a Makefile

+ 0
- 0
slides/.empty View File


+ 26
- 0
template.html View File

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>My Slideshow</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css">
.remark-code {
border-radius: 6px;
}
</style>
</head>
<body>
<textarea id="source">
{{slides}}
</textarea>
<script src="http://gnab.github.io/remark/downloads/remark-0.6.0.min.js" type="text/javascript">
</script>
<script type="text/javascript">
var slideshow = remark.create({
highlightLanguage: "javascript",
highlightInline: true,
highlightStyle: "monokai"
});
</script>
</body>
</html>

Loading…
Cancel
Save