-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup-blog.html
134 lines (109 loc) · 6.54 KB
/
setup-blog.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Seting Up this blog with Pelican</title>
<link rel="stylesheet" href="http://pouyamn.github.io/theme/css/main.css" />
<link href="http://pouyamn.github.io/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Odoo Demystification Atom Feed" />
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="http://pouyamn.github.io/">Odoo Demystification </a></h1>
<nav><ul>
<li><a href="http://pouyamn.github.io/category/odoo.html">odoo</a></li>
<li class="active"><a href="http://pouyamn.github.io/category/pelican.html">Pelican</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="http://pouyamn.github.io/setup-blog.html" rel="bookmark"
title="Permalink to Seting Up this blog with Pelican">Seting Up this blog with Pelican</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2015-12-24T11:26:00">
Thu 24 December 2015
</abbr>
<address class="vcard author">
By <a class="url fn" href="http://pouyamn.github.io/author/pouya-mn.html">Pouya MN</a>
</address>
<p>In <a href="http://pouyamn.github.io/category/pelican.html">Pelican</a>. </p>
<p>tags: <a href="http://pouyamn.github.io/tag/pelican.html">pelican</a><a href="http://pouyamn.github.io/tag/publishing.html">publishing</a></p>
</footer><!-- /.post-info --> <p>Hi every body, at first it looked like this is a very easy process to setup this blog, but it wasn't that easy.
Gitpages suggested Jekil for blog handling , but I wanted something pythonic, so I decided to use pelican. I made a first blog using the guide in github <a href="https://fedoramagazine.org/make-github-pages-blog-with-pelican/">here</a>. It was nice but i had a few problems, I'm using SVN normally, so I'm not very familiar with git, this was my source of problems, I guess.
The problem was about repositories, the method mentioned in that page was cool, in compare to the other and more official methods, but you have to use a submodule which was new to me. </p>
<p>Ok let's cut the crap, I did this:</p>
<p>First I made a repository by the <a href="https://pages.github.com/">official documentions</a> (I didn't install jekil). Then I created two new repositories, myusername.github.io-src and myusername.github.io, as explained on <a href="https://github.com/new">Github pages</a>.</p>
<p>Then I cloned the source (...-src) to a folder named <em>ghpages</em> by:</p>
<div class="highlight"><pre>git clone https://github.com/myusername/myusername.github.io-src.git ghpages
</pre></div>
<p>and made git remember my creditentials:</p>
<div class="highlight"><pre>git config credential.helper store
</pre></div>
<p>I made a submodel repository by entering this in my main folder (ghpages):</p>
<div class="highlight"><pre>git submodule add https://github.com/pouyamn/pouyamn.github.io.git output
</pre></div>
<p>so it made a folder named <em>output</em>. Now it was the time for installing pelican and running it:</p>
<div class="highlight"><pre>sudo apt-get install python-pelican
<span class="nb">cd</span> /ghpages
pelican-quickstart
</pre></div>
<p>we have to stop pelican from erasing the output directory everytime, I edited <em>publishconf.py</em>: </p>
<div class="highlight"><pre><span class="n">DELETE_OUTPUT_DIRECTORY</span> <span class="o">=</span> <span class="bp">False</span>
</pre></div>
<p>well it is almost there, make the first post in contents folder. I used MarkDown, although other languages are also possible. For this I installed haroopad</p>
<div class="highlight"><pre>sudo apt-get install haroopad
</pre></div>
<p>I made a file in <em>content</em> folder named for example, <em>first.md</em>. and I made this post in it.
Ok, let's take a look:</p>
<div class="highlight"><pre>make html <span class="o">&&</span> make serve
</pre></div>
<p>you can now open <em>localhost:8000</em> and enjoy your first post in your pc (links willnot work, they are directed to the <em>real</em> blog). </p>
<p>Publish time!</p>
<div class="highlight"><pre>make publish
<span class="nb">cd </span>output/
git add .
git commit -m <span class="s2">"First Post."</span>
git push -u origin master
<span class="nb">cd</span> ..
<span class="nb">echo</span> <span class="s1">'*.pyc'</span> >> .gitignore <span class="c">#don't need pyc file</span>
git add .
git commit -m <span class="s2">"First commit."</span>
git push -u origin master
</pre></div>
<p>Demystification:
make the html files, setup the links and prepare it, send the compiled result to github and finally send the source files to github too keep them safe :).
that's it.</p>
</div><!-- /.entry-content -->
</article>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>blogroll</h2>
<ul>
<li><a href="http://odoo.com/">Odoo</a></li>
<li><a href="http://fshahy.github.io/">Odoo made Einfach</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="http://pouyamn.github.io/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="https://github.com/pouyamn/">My github page</a></li>
<li><a href="https://tr.linkedin.com/in/pouyamn">My linked-in profile</a></li>
</ul>
</div><!-- /.social -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
</body>
</html>