49 lines
3 KiB
HTML
49 lines
3 KiB
HTML
<p>Until one week ago my blog was hosted at my house, on a raspberrypi with debian + wordpress. I was not satisfied by my setup because given the minimal size of my blog and the really scarce content I post every now and then, a full LLMP stack was overblown.
|
||
I decided to change distribution (my server now runs <a href="http://www.voidlinux.eu/">Void</a>) and to migrate to a static blog without CMS nor PHP.</p>
|
||
|
||
<h1 id="welcome-to-jekyll-and-hyde">Welcome to Jekyll and Hyde</h1>
|
||
<p>The process of migration was rather painless.
|
||
First of all I installed ruby on my desktop computer, then via ruby gems I installed jekyll:</p>
|
||
|
||
<p><code class="highlighter-rouge">gem install jekyll</code></p>
|
||
|
||
<p><code class="highlighter-rouge">gem install jekyll-gist</code></p>
|
||
|
||
<p><code class="highlighter-rouge">gem install jekyll-paginate</code></p>
|
||
|
||
<p>I used a <a href="https://wordpress.org/plugins/jekyll-exporter/">wordpress plugin</a> to copy all my old posts.
|
||
Then I cloned from <a href="https://github.com/poole/hyde">git</a> the Hyde theme which you can see a demo <a href="http://hyde.getpoole.com/">here</a> and corrected a pair of warning that jekyll printed on my terminal. Actually the <a href="http://jekyllrb.com/docs">jekyll docs</a> are quite complete and covered all the errors that I encountered.</p>
|
||
|
||
<p>Jekyll structure is quite simple to understand: in the folder _post/ there are your post in markdown format (remember to delete the examples in that folder);
|
||
in the root the are some files that should be modified: the about.md file, the 404 page and index.html that is the frontpage of the blog;
|
||
finally _config.yml contains the general configuration for the website and should be adjusted to your own likings.
|
||
When Jekyll builds a website it parses all the markdown files and stores them in _site folder. Jekyll uses the html files in _layouts and _includes to render the markdown files.A</p>
|
||
|
||
<p>I added a simple <a href="http://francescomecca.eu/archive/">archive page</a> following the little piece of code in <a href="http://joshualande.com/jekyll-github-pages-poole/">this page</a></p>
|
||
|
||
<div class="highlighter-rouge"><pre class="highlight"><code>---
|
||
layout: page
|
||
title: Archive
|
||
---
|
||
|
||
## Blog Posts
|
||
|
||
{% for post in site.posts %}
|
||
* {{ post.date | date_to_string }} &raquo; [ {{ post.title }} ]({{ post.url }})
|
||
{% endfor %}:wq
|
||
</code></pre>
|
||
</div>
|
||
|
||
<p>I noticed that in _includes/head.html there is this line:</p>
|
||
|
||
<p><code class="highlighter-rouge">
|
||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600' rel='stylesheet' type='text/css'
|
||
</code></p>
|
||
|
||
<p>so I proceed to remove it because is not needed for my blog.
|
||
Finally I put a link to the archive, my github page and the atom feed on the sidebar by simple adding a href on _includes/sidebar.html.</p>
|
||
|
||
<p>I did not proceed with further modifications but there are tons of possibilities with jekyll. I think that the main advantages are the fact that you don’t have to manage html code when writing a new post and that everything can be done via cli.</p>
|
||
|
||
<p>Francesco Mecca</p>
|
||
|