Skip to content

Commit 4390e50

Browse files
committed
Use YAML straight in the markdown file (closes #7)
1 parent 13adb2a commit 4390e50

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ To install pandoc on Mac OS X, run `brew install pandoc`. To install it on Linux
1717

1818
## Getting started
1919

20-
1. Edit `details.yml` with your details, your recipient's details, and the desired settings.
21-
2. Open `letter.md` and write your letter in markdown.
20+
1. Open `letter.md` and fill the YAML frontmatter with your details, your recipient's details, optional subject line, and the desired settings.
21+
2. Write your letter in markdown below.
2222
3. Run `make` to compile the PDF.
2323

2424
If a file named `signature.pdf` is present in the directory, the boilerplate will automatically print it after the letter's body as a final touch. Follow [this method](http://tex.stackexchange.com/a/32940/82423) to import your own signature.

details.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

letter.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
---
2+
# subject: My life as a soldier
3+
author: F. Nietzsche
4+
city: Naumburg
5+
from:
6+
- Artillerieregiment, 8. Batt.
7+
- Nordstraße 15, Naumburg
8+
to:
9+
- Carl Freiherr von Gersdorff
10+
- Stresow-Kaserne I
11+
- Grenadierstraße 13–16
12+
- 13597 Spandau
13+
14+
# Settings
15+
mainfont: Hoefler Text
16+
altfont: Helvetica Neue
17+
monofont: Courier
18+
lang: english
19+
fontsize: 10pt
20+
geometry: a4paper, left=35mm, right=35mm, top=50mm, bottom=25mm
21+
# letterhead: true
22+
---
23+
124
Dear Friend,
225

326
I am a bombardier in the second mounted division of the Fourth Horse Artillery.

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
output.pdf : template.tex details.yml letter.md
1+
output.pdf : template.tex letter.md
22
pandoc $(filter-out $<,$^ ) -o $@ --latex-engine=xelatex --template=$<
33

44
clean :

0 commit comments

Comments
 (0)