francescomecca.eu/_site/pescewanda/2016/04/02/blog-migrated/index.html

217 lines
6.4 KiB
HTML
Raw Normal View History

2016-05-01 11:13:57 +02:00
<!DOCTYPE html>
<html lang="en-us">
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>
How I migrated to a static blog &middot; Caught in the Net
</title>
<!-- CSS -->
<link rel="stylesheet" href="/public/css/poole.css">
<link rel="stylesheet" href="/public/css/syntax.css">
<link rel="stylesheet" href="/public/css/hyde.css">
<!-- Icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="/public/favicon.ico">
<!-- RSS -->
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
</head>
<body class="theme-base-09">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<h1>
<a href="/">
Caught in the Net
</a>
</h1>
<p class="lead"></p>
</div>
<nav class="sidebar-nav">
<a class="sidebar-nav-item" href="/">Home</a>
<a class="sidebar-nav-item" href="/about/">About</a>
<a class="sidebar-nav-item" href="/archive/">Archive</a>
<a class="sidebar-nav-item" href="/contattami/">Contattami</a>
2016-05-03 23:38:08 +02:00
2016-05-01 11:13:57 +02:00
<a class="sidebar-nav-item" href="/atom.xml">RSS</a>
<a class="sidebar-nav-item" href="http://francescomecca.eu:3000">Personal Git</a>
<a cleass="sidebar-nav-item" href="https://github.com/s211897-studentipolito">github</a>
<span class="sidebar-nav-item" href="" >Powered by Jekyll and Hyde</span>
</nav>
<p>&copy; 2016. CC BY-SA 4.0 International </p>
</div>
</div>
<h3 class="masthead-title">
<a href="/" title="Home">Caught in the Net</a>
</h3>
<div class="content container">
<div class="post">
<h1 class="post-title">How I migrated to a static blog</h1>
<span class="post-date">02 Apr 2016</span>
<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>
2016-07-07 02:05:21 +02:00
<h1 id="welcome-to-jekyll-and-hyde">Welcome to Jekyll and Hyde</h1>
2016-05-01 11:13:57 +02:00
<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>gem install jekyll</code></p>
<p><code>gem install jekyll-gist</code></p>
<p><code>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="highlight"><pre><code class="language-" data-lang="">---
layout: page
title: Archive
---
## Blog Posts
{% for post in site.posts %}
* {{ post.date | date_to_string }} &amp;raquo; [ {{ post.title }} ]({{ post.url }})
{% endfor %}:wq
</code></pre></div>
<p>I noticed that in _includes/head.html there is this line:</p>
<div class="highlight"><pre><code class="language-" data-lang="">&lt;link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600' rel='stylesheet' type='text/css'
</code></pre></div>
<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&#39;t have to manage html code when writing a new post and that everything can be done via cli.</p>
<p>Francesco Mecca</p>
</div>
<div class="related">
<h2>Related Posts</h2>
<ul class="related-posts">
<li>
<h3>
2016-07-07 02:05:21 +02:00
<a href="/pescewanda/2016/07/06/IM-services/">
Phone messaging apps comparison
<small>06 Jul 2016</small>
2016-05-01 11:13:57 +02:00
</a>
</h3>
</li>
<li>
<h3>
2016-07-07 02:05:21 +02:00
<a href="/pescewanda/2016/07/05/arduino_keyboard/">
Arduino Uno as HID keyboard
<small>05 Jul 2016</small>
2016-05-01 11:13:57 +02:00
</a>
</h3>
</li>
<li>
<h3>
2016-07-07 02:05:21 +02:00
<a href="/pescewanda/2016/05/16/lifehacks2/">
Lifehacks (2)
<small>16 May 2016</small>
2016-05-01 11:13:57 +02:00
</a>
</h3>
</li>
</ul>
</div>
</div>
</body>
</html>