484 lines
9.3 KiB
HTML
484 lines
9.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-us">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Caught in the Net</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="theme-color" content="#157878">
|
|
<link rel="stylesheet" href="/css/normalize.css">
|
|
<!--<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>-->
|
|
<link rel="stylesheet" href="/fonts/opensans.css">
|
|
<link rel="stylesheet" href="/css/cayman.css">
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<section class="page-header">
|
|
<h1 class="project-name">Caught in the Net</h1>
|
|
<h2 class="project-tagline">La rete ti cattura ma libera il pensiero</h2>
|
|
<a class="btn" href="/">Home</a>
|
|
<a class="btn" href="/archive/">Archive</a>
|
|
<a class="btn" href="/contattami/">Contact me</a>
|
|
<a class="btn" href="http://francescomecca.eu:3000/explore/repos">Personal Git</a>
|
|
<a class="btn" href="https://github.com/FraMecca">Github</a>
|
|
<a class="btn" href="/feed.xml">RSS</a>
|
|
<a class="btn" href="/curriculum/CV_Mecca_Francesco.pdf">Curriculum</a>
|
|
</section>
|
|
|
|
|
|
<section class="main-content">
|
|
|
|
<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>
|
|
|
|
<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>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 }} &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=""><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'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">-->
|
|
<!--<related-posts />-->
|
|
<!--<h2>Related Posts</h2>-->
|
|
<!--<ul class="related-posts">-->
|
|
<!---->
|
|
<!--<li>-->
|
|
<!--<h3>-->
|
|
<!--<a href="/pescewanda/2017/05/07/latestage_handbrake/">-->
|
|
<!--Late Stage Capitalism meets FOSS-->
|
|
<!--<small>07 May 2017</small>-->
|
|
<!--</a>-->
|
|
<!--</h3>-->
|
|
<!--</li>-->
|
|
<!---->
|
|
<!--<li>-->
|
|
<!--<h3>-->
|
|
<!--<a href="/pescewanda/2017/03/20/spazio-digitale-rant-facebook__eng/">-->
|
|
<!--Some shallow thoughts from my tiny virtual space-->
|
|
<!--<small>20 Mar 2017</small>-->
|
|
<!--</a>-->
|
|
<!--</h3>-->
|
|
<!--</li>-->
|
|
<!---->
|
|
<!--<li>-->
|
|
<!--<h3>-->
|
|
<!--<a href="/pescewanda/2017/03/07/spazio-digitale-rant-facebook/">-->
|
|
<!--Breve riflessione dal mio piccolo mondo virtuale-->
|
|
<!--<small>07 Mar 2017</small>-->
|
|
<!--</a>-->
|
|
<!--</h3>-->
|
|
<!--</li>-->
|
|
<!---->
|
|
<!--<li>-->
|
|
<!--<h3>-->
|
|
<!--<a href="/pescewanda/2016/11/15/machine-learning-PARTE3/">-->
|
|
<!--Capire il Machine Learning (parte 3)-->
|
|
<!--<small>15 Nov 2016</small>-->
|
|
<!--</a>-->
|
|
<!--</h3>-->
|
|
<!--</li>-->
|
|
<!---->
|
|
<!--<li>-->
|
|
<!--<h3>-->
|
|
<!--<a href="/pescewanda/2016/11/11/machine-learning-PARTE2/">-->
|
|
<!--Capire il Machine Learning (parte 2)-->
|
|
<!--<small>11 Nov 2016</small>-->
|
|
<!--</a>-->
|
|
<!--</h3>-->
|
|
<!--</li>-->
|
|
<!---->
|
|
<!--</ul>-->
|
|
<!--</div>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<footer class="site-footer">
|
|
<span class="site-footer-owner"><a href="http://localhost:4000">Caught in the Net</a> is maintained by <a href="">Francesco Mecca</a>.</span>
|
|
<span> CC BY-SA 4.0 International.</br> </span>
|
|
<span class="site-footer-credits"><a href="https://jekyllrb.com">Jekyll</a>, <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a>.</span>
|
|
</footer>
|
|
|
|
|
|
</section>
|
|
|
|
</body>
|
|
</html>
|