-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patha-blog-using-pelican.html
413 lines (377 loc) · 21.1 KB
/
a-blog-using-pelican.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
<!DOCTYPE html>
<html lang="en"
>
<head>
<title>A Blog Using Pelican ! - /^blog$/</title>
<!-- Using the latest rendering mode for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="http://vsjha.in/a-blog-using-pelican.html">
<meta name="author" content="Vivek Jha" />
<meta name="keywords" content="python,pelican,blogging" />
<meta name="description" content="From a long time I was looking for a blogging solution which is not just hassle free to manage but also cheap and easy to host. At the same time I was is no mood to trade the configurability aspect for the above features. And also I didn't want ..." />
<meta property="og:site_name" content="/^blog$/" />
<meta property="og:type" content="article"/>
<meta property="og:title" content="A Blog Using Pelican !"/>
<meta property="og:url" content="http://vsjha.in/a-blog-using-pelican.html"/>
<meta property="og:description" content="From a long time I was looking for a blogging solution which is not just hassle free to manage but also cheap and easy to host. At the same time I was is no mood to trade the configurability aspect for the above features. And also I didn't want ..."/>
<meta property="article:published_time" content="2015-03-02" />
<meta property="article:section" content="python" />
<meta property="article:tag" content="python" />
<meta property="article:tag" content="pelican" />
<meta property="article:tag" content="blogging" />
<meta property="article:author" content="Vivek Jha" />
<!-- Bootstrap -->
<link rel="stylesheet" href="http://vsjha.in/theme/css/bootstrap.cosmo.min.css" type="text/css"/>
<link href="http://vsjha.in/theme/css/font-awesome.min.css" rel="stylesheet">
<link href="http://vsjha.in/theme/css/pygments/native.css" rel="stylesheet">
<link rel="stylesheet" href="http://vsjha.in/theme/css/style.css" type="text/css"/>
<!-- fonts go here -->
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Muli:300,400,400italic,300italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,200italic,300italic' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="http://vsjha.in/" class="navbar-brand">
/^blog$/ </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li class="active">
<a href="http://vsjha.in/category/python.html">Python</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="http://vsjha.in/archives.html"><i class="fa fa-th-list"></i><span class="icon-label">Archives</span></a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar --><!-- Banner -->
<!-- End Banner -->
<div id="wrapper" class="container-fluid">
<div class="row">
<div id="lsidebar" class="col-md-1"></div>
<div id="middle" class="col-md-6">
<main>
<section id="content">
<article>
<header class="page-header">
<h1>
<a href="http://vsjha.in/a-blog-using-pelican.html"
rel="bookmark"
title="Permalink to A Blog Using Pelican !">
A Blog Using Pelican !
</a>
</h1>
</header>
<div>
<aside class="post-info">
<span class="published">
<i class="fa fa-calendar"></i><time datetime="2015-03-02T00:00:00+01:00"> Mon 02 March 2015</time>
</span>
<i class="fa fa-tags"></i>
<a href="http://vsjha.in/tag/python.html"><kbd>python</kbd></a>
<a href="http://vsjha.in/tag/pelican.html"><kbd>pelican</kbd></a>
<a href="http://vsjha.in/tag/blogging.html"><kbd>blogging</kbd></a>
</aside><!-- /.post-info --> </div>
<div class="entry-content">
<img alt="pelican-image" src="/images/pelican.png" />
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- LB -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-8144337649118599"
data-ad-slot="5978280883"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<p>From a long time I was looking for a blogging solution which is not just
hassle free to manage but also cheap and easy to host. At the same time I
was is no mood to trade the configurability aspect for the above features.
And also I didn't want to learn any new technology just for the sake of
maintiaing a blog.</p>
<p>I explored several options, and went through many articles which had monotonous
titles like "5 best blogging framework ....". Out of all this exercise two obvious
choices stood out, viz. <strong>Wordpress</strong> and <strong>Blogger</strong>.</p>
<p>Though they are very good solutions for the problem but somehow it did't match my taste.</p>
<div class="section" id="the-wordpress">
<h2>The Wordpress</h2>
<p>Beyond doubt this is the most popular blogging framework and probably
the most feature rich also. But the main reason behind it's popularity is the
strong community and the rich admin console which can be used to control
most of the aspects of the site. And this was the big reason
for wide adoption of Wordpress becuase you really don't need to be techie to
own a blog. People with limited computer knowledge were able to manage and host
their own blog.</p>
<p>I hunted down this option because of:</p>
<ul class="simple">
<li>Too many features which I actually didn't need. I wanted to keep it just as simple as possible.</li>
<li>Configuring it would require me to learn PHP, which doesn't find a place in my technical roadmap. (at least after learning python!)</li>
<li>Hosting requires more money than I was ready to spend. (I told you it has to be super cheap)</li>
<li>Theaming also requires to understand the Worpress jargon which is overwhelming for me.</li>
</ul>
</div>
<div class="section" id="blogger">
<h2>Blogger</h2>
<p>This is also a nice framework and I used it for quite a while for running a
puzzle blog. It was far simpler than <em>wordpress</em> which I consider a plus but
it was somewhat boring as well.</p>
<p>If you see blogger in last 5 years, nothing much has changed, this is very
unlike all other Google products. Looks at it only feels that Google is using
it as just one more medium to push their advertisements.</p>
<p>Very few templates to choose from and look and feel of all of them reminds me
of the web of 2005 era. Most of the widgets are only there for the sake of
increasing the number of widgets, very few are useful.</p>
</div>
<div class="section" id="static-site-generators">
<h2>Static Site Generators</h2>
<p>This new concept really excited me when I heard about <a class="reference external" href="http://Jekyllrb.com">Jekyll</a> through Github.
It was really somethig which I was looking for. I can write articles on
any plain text editor, which was a great plus. And there were many templates to
chose from. Being static site it only had features which a static site can afford
to have without an active application server.</p>
<p>But there was a problem. It's not really a Jekyll issue, but rather a matter of
personal taste. I did't know Ruby and for making any changes of higher order would
require some Ruby knowledge. Though it's a nice language to learn (unlike PHP) but my
priorities were not allowing me to go into that direction. I was just wondering
whether is there anything like <em>PyJekyll</em> !!</p>
</div>
<div class="section" id="and-finally-the-pelican">
<h2>And Finally the Pelican</h2>
<p>The beauty of python is, you name it and you have it. And a static site
generator was no exception either. It only took few google searches to
reach <a class="reference external" href="http://docs.pelican.com">Pelican</a>. And it had almost everything which I wished for. It hardly
took anyt ime to impress me to a point of no return. At a glance:</p>
<ul class="simple">
<li>Had almost all essential features which a blog should have. (and did't have ones which I consider overkill)</li>
<li>Templating was super easy because of Jinja2 templating system.</li>
<li>I could write in <em>rst</em> format. I am more fluent in <em>rst</em> compared to <em>markdown</em>.</li>
<li>I don't have to write in a WYSIWYG editor, comfort of <em>vim</em> was there to stay.</li>
<li>Integration with almost all the cloud service out of box.</li>
<li>Things like google analytics, disqus were present out of box.</li>
<li>One of the best project documentations.</li>
</ul>
</div>
<div class="section" id="the-theme-hunt">
<h2>The Theme Hunt</h2>
<p>Next problem to solve was the theme hunt. I always wanted to do it myself rather than using a readymade theme
(mostly for learning sake). One thing I must say that becuase of the relatively smaller community
than the <a class="reference external" href="http://Jekyllrb.com">Jekyll</a>, the number of available themes (which are worth using also) were less.
But I found an amazing theme which I could use as a great starting point. <a class="reference external" href="https://github.com/DandyDev/pelican-bootstrap3">Pelican-Bootstrap3</a> is an
awsome project. It is a <a class="reference external" href="http://getbootstrap.com">Bootstrap</a> based theme (one more keyword which I am comfortable at) and does
just enough to make a great starting point. That doesn't mean it is not directly usable, in fact it looks
pretty descent. It supports most of the Social stuff and cloud services. To name a few:</p>
<ul class="simple">
<li>Google Analytics.</li>
<li>Disqus for comment handling.</li>
<li>AddThis - For adding social buttons.</li>
</ul>
<p>I modified that theme and created a new one and this site is currently using that.</p>
</div>
<div class="section" id="github-pelican-a-killer-combo">
<h2>Github + Pelican a Killer Combo</h2>
<p>Since it is a <a class="reference external" href="http://docs.pelican.com">Pelican</a> produces static sites hence you really don't require any heavy
server running your blog. A basic static file server with modest capabilities is just
more enough to do the job. This blog is hosted on the <a class="reference external" href="www.github.com">github</a> which is totally free.
That also means that apart from paying for purchasing a domain (that too is not mandatory)
you don't need to spend a single penny.</p>
<blockquote>
So the total hosting cost for me was Rs 300 (approximately 3 USD), which is less that
a cost for one Mc Donald Meal.</blockquote>
</div>
<div class="section" id="the-current-theme">
<h2>The Current Theme</h2>
<p>This theme is a fork of <a class="reference external" href="https://github.com/DandyDev/pelican-bootstrap3">Pelican-Bootstrap3</a> project. I corrected some markups and styled it
a bit. This is still a work in progress but it is completely usable.</p>
<p><a class="reference external" href="https://github.com/vsjha18/pelican-elegant">click here</a> to visit the project page. You can clone it as follows</p>
<p>You can clone it like this:</p>
<div class="highlight"><pre>git clone https://github.com/vsjha18/pelican-elegant.git
</pre></div>
<p>Make sure you have following lines in the pelicanconf.py files.</p>
<div class="highlight"><pre><span class="n">DISPLAY_RECENT_POSTS_ON_SIDEBAR</span><span class="o">=</span><span class="bp">True</span>
<span class="n">DISPLAY_CATEGORIES_ON_SIDEBAR</span><span class="o">=</span><span class="bp">True</span>
<span class="n">DISPLAY_CATEGORIES_ON_MENU</span><span class="o">=</span><span class="bp">True</span>
<span class="n">BOOTSTRAP_THEME</span> <span class="o">=</span> <span class="s">'cosmo'</span>
<span class="n">BOOTSTRAP_NAVBAR_INVERSE</span><span class="o">=</span><span class="bp">True</span>
</pre></div>
<p>For rest of the things you can follow steps on the <a class="reference external" href="https://github.com/vsjha18/pelican-elegant">project page</a> and and <a class="reference external" href="http://docs.pelican.com">Pelican</a> manual.</p>
</div>
</div>
<!-- /.entry-content -->
<hr />
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar": true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-54bb929868226ac3"></script>
<!-- AddThis Button END -->
<hr/>
<section class="comments" id="comments">
<h2>Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'vsjha'; // required: replace example with your forum shortname
var disqus_identifier = 'a-blog-using-pelican';
var disqus_url = 'http://vsjha.in/a-blog-using-pelican.html';
var disqus_config = function () {
this.language = "en";
};
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by
Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
</article>
</section>
</main>
</div>
<div class="col-md-1"></div>
<div class="col-md-4" id="sidebar">
<aside>
<section>
<ul class="list-group list-group-flush">
<li class="list-group-item block"><h4><i class="fa fa-home"></i><span class="icon-label">Social</span></h4>
<ul class="list-group" id="social">
<li class="list-group-item"><a href="http://twitter.com/vsjha18"><i class="fa fa-twitter-square fa-lg"></i> twitter</a></li>
<li class="list-group-item"><a href="http://in.linkedin.com/in/vsjha"><i class="fa fa-linkedin-square fa-lg"></i> linkedin</a></li>
<li class="list-group-item"><a href="http://github.com/vsjha18"><i class="fa fa-github-square fa-lg"></i> github</a></li>
</ul>
</li>
<li class="list-group-item block"><h4><i class="fa fa-home"></i><span class="icon-label">Recent Posts</span></h4>
<ul class="list-group" id="recentposts">
<li class="list-group-item">
<a href="http://vsjha.in/a-blog-using-pelican.html">
A Blog Using Pelican !
</a>
</li>
</ul>
</li>
<li class="list-group-item block"><a href="http://vsjha.in/"><h4><i class="fa fa-home"></i><span class="icon-label">Categories</span></h4></a>
<ul class="list-group" id="categories">
<li class="list-group-item">
<a href="http://vsjha.in/category/python.html">
<i class="fa fa-folder-open"></i> python
</a>
</li>
</ul>
</li>
<li class="list-group-item block"><a href="http://vsjha.in/"><h4><i class="fa fa-tags"></i><span class="icon-label">Tags</span></h4></a>
<ul class="list-group " id="tags">
<li class="list-group-item tag-4">
<a href="http://vsjha.in/tag/pelican.html">
pelican
</a>
</li>
<li class="list-group-item tag-4">
<a href="http://vsjha.in/tag/blogging.html">
blogging
</a>
</li>
<li class="list-group-item tag-4">
<a href="http://vsjha.in/tag/python.html">
python
</a>
</li>
</ul>
</li>
<li class="list-group-item block"><h4><i class="fa fa-github fa-lg"></i><span class="icon-label">GitHub Repos</span></h4>
<div id="gh_repos">
<p class="list-group-item">Status updating...</p>
</div>
</li>
<li class="list-group-item"><h4><i class="fa fa-twitter fa-lg"></i><span class="icon-label">Latest Tweets</span></h4></li>
<div id="twitter_timeline">
<a class="twitter-timeline" data-chrome="noheader" href="https://twitter.com/vsjha18" data-widget-id="552797401610604545">Tweets by vsjha18</a>
</div>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</ul>
</section>
</aside>
</div>
</div>
</div>
<footer>
<div id="footer" class="container-fluid">
<div class="row">
<div class="col-md-10">© 2015 Vivek Jha
· Powered by <a href="https://github.com/vsjha18/bs3-elegant" target="_blank">bs3-elegant</a>,
<a href="http://docs.getpelican.com/" target="_blank">Pelican</a>,
<a href="http://getbootstrap.com" target="_blank">Bootstrap</a> </div>
<div class="col-md-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
</div>
</div>
</footer>
<script src="http://vsjha.in/theme/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="http://vsjha.in/theme/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="http://vsjha.in/theme/js/respond.min.js"></script>
<!-- GitHub JS -->
<script type="text/javascript">
$(document).ready(function () {
if (!window.jXHR) {
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
jxhr.src = 'http://vsjha.in/theme/js/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}
github.showRepos({
user: 'vsjha18',
count: 5,
skip_forks: false,
target: '#gh_repos'
});
});
</script>
<script src="http://vsjha.in/theme/js/github.js" type="text/javascript"></script>
<!-- End GitHub JS Code -->
<!-- Disqus -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'vsjha'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
var s = document.createElement('script');
s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<!-- End Disqus Code -->
<!-- Google Analytics Universal -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59243939-1', '');
ga('send', 'pageview');
</script>
<!-- End Google Analytics Universal Code -->
</body>
</html>