-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpelican-atom-and-markdown.html
151 lines (112 loc) · 5.46 KB
/
pelican-atom-and-markdown.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<html lang="en">
<head>
<link href="/images/favicon.png" rel="icon">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>trvrm.github.io</title>
<link rel="stylesheet" type="text/css" href="/theme/css/flatly.min.css" />
<link rel="stylesheet" type="text/css" href="/theme/css/style.css" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" />
<link href="/theme/css/pygments/tango.css" rel="stylesheet">
<meta name="tags" content="pelican" />
<meta name="tags" content="markdown" />
</head>
<body>
<section class="hero is-primary">
<!-- Hero header: will stick at the top -->
<div class="hero-head">
<nav class="navbar ">
<div class="navbar-menu is-active">
<div class="navbar-end">
<a class="navbar-item" href="https://twitter.com/trvrm">
<span class="icon"> <i class="fa fa-twitter"></i> </span>
twitter
</a>
<a class="navbar-item" href="https://github.com/trvrm">
<span class="icon"> <i class="fa fa-github"></i> </span>
github
</a>
</div>
</div>
</div>
</div>
<!-- Hero content: will be in the middle -->
<div class="hero-body">
<div class="container has-text-centered">
<p class="title is-1">trvrm.github.io</p>
</div>
</div>
<div class="hero-foot">
<nav class="navbar ">
<div class="navbar-brand is-active">
<a href="/" class="navbar-item" >
trvrm.github.io
</a>
</div>
<div class="navbar-menu is-active">
<div class="navbar-start">
<a class="navbar-item " href="/category/database.html">Database</a>
<a class="navbar-item is-active " href="/category/software.html">Software</a>
<a class="navbar-item " href="/category/systems.html">Systems</a>
</div>
</div>
</nav>
</div>
</section>
<section class="section">
<div class="container has-text-centered">
<p class="title is-3">
<a href="/pelican-atom-and-markdown.html" rel="bookmark" title="Permalink to Pelican, Atom and Markdown">
Pelican, Atom and Markdown
</a>
</p>
<p class="subtitle is-5">
Fri 26 June 2015
</p>
</div>
<hr>
<div class="content ">
<p>I've been using reStructured text in general to write this blog, but I think I'm
going to be switching to Markdown. As an experiment, I'm writing this post in Markdown.</p>
<p>I'm also writing it in the <a href="https://atom.io/">Atom text editor</a>, which has really come on a
long way since I last tried it. Specifically, it includes a Markdown preview function, so
I can see the effects of the markup that I'm writing as I write it.</p>
<p>Mostly, I want a rapid way of creating and publishing code snippets, without the mental
overhead of switching between markup languages. Although reStructured text and markdown
are broadly similar, there are subtle differences between them when it comes to things
like syntax highlighting. But I've discovered today that if I use the triple-backtick
syntax, I can get the same output from Pelican, Atom, and IPython notebooks.</p>
<p>So</p>
<div class="highlight"><pre><span></span> ```python
def syntax(highlighting=True):
return "cool huh?"
```
</pre></div>
<p>yields</p>
<div class="highlight"><pre><span></span> <span class="k">def</span> <span class="nf">syntax</span><span class="p">(</span><span class="n">highlighting</span><span class="o">=</span><span class="bp">True</span><span class="p">):</span>
<span class="k">return</span> <span class="s2">"cool huh?"</span>
</pre></div>
<p>And if I paste that into a markdown cell in an IPython notebook, I get the same effect, as
can be seen <a href="https://github.com/trvrm/notebooks/blob/master/Markdown%20Demo.ipynb">here</a></p>
<p>So this seems to be the general way that the open-source ecosystem is going: Markdown
allows me to use the same syntax for my GitHub documentation, my IPython notebooks, and
my blog posts. </p>
<p>I do use <strong>Sphinx</strong> in various places for Python code documentation, so that will still
require reStructured text, but elsewhere I think Markdown is the way to go</p>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
<p>
Powered by <a href="http://getpelican.com/">Pelican</a>, <a href="http://python.org">Python</a>,
and <a href="http://bulma.io/">Bulma</a>
</p>
<p class="subtitle is-6">Ubi Caritas et Amor, Deus Ibi Est</p>
</div>
</div>
</footer>
</body>
</html>