Skip to content

Commit afab203

Browse files
committed
Adds Intro to Markdown talk.
1 parent 5d8e48d commit afab203

File tree

1 file changed

+313
-0
lines changed

1 file changed

+313
-0
lines changed

intro_to_markdown.markdown

+313
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,313 @@
1+
It's a well known fact that cyberwizards do a lot of writing.
2+
3+
---
4+
A lot of that writing tends to be spells (programs) or potions (modules).
5+
6+
---
7+
That's great if you're talking to the Great Void (the computer).
8+
9+
---
10+
But what about when you need to communicate with fellow wizards?
11+
12+
---
13+
Chat and IRC and email are swell for NOW, but how about the future?
14+
15+
16+
How about when you've created a fabulous spell..
17+
18+
19+
..but expect others to use it too?
20+
21+
22+
How about if you aren't around to show them how?
23+
24+
---
25+
Spells are cryptic by nature.
26+
27+
28+
They need to be well documented so that other wizards
29+
30+
can understand them.
31+
32+
---
33+
# Equally importantly:
34+
35+
Since cyberwizards work in the terminal and in the browser
36+
37+
a format is needed that plays nicely with both!
38+
39+
---
40+
# Enter Markdown
41+
42+
A markup format for humans to read and write to each other.
43+
44+
---
45+
# Enter Markdown
46+
47+
It retains the benefits of plain text
48+
49+
- readable in any editor (and human)
50+
- not binary
51+
- can be happily piped to and from any program that supports plain text
52+
53+
54+
While gaining many of the benefits of a markup language like HTML:
55+
56+
- expresses rich text
57+
- web ready (unlike plain text)
58+
59+
---
60+
HTML alone is not enough!
61+
62+
63+
Humans can read it, but the source is only legible with great effort.
64+
65+
---
66+
67+
<CUE: side by side comparison>
68+
69+
---
70+
# Why do I care?
71+
72+
73+
- Not owned by any company -- open 'standard'
74+
75+
76+
- Rich open source toolset across many languages
77+
78+
79+
- Maintained and extended by a loving community
80+
81+
---
82+
# Why do I care?
83+
84+
85+
- Easily parsed and convertable to many different formats (HTML, PDF, ...)
86+
87+
88+
- Trivial to edit markdown by hand in any editor; no special tools needed!
89+
90+
91+
- The /lingua franca/ of GitHub documentation (READMEs, Wikis)
92+
93+
94+
- Syntax highlighting (minimum) for just about every editor and IDE!
95+
96+
---
97+
# A Brief History
98+
99+
100+
John Gruber drafted the first doc on Markdown in 2004.
101+
102+
103+
He wrote a reference implementation in Perl.
104+
105+
---
106+
# A Brief History
107+
108+
109+
11 years later, there are **TONS** of flavors
110+
111+
GitHub (GFM), Pandoc, Markdown Extra, CommonMark
112+
113+
---
114+
# State of Affairs
115+
116+
117+
2014: still no standard spec for Markdown.
118+
119+
Gruber's spec is ambiguous and he doesn't seem interested in changing it.
120+
121+
122+
Some folks pushed for a well-defined spec: *Standard Markdown*.
123+
124+
tl;dr: Gruber didn't like it, so now it's *CommonMark*.
125+
126+
---
127+
# State of Affairs
128+
129+
130+
2015: still no /real/ de facto standard. Adoption is slow.
131+
132+
133+
WHAT WILL THE FUTURE HOLD?!
134+
135+
---
136+
# State of Affairs
137+
138+
139+
Regardless, various types of Markdown are used all over the web:
140+
141+
142+
* GitHub
143+
144+
* Slack
145+
146+
* Stack Overflow
147+
148+
* Reddit
149+
150+
---
151+
# Let's Write Some Markdown!
152+
153+
* text is text (but paragraphs are tricksy)
154+
* bold and italics look like what they are
155+
* headings
156+
* bullet points
157+
* links
158+
* code
159+
* images
160+
161+
162+
<CUE: demo time!>
163+
164+
---
165+
# How can I render a markdown file to HTML?
166+
167+
## marked
168+
169+
GitHub flavoured markdown by default.
170+
171+
https://github.com/chjj/marked
172+
173+
174+
<CUE: let's see it in action!>
175+
176+
---
177+
# Markdown + Vim
178+
179+
180+
Since GitHub uses Markdown for READMEs: let's use that for an example!
181+
182+
183+
> curl -sL https://github.com/watson/npm-geoversion/raw/master/README.md
184+
185+
---
186+
# Markdown + Vim
187+
188+
189+
{ and } move between paragraphs
190+
191+
192+
<< and >> shifts text (like bullet points or code)
193+
194+
195+
o and O open lines below and above
196+
197+
---
198+
# Markdown + Vim
199+
200+
201+
Vim's markdown plugin doesn't recognize .md as vim.
202+
203+
204+
(Because hey, you probably wanted highlighting for Modula-2)
205+
206+
207+
` autocmd BufNewFile,BufRead *.md set filetype=markdown `
208+
209+
---
210+
# Markdown + Vim
211+
212+
213+
Column width of 80 for ease of viewing in the terminal.
214+
215+
216+
(HTML ends up formatted the same anyways).
217+
218+
219+
` autocmd FileType markdown setlocal textwidth=80 `
220+
221+
---
222+
# Markdown + Vim
223+
224+
225+
**Aside: use autocommand groups!**
226+
227+
228+
```
229+
augroup markdown
230+
au!
231+
autocmd BufNewFile,BufRead *.md set filetype=markdown
232+
autocmd FileType markdown setlocal textwidth=80
233+
augroup END
234+
```
235+
236+
---
237+
# Handy Markdown Tools
238+
239+
240+
Some handy tools to make your new life with Markdown more pleasant.
241+
242+
---
243+
# Handy Markdown Tools
244+
245+
## vmd
246+
247+
248+
Electron-based markdown viewer.
249+
250+
https://github.com/yoshuawuyts/vmd
251+
252+
```
253+
augroup markdown
254+
au!
255+
autocmd FileType markdown nnoremap <Leader>v :w !vmd<CR><CR>
256+
augroup END
257+
```
258+
259+
<demo: show github page>
260+
<demo: take some previous md file and view it>
261+
262+
---
263+
# Handy Markdown Tools
264+
265+
## strapdown
266+
267+
268+
Converts markdown to HTML *and* applies a pre-made CSS theme.
269+
270+
http://strapdownjs.com
271+
272+
<demo: show page>
273+
<demo: convert a readme to a strapdown doc and open in chrome>
274+
275+
---
276+
# Handy Markdown Tools
277+
278+
## tslide
279+
280+
281+
Presentation slides (like these!) produced from markdown.
282+
283+
https://github.com/dominictarr/tslide
284+
285+
```
286+
augroup markdown
287+
au!
288+
autocmd FileType markdown nnoremap <Leader>p :w !tslide<CR><CR>
289+
augroup END
290+
```
291+
292+
<demo: show github page>
293+
<demo: kill current presentation and show them THIS VERY FILE>
294+
295+
---
296+
# Fin
297+
298+
299+
It's over!
300+
301+
302+
303+
304+
I'm Stephen Whitmore!
305+
306+
@noffle on the interwebs.
307+
308+
309+
I do open source and indie games.
310+
311+
312+
http://www.stephenwhitmore.com
313+

0 commit comments

Comments
 (0)