Browse Source

Imported theme. Added first post. Modified the about page.

master
frnmst/Franco Masotti 5 years ago
parent
commit
dca44a66b0
  1. 47
      .gitignore
  2. 1
      .gitlab-ci.yml
  3. 22
      LICENSE.md
  4. 18
      Makefile
  5. 417
      README.md
  6. BIN
      _assets/avatar.jpg
  7. 128
      _assets/by-sa.svg
  8. 22
      _assets/core.scss
  9. BIN
      _assets/favicon.png
  10. BIN
      _assets/fonts/HiLo-Deco.ttf
  11. 5
      _assets/gravatar_wrapper.svg
  12. 201
      _assets/rodentia-icons_application-x-feed.svg
  13. 98
      _config.yml
  14. 67
      _includes/comments.html
  15. 29
      _includes/footer.html
  16. 18
      _includes/head.html
  17. 22
      _includes/header.html
  18. 18
      _includes/image.html
  19. 8
      _includes/page_navigation.html
  20. 17
      _includes/post_navigation.html
  21. 19
      _includes/tag_list.html
  22. 0
      _layouts/comment.html
  23. 10
      _layouts/compress.html
  24. 33
      _layouts/default.html
  25. 19
      _layouts/page.html
  26. 36
      _layouts/post.html
  27. 9
      _pages/404.md
  28. 63
      _pages/about.md
  29. 45
      _pages/feed.xml
  30. 41
      _pages/index.html
  31. 27
      _pages/sitemap.html
  32. 28
      _pages/tags.md
  33. 168
      _posts/2017-04-24-qemu-ssh-tunnel.md
  34. 1
      _sass/main.css
  35. 474
      _sass/main.scss
  36. 254
      _sass/syntax.scss
  37. 2
      index.html
  38. 8
      robots.txt

47
.gitignore

@ -1 +1,46 @@
_site
_site/
.sass-cache/
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# =========================
# Operating System Files
# =========================
# OSX
# =========================
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

1
.gitlab-ci.yml

@ -17,6 +17,7 @@ pages:
stage: deploy
script:
- gem install jekyll
- gem install jekyll jekyll-sitemap
- jekyll build -d public
artifacts:
paths:

22
LICENSE.md

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Heiswayi Nrird
2017 Franco Masotti <franco.masotti@student.unife.it>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

18
Makefile

@ -0,0 +1,18 @@
#!/usr/bin/make -f
# Copyright (c) 2017 Franco Masotti.
# See LICENSE file for details.
all: build serve
build:
@jekyll build -V --safe -t
serve:
@jekyll serve
serve-global:
@jekyll serve --host=0.0.0.0
clean:
@rm -rf _site

417
README.md

@ -0,0 +1,417 @@
# The Plain Libre
The Plain Libre is just another minimalist Jekyll theme that
designed to focus on writing matters. This theme is best use for personal blog.
This theme relies on [100% free software](https://www.gnu.org/philosophy/free-sw.en.html),
does not include any Javascript and the font used is served from the local instance.
It has been tested on [Parabola GNU/Linux-libre](https://www.parabola.nu/).
[Original version](https://github.com/heiswayi/the-plain)
## Screenshots
![screenshot](_repository_assets/screenshot.png)
![screenshot2](_repository_assets/screenshot2.png)
## This version compared to the original one [1443d83](https://github.com/frnmst/the-plain-libre/commit/1443d83ec881a7bfd4b62975da29f72f8f99d38a)
- Removed all analytics
- Removed Google font
- Removed Gravatar
- Removed MathJax
- Simpler image handling
- Fully static commenting system
- Full tag and category support
- Excerpts support
- Better search Engine Optimization (SEO)
- Compressed html output
- Basic sitemap
- Style
- Changed main font
- Changed background colors
- Bigger font rendering
- `outline: none` for links
- Last post update shown
- Lists CSS: `circle` instead of `disk`
### TODO
- Follow web typography guidelines like [these](http://webtypography.net/toc/)
- Better mobile support
- CNAME?
- shell scipt that builds example posts, images (base64 or similar), etc using:
cat <<-EOF
# whatever
EOF
so that examples and real blog content can be decoupled.
This script will be called using the Makefile.
## Theme installation
# pacman -S ruby
$ gem update
$ gem install jekyll jekyll-sitemap
## Building and serving
Local serving (127.0.0.1)
$ make
Global serving (0.0.0.0)
$ make serve-global
## Tutorial
### Commenting system
#### Overview
This theme handles comments in the most static way possible:
a `mailto` link is generated for each post thanks to GMAIL mail aliases, using
the address specified in the `_config.yml` file. This idea came out while
reading [this](https://caurea.org/2012/03/31/this-blog-has-comments-again.html)
page.
Moreover, for each post a comment section gets exposed. To get comments inside
this section, you must create a new file in the `_comments` directory using the
corresponding posts path name as file name. Let's say a user sends a comment
for the `another-post` post. The `mailto` link will have this structure:
<your_gmail_email>+2017-02-11-another-post@gmail.com
You may notice the substring `2017-02-11-another-post` after the gmail's email
(but it works for any mailer system supporting these kind of mail aliases).
This string is part of the file name corresponding to the post which is:
./_posts/2017-02-11-another-post.md
Let's ingnore the `./_posts/` and `.md` substrings for a moment and save
`2017-02-11-another-post` somewhere. Since a post may have more than a
comment, we must distinguish between one and another. To do this we create a
new directory using the comment path, like the following:
$ mkdir _/comments/2017-02-11-another-post
and we will save the comment files inside to keep things tidy.
We then create a new markdown file corresponding to the comment, and its
file name will be used as an id, for example:
0.md
You can use any non spaced string, and avoid using `.md` except at the end of
this file name.
Out final comment path is:
./comments/2017-02-11-another-post/0.md
As a final remark you may have noticed that each comment is referenced as a
paragraph (using the id) and that markdown is enabled by default.
#### Comment attributes
Comment files have 5 attributes:
- `layout`
- Always use `comment` as variable.
- `date`
- Use the format reported by the following date command:
$ date "+%F %T %z"
- `from`
- string representing the name or the id or the mail of the person that
commented the post.
- `subject`
- String representing the mail subject.
For example:
---
layout: comment
title: This is another post
date: 2017-02-11 23:37:05 +0100
from: x.y@y.x, A Mailer
subject: test subject
---
This is a test comment for the `Hello again` post.
```python
def hi
```
### Media files
Extending [this](https://eduardoboucas.com/blog/2014/12/07/including-and-managing-images-in-jekyll.html)
ideas I came up with the following:
#### Overview
Just like comments, each media file is contained in one directory corresponding
to a post. However, unlike comments, media content may be referenced from more
than one post. This is how it works.
#### File locations
If out example post is `./_posts/2017-02-11-another-post.md` and we want to add
media files to it, we must create a corresponding directory in `_media`:
./_media/2017-02-11-another-post
We can now place our file inside, for example:
./_media/2017-02-11-another-post/terminal.png
#### Possible combinations
Now, let's go back to `./_posts/2017-02-11-another-post.md`. To be able to
display that picture we need to use the `include` liquid tag. In the simplest
form the only required parameter is the file name:
```liquid
{% include image.html file="terminal.png" %}
```
You can also use the `alt` and/or `capiton` tags:
```liquid
{% include image.html file="terminal.png" alt="ter" caption="A terminal example caption" %}
```
You can also use plain markdown, which is not advisable in this case, since
you need to input the whole path:
![ter]({{ site.baseurl }}/media/2017-02-11-another-post/terminal.png)
#### Calling files from another post
In some cases you may want to recall media files from another post. You can do
that using the `otherpost` tag. Let's say we are in the
`./_posts/2015-09-09-download-this-theme.md` post.
```liquid
{% include image.html file="2017-02-11-another-post/terminal.png" alt="Terminal" caption="A terminal image from the other post" otherpost=true %}
```
As you can see you don't have to specify the full path but only the post name
slash the file name. The rest is filled in automatically.
Finally, notice the `otherpost=true` tag at the end.
#### Notice and warning
If you do not include the `alt` tag a default one will be provided instead.
This include feature is currently available only for images.
### Static pages
Reading [this](https://mademistakes.com/articles/using-jekyll-2016/#pages-for-everything-else)
gave me the idea to move the static pages like index, 404, etc.. in the
`./_pages` directory. If you want to add new pages remember to add a sensible
`permalink` for each page and remember to keep `include: [ "_pages" ]`
and:
collections:
pages:
output: false
in the `_config.yml` file.
### Tags and categories
#### Overview
In this theme tags and categories are considered the same thing. I will use the
word *tag* to speak about both tags and categories.
I gathered some ideas from [here](https://blog.webjeda.com/jekyll-categories/)
and using the official Jekyll documentation.
A full list of tags is present on the home page, i.e: `./_pages/index.html`.
This list is just a set of links pointing to the appropriate entry in the
`./_pages/tags.md` page. This page has that same list as well as links to each
post belonging to a tag.
If a post contains at least one tag, this is reported at the top of the page
with a link pointing to the appropriate bookmark of `./_pages/tags.md` (just
like in the home page). A user looking at a post can see all related posts just
by clicking at those tag links.
#### Format
The tag entry is optional which means that you can specify from 0 to n tags. If
you want to add some, simply write your comma separated list of tags in the
front matter of your post:
tags: [tag 0, tag 1, ... , tag n]
Let's make an example. What follows is the front matter of the
`./_posts/2015-09-09-download-this-theme.md` post.
---
title: Download this Theme
updated: 2017-04-09 00:29
categories: Download
tags: [download, terminal, image from another post]
---
As you may have noticed, tags can contain spaces.
Once you run make, you should see the following links
just below the `Download this Theme` title:
*download* *terminal* *image from another post*
### Excerpts
Excerpts are reported in the home page.
Use the `<!--more-->` tag inside a post to mark the end of the excerpt.
If this tag is omitted, the first 10 words of the post will be reported
instead. You can specify the number of words in the excerpt by editing the
`excerpt_words` variable in the `./_config.yml` file.
If you are not interested in excerpts set the `excerpt_enabled` variable to
false in `./_config.yml`.
Have a look at
[this article](http://frontendcollisionblog.com/jekyll/snippet/2015/03/23/how-to-show-a-summary-of-your-post-with-jekyll.html)
for more ideas.
### RSS feeds
This theme contains an Atom file useful for RSS feeds in `./_pages/feed.xml`
The link to `feed.xml` is available in the footer of every page
thanks to a modified public domain svg icon. The purpose is that your readers
open this link with a feed reader so that they remain up to date with your
posts.
A patch has been added to the SVG image because it was badly rendered on some
browsers available for Android. See
[this](http://bitiotic.com/blog/2012/04/12/fixing-svg-aspect-ratio-lossage-on-webkit/)
article.
### Search Engine Optimizaition (SEO)
I'm a noob in this field so I followed
[this](https://blog.webjeda.com/optimize-jekyll-seo/) tutorial
and [this](ttps://varvy.com/) SEO checker.
- meta
- sitemaps
- images
- always use alt tags. For images in `./_assets` these are already coded
in.
- responsiveness
- the theme is reported
[responsive by Google](https://search.google.com/search-console/mobile-friendly?hl=it&id=LupFsm0FA2J9L4PoK8LAVw)
- robots.txt
- social media and other stuff
- TODO
#### meta and other SEO tags
meta tags are available in the `./_includes/head.html` file. These include:
`title`, `description` and canonical links.
The description meta tag uses the first available, in this order, of the
following:
- Front matter `description` tag
- Page excerpt
- Site description
It is advised to use the `description` tag since excerpts or the site
description may not relate to the (whole) page content. Here's an example:
---
title: This is another post
updated: 2017-04-09 23:00
tags: [other, liquid, terminal]
description: How to use markdown and liquid to render images belonging to a
post.
---
You can also edit the following variables in `./_config.yml`to limit the number
of words in the `description` meta tag. Avoid values greater than `160` as
reported by previously cited articles:
meta_description_words
meta_excerpt_words
meta_site_description_words
#### Sitemaps
A sitemap used for web crawlers is available thanks to the
[jekyll-sitemap](https://github.com/jekyll/jekyll-sitemap) plugin.
There is also a (very) basic sitemap for users under the `/sitemap/` permalink
which has a link for it at the top of each page.
#### robots.txt
This very important file must be put under the root of your domain. It is used
by web crawlers (a.k.a bots, spiders, etc) to get access information about the
website. In our case it is also important to tell these programs that our site
has a `sitemap`. Read [this](http://www.robotstxt.org/robotstxt.html)
and
[this](https://support.google.com/webmasters/answer/6062596?hl=en&ref_topic=6061961)
for more information.
For example, since this project is called `the-plain-libre` and is published
under `https://frnmst.github.io/the-plain-libre`, we need to put the robots.txt
file just under `https://frnmst.github.io/`, i.e
https://frnmst.github.io/robots.txt
Since I didn't have neither a "user page" nor a domain I created a dummy [user
page](https://github.com/frnmst/frnmst.github.io) repository and I copied the
`robots.txt` file from the generated `./_site` directory from Jekyll. This
works for me. This means that in my case the `robots.txt` in this repository is
ignored by the bots.
I guess that if you have multiple repository pages you can edit
the robots.txt file appropriately and set rules (and sitemap locations) for
each one of them.
### Mobile support
Mobile support is available for this theme through the CSS file. It works but
it could be much better.
### Avatar
Use a squared avatar in `./_assets/avatar.jpg`.
### Compressed HTML output
By default Jekyll leaves lots of whitespace in the html source. You can verify
this yourself.
Since useless white space == useless data, we transmit useless bytes, thus
slowing down the website.
For this reason I decided to use a compressed html output thanks to
[jekyll-compress-html](https://github.com/penibelst/jekyll-compress-html),
which is a pure liquid layout to be used as a wrapper on the
`./_layouts/default.html` layout.
jekyll-compress-html is released under the MIT license.
## License
Copyright (C) 2017, Franco Masotti <franco.masotti@student.unife.it>
[MIT](LICENSE.md)

BIN
_assets/avatar.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

128
_assets/by-sa.svg

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="85.333336"
height="16"
id="svg2279"
sodipodi:version="0.32"
inkscape:version="0.92.1 r"
version="1.0"
sodipodi:docname="by-sa.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
id="defs2281">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath3442">
<rect
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.98393101;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3444"
width="21.988329"
height="13.315949"
x="183.46487"
y="255.06166" />
</clipPath>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="10.5125"
inkscape:cx="40"
inkscape:cy="7.5"
inkscape:document-units="px"
inkscape:current-layer="layer1"
width="80px"
height="15px"
showborder="true"
inkscape:showpageshadow="false"
inkscape:window-width="988"
inkscape:window-height="522"
inkscape:window-x="930"
inkscape:window-y="556"
showgrid="false"
inkscape:window-maximized="0" />
<metadata
id="metadata2284">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="BY-SA"
transform="matrix(0.9875019,0,0,0.9333518,-345.49402,-380.59934)">
<g
id="g3747"
transform="translate(168.53333,154.66667)">
<rect
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.11105883;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3749"
width="85.333336"
height="16"
x="181.86667"
y="253.71967" />
<rect
y="255.31966"
x="183.46666"
height="12.8"
width="82.133331"
id="rect3751"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.98393101;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="fill:#abb1aa;fill-opacity:1;stroke:none;stroke-width:1.06666672;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.46913578"
d="m 183.46662,255.33339 v 12.8 h 21.69044 c 1.39589,-1.867 2.33789,-4.03678 2.33789,-6.4 0,-2.34746 -0.92579,-4.54096 -2.30456,-6.4 z"
id="path3753"
sodipodi:nodetypes="cccscc"
inkscape:connector-curvature="0" />
<g
id="g3755"
transform="matrix(0.9612533,0,0,0.9612533,7.289767,10.140799)"
clip-path="url(#clipPath3442)">
<path
id="path3757"
cx="296.35416"
ry="22.939548"
cy="264.3577"
type="arc"
rx="22.939548"
d="m 202.73511,261.71953 c 0.002,4.15146 -3.36097,7.51857 -7.51214,7.52125 -4.15119,0.002 -7.51884,-3.36072 -7.52125,-7.51214 0,-0.003 0,-0.006 0,-0.01 -0.002,-4.15146 3.36096,-7.51857 7.51215,-7.52099 4.15172,-0.002 7.51883,3.36072 7.52124,7.51218 0,0.002 0,0.005 0,0.009 z"
style="opacity:1;fill:#ffffff;stroke-width:1.06666672"
inkscape:connector-curvature="0" />
<path
d="m 201.32881,255.59708 c 1.66685,1.66683 2.5004,3.70819 2.5004,6.12245 0,2.41478 -0.81911,4.43421 -2.45732,6.05823 -1.73854,1.71046 -3.79328,2.56541 -6.16419,2.56541 -2.34229,0 -4.36144,-0.848 -6.05691,-2.54398 -1.69573,-1.69574 -2.54347,-3.72211 -2.54347,-6.07966 0,-2.35702 0.84774,-4.39784 2.54347,-6.12245 1.6524,-1.66737 3.67155,-2.50093 6.05691,-2.50093 2.41427,0 4.45429,0.83355 6.12111,2.50093 z m -11.05582,1.12137 c -1.40922,1.42342 -2.11358,3.09079 -2.11358,5.00346 0,1.91216 0.6974,3.56536 2.09192,4.95962 1.39477,1.39477 3.0552,2.0919 4.98179,2.0919 1.9266,0 3.60118,-0.70408 5.0246,-2.11304 1.35145,-1.30866 2.02744,-2.95408 2.02744,-4.93848 0,-1.96939 -0.68696,-3.64101 -2.06008,-5.01413 -1.37286,-1.37286 -3.03675,-2.05957 -4.99196,-2.05957 -1.95521,1e-5 -3.60894,0.69019 -4.96013,2.07024 z m 3.70846,4.16218 c -0.21534,-0.46948 -0.53767,-0.70436 -0.96757,-0.70436 -0.75999,0 -1.13985,0.51174 -1.13985,1.53471 0,1.02319 0.37986,1.53441 1.13985,1.53441 0.50185,0 0.86031,-0.24904 1.07539,-0.74821 l 1.05344,0.56096 c -0.50212,0.89214 -1.25541,1.33832 -2.2599,1.33832 -0.77469,0 -1.39531,-0.23754 -1.86132,-0.7121 -0.4668,-0.47508 -0.69953,-1.12994 -0.69953,-1.96483 0,-0.82019 0.24022,-1.47131 0.72093,-1.9536 0.48072,-0.48232 1.07938,-0.72337 1.79711,-0.72337 1.06174,0 1.82198,0.4184 2.28157,1.25435 z m 4.95613,0 c -0.21562,-0.46948 -0.53153,-0.70436 -0.94807,-0.70436 -0.77523,0 -1.16312,0.51174 -1.16312,1.53471 0,1.02319 0.38789,1.53441 1.16312,1.53441 0.50267,0 0.85469,-0.24904 1.05561,-0.74821 l 1.07698,0.56096 c -0.50132,0.89214 -1.25356,1.33832 -2.25617,1.33832 -0.77363,0 -1.39291,-0.23754 -1.85864,-0.7121 -0.46493,-0.47508 -0.69791,-1.12994 -0.69791,-1.96483 0,-0.82019 0.23645,-1.47131 0.70915,-1.9536 0.47241,-0.48232 1.07378,-0.72337 1.80462,-0.72337 1.05986,0 1.81904,0.4184 2.27701,1.25435 z"
id="path3759"
style="opacity:1;stroke-width:1.06666672"
inkscape:connector-curvature="0" />
</g>
</g>
<path
id="text3761"
d="m 381.24768,415.66402 c 0.26185,0 0.46038,-0.0572 0.59563,-0.17147 0.13523,-0.11431 0.20284,-0.28291 0.20286,-0.50583 -2e-5,-0.22004 -0.0676,-0.38722 -0.20286,-0.50154 -0.13525,-0.11716 -0.33378,-0.17574 -0.59563,-0.17575 h -0.91932 v 1.35459 h 0.91932 m 0.0561,2.79919 c 0.33378,0 0.5841,-0.07 0.751,-0.21004 0.16976,-0.14003 0.25465,-0.35151 0.25465,-0.63444 0,-0.27719 -0.0834,-0.48438 -0.25034,-0.62156 -0.16688,-0.14003 -0.41865,-0.21004 -0.75531,-0.21004 h -0.97543 v 1.67608 h 0.97543 m 1.54516,-2.30194 c 0.35679,0.10293 0.63301,0.29293 0.82869,0.57012 0.19565,0.27722 0.29349,0.61729 0.2935,1.02024 -1e-5,0.61729 -0.21007,1.07738 -0.63016,1.38031 -0.42009,0.30292 -1.05888,0.45439 -1.91634,0.45439 h -2.75796 v -6.4 h 2.49469 c 0.89485,0 1.54227,0.13431 1.94222,0.40294 0.40283,0.26863 0.60425,0.69873 0.60425,1.29029 0,0.3115 -0.0734,0.57727 -0.22011,0.79733 -0.14675,0.21718 -0.35968,0.37864 -0.63878,0.48438 m 0.97767,-2.97494 h 1.81707 l 1.46747,2.2805 1.46745,-2.2805 H 390.4 l -2.45585,3.70368 v 2.69632 h -1.66168 v -2.69632 l -2.45585,-3.70368 m 5.67564,3.24929 h 2.7105 v 1.24742 h -2.7105 v -1.24742 m 8.49404,-3.04783 v 1.3546 c -0.35392,-0.15718 -0.69921,-0.27578 -1.03585,-0.3558 -0.33666,-0.08 -0.65463,-0.12003 -0.95386,-0.12003 -0.39709,0 -0.69057,0.0543 -0.88048,0.16289 -0.18992,0.10861 -0.28486,0.27722 -0.28486,0.50584 0,0.17147 0.0632,0.30579 0.1899,0.40294 0.12949,0.0943 0.36255,0.17575 0.69921,0.24434 l 0.70784,0.14145 c 0.71646,0.1429 1.22576,0.3601 1.52788,0.65159 0.30212,0.29149 0.45318,0.70587 0.45319,1.24312 -10e-6,0.70589 -0.21148,1.23171 -0.63446,1.5775 -0.42011,0.34294 -1.0632,0.5144 -1.92929,0.5144 -0.40859,0 -0.81861,-0.0386 -1.23007,-0.11574 -0.41148,-0.0771 -0.82294,-0.19148 -1.2344,-0.34293 v -1.39317 c 0.41146,0.2172 0.80853,0.38152 1.19123,0.49296 0.38557,0.1086 0.75675,0.16291 1.11355,0.16291 0.36255,0 0.64021,-0.0601 0.833,-0.18005 0.19278,-0.12002 0.28918,-0.2915 0.28918,-0.5144 0,-0.20004 -0.0661,-0.35436 -0.19853,-0.46296 -0.1295,-0.10859 -0.3899,-0.20576 -0.78122,-0.29149 l -0.64309,-0.14146 c -0.64454,-0.13717 -1.11643,-0.3558 -1.41568,-0.65586 -0.29638,-0.30007 -0.44456,-0.70444 -0.44456,-1.21313 0,-0.63727 0.20717,-1.12738 0.62153,-1.47033 0.41433,-0.34293 1.00995,-0.5144 1.78685,-0.5144 0.35392,0 0.7179,0.0271 1.09196,0.0815 0.37405,0.0514 0.76106,0.13003 1.16103,0.23576 m 5.79648,5.03255 h -2.59827 l -0.41003,1.16599 h -1.67031 l 2.38678,-6.4 h 1.98108 l 2.38678,6.4 h -1.67031 l -0.40572,-1.16599 m -2.18393,-1.1874 h 1.76527 l -0.88047,-2.54628 -0.8848,2.54628"
style="font-style:normal;font-weight:bold;font-size:8.25858784px;font-family:'Bitstream Vera Sans';fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.06666672px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.8 KiB

22
_assets/core.scss

@ -0,0 +1,22 @@
---
# Front matter comment to ensure Jekyll properly reads file.
#@font-face {
# font-family: 'TowerPrintStandard';
# src: url('{{ site.baseurl }}/fonts/Tower_Print.eot');
# src: url('{{ site.baseurl }}/fonts/Tower_Print.woff');
# src: url('{{ site.baseurl }}/fonts/Tower_Print.svg');
# src: url('{{ site.baseurl }}/fonts/Tower_Print.ttf');
#};
---
@font-face {
font-style: normal;
font-weight: normal;
font-family: 'HiLo-DecoRegular';
src: url('{{ site.baseurl }}/assets/fonts/HiLo-Deco.ttf');
};
@import 'main';
@import 'syntax';

BIN
_assets/favicon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

BIN
_assets/fonts/HiLo-Deco.ttf

Binary file not shown.

5
_assets/gravatar_wrapper.svg

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
<rect width="100" height="100" style="fill:rgb(191,191,191)"/>
</svg>

After

Width:  |  Height:  |  Size: 463 B

201
_assets/rodentia-icons_application-x-feed.svg

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--part of the rodentia icon theme by sixsixfive released under CC0 (https://creativecommons.org/publicdomain/zero/1.0/) on openclipart-->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
version="1.1"
id="svg110"
sodipodi:docname="rodentia-icons_application-x-feed.svg"
inkscape:version="0.92.1 r">
<metadata
id="metadata114">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1080"
id="namedview112"
showgrid="false"
inkscape:zoom="18.604167"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg110" />
<defs
id="0">
<linearGradient
id="A">
<stop
id="L"
stop-color="#fff"
stop-opacity="0.8" />
<stop
id="M"
offset="1"
stop-color="#fff"
stop-opacity="0" />
</linearGradient>
<linearGradient
id="B">
<stop
id="N"
stop-color="#fcaf3e" />
<stop
id="O"
offset="1"
stop-color="#f57900" />
</linearGradient>
<linearGradient
id="C">
<stop
id="P"
stop-color="#2e3436" />
<stop
id="Q"
offset="1"
stop-color="#2e3436"
stop-opacity="0" />
</linearGradient>
<radialGradient
cx="25.712"
cy="48.735"
r="21.856"
id="D"
xlink:href="#C"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.09243698,0,44.229759)" />
<radialGradient
cx="13.559"
cy="12.06"
r="16.219"
id="E"
xlink:href="#B"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.6174379,2.5604989,-3.7886681,0.9135993,49.367351,-37.86865)" />
<linearGradient
y1="2.438"
x2="0"
y2="43.34"
id="F"
xlink:href="#A"
gradientUnits="userSpaceOnUse" />
<radialGradient
cx="34.13"
cy="8.609"
r="3.03"
id="G"
xlink:href="#B"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.9999999,2.0717464e-7,-2.1678585e-7,2.0927836,-34.124995,-9.2675658)" />
<linearGradient
x1="34.13"
y1="8.75"
x2="36.533"
y2="6.363"
id="H"
xlink:href="#A"
gradientUnits="userSpaceOnUse" />
<filter
x="-0.16"
y="-0.151"
width="1.321"
height="1.302"
color-interpolation-filters="sRGB"
id="I">
<feGaussianBlur
stdDeviation="0.5327"
id="R" />
</filter>
</defs>
<path
d="m 47.568058,48.734642 a 21.855595,2.0202651 0 1 1 -43.7111893,0 21.855595,2.0202651 0 1 1 43.7111893,0 z"
transform="matrix(1.0944165,0,0,0.9661277,-4.1401442,-2.4030967)"
id="1"
opacity="0.54"
fill="url(#D)" />
<path
d="M 9.84375,1.367375 C 8.1263501,1.367375 6.75,2.7437253 6.75,4.461125 l 0,37.15625 c 0,1.7174 1.3763496,3.093751 3.09375,3.09375 l 28.3125,0 c 1.7174,0 3.09375,-1.376351 3.09375,-3.09375 l 0,-33.21875 -6.75,-7.03125 -24.65625,0 z"
id="2"
fill="#a64a00"
style="fill:#333333" />
<path
d="m 9.84375,2.25 c -1.1586131,0 -2.0625,0.903887 -2.0625,2.0625 l 0,37.15625 c 0,1.158614 0.9038868,2.062501 2.0625,2.0625 l 28.3125,0 c 1.158613,0 2.0625,-0.903888 2.0625,-2.0625 l 0,-32.78125 L 34.0625,2.25 9.84375,2.25 z"
id="3"
fill="url(#E)"
transform="translate(4.4958504e-8,0.148625)"
style="fill:#808080" />
<path
d="m 9.84375,2.75 c -0.8977312,0 -1.5625,0.6647689 -1.5625,1.5625 l 0,37.15625 c 0,0.897732 0.6647689,1.562501 1.5625,1.5625 l 28.3125,0 c 0.897731,0 1.5625,-0.66477 1.5625,-1.5625 l 0,-32.625 -5.875,-6.09375 -24,0 z"
transform="translate(4.4958504e-8,0.148625)"
id="4"
opacity="0.8"
fill="none"
stroke="url(#F)"
stroke-linejoin="round"
stroke-linecap="square" />
<path
d="m 32.25,2.40625 0,6.875 c 0,0.956611 0.676661,1.593751 1.71875,1.59375 l 6.25,0 0,-1.8125 -6.9375,-6.65625 -1.03125,0 z"
id="5"
opacity="0.16"
fill="#2e3436"
filter="url(#I)" />
<path
d="m 33.125,1.375 0,6.3125 c -2e-6,1.158614 0.903887,2.062501 2.0625,2.0625 l 6.0625,0 0,-1.34375 -6.75,-7.03125 -1.375,0 z"
id="6"
fill="#a64a00"
style="fill:#333333" />
<path
d="m 34.125,2.40625 0,5.28125 c -10e-7,0.6407004 0.421799,1.0625006 1.0625,1.0625 l 5,0 -6.0625,-6.34375 z"
id="7"
fill="url(#G)"
style="fill:#b3b3b3" />
<path
d="m 34.625,3.6875 0,4 c -10e-7,0.3773049 0.185194,0.5625003 0.5625,0.5625 l 3.84375,0 L 34.625,3.6875 z"
id="8"
opacity="0.8"
fill="none"
stroke="url(#H)"
stroke-linecap="square" />
<g
transform="translate(-4.5504149e-7,0.5000625)"
id="9"
style="fill:#f9f9f9">
<path
d="m 12.05193,10.539 0,4.128016 c 10.918435,0.327483 19.704262,9.507854 19.977836,20.860833 L 35.948071,35.539 C 35.696275,22.994276 26.792197,12.666583 15.230717,10.792863 14.194316,10.624911 13.128369,10.566416 12.05193,10.539 z m 0,8.785833 0,3.995567 c 6.33782,0.310289 11.395139,5.606924 11.666618,12.185374 l 3.785849,0.01115 C 27.251573,27.373894 21.465165,20.697249 13.950376,19.479356 13.330764,19.378933 12.692621,19.350039 12.05193,19.324833 z m 2.891819,10.099293 c -1.589737,-0.0044 -2.891819,1.330334 -2.891819,3.024267 0,1.693933 1.300575,3.03092 2.891819,3.035307 1.589737,0.0044 2.891818,-1.330336 2.891818,-3.02427 0,-1.588475 -1.146794,-2.8781 -2.593807,-3.035304 -0.07003,-0.0076 -0.173265,3.42e-4 -0.298011,0 l 0,0 z"
id="J"
opacity="0.5"
fill="#fff"
style="fill:#f9f9f9" />
<path
d="m 12.05193,9.539375 0,4.128016 c 10.918435,0.327483 19.704262,9.507854 19.977836,20.860833 l 3.918305,0.01115 C 35.696275,21.994651 26.792197,11.666958 15.230717,9.793238 14.194316,9.625286 13.128369,9.566791 12.05193,9.539375 z m 0,8.785833 0,3.995567 c 6.33782,0.310289 11.395139,5.606924 11.666618,12.185374 l 3.785849,0.01115 C 27.251573,26.374269 21.465165,19.697624 13.950376,18.479731 13.330764,18.379308 12.692621,18.350414 12.05193,18.325208 z m 2.891819,10.099293 c -1.589737,-0.0044 -2.891819,1.330334 -2.891819,3.024267 0,1.693933 1.300575,3.03092 2.891819,3.035307 1.589737,0.0044 2.891818,-1.330336 2.891818,-3.02427 0,-1.588475 -1.146794,-2.8781 -2.593807,-3.035304 -0.07003,-0.0076 -0.173265,3.42e-4 -0.298011,0 l 0,0 z"
id="K"
fill="#a64a00"
style="fill:#f9f9f9" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

98
_config.yml

@ -0,0 +1,98 @@
# Site Info
title: "Franco Masotti's blog"
description: "A blog about libre software experiences and everything else"
# Author Info
author_name: "Franco Masotti"
author_email: franco.masotti@student.unife.it
github_username: frnmst
avatar_path: avatar.jpg
# Site Settings
baseurl: "" # Base URL must end WITHOUT a slash, default: ""
permalink: /notes/:title # Post permalink. If you change this you must
# modify all the occurencies manually.
timezone: Europe/Rome # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Site Build
highlighter: rouge
markdown: kramdown
kramdown:
input: GFM
sass:
style: :compressed
# Other Params
include: [ "_pages" ]
exclude: [ "LICENSE", "README.md", "CNAME", "vendor", "Gemfile", "Makefile", "_repository_assets" ]
# Ruby gems
gems:
- jekyll-sitemap
# Excerpts
excerpt_enabled: true
excerpt_separator: "<!--more-->"
excerpt_words: 20
# Meta tag options
meta_description_words: 140
meta_excerpt_words: 140
meta_site_description_words: 140
# Keep comments hidden
collections:
comments:
output: false
pages:
output: false
media:
output: true
assets:
output: true
defaults:
-
scope:
path: ""
values:
layout: "null"
-
scope:
type: "pages"
values:
layout: "page"
-
scope:
type: "posts"
values:
layout: "post"
is_post: true
-
scope:
path: "_pages/index.html"
values:
is_home: true
-
scope:
path: "_pages/404.md"
values:
is_404: true
-
scope:
path: "_pages/tags.md"
values:
is_tags: true
-
scope:
path: "_pages/sitemap.html"
values:
is_sitemap: true
-
scope:
path: "comments"
type: comments
values:
layout: comment
is_comment: true

67
_includes/comments.html

@ -0,0 +1,67 @@
<article><div class="divider"></div></article>
<div class="comment-environment">
<article>
<div class="comment">
<div class="title"><h2>Comments</h2></div>
{% capture mail %}{{ site.author_email }}{% endcapture %}
{% assign mail_substring = mail | split: '@' %}
{% assign mail_username = mail_substring[0] %}
{% assign mail_domain = mail_substring[1] %}
{% if page.is_post %}
{% capture mailto_prefix %}{{ mail_username }}+{{ page.path | remove: ".md" | remove: "_posts/" }}{% endcapture %}
{% else %}
{% capture mailto_prefix %}{{ mail_username }}+{{ page.path | remove: ".html" | remove: ".md" | remove: "_pages/" }}{% endcapture %}
{% endif %}
<div class="title">
<h3>
<a href="mailto:{{ mailto_prefix }}@{{ mail_domain }}">
Post a new comment</a>
</h3>
</div>
{% for comment in site.comments %}
{% assign page_path = page.path | replace: "_posts/", "" | remove: ".md" %}
{% assign comment_fullpath = comment.path | replace: "_comments/", "" | split: "/" %}
{% assign comment_path = comment_fullpath[0] %}
{% assign comment_id = comment_fullpath[1] | remove: ".md" %}
{% if comment_path == page_path %}
{% if forloop.first %}
<div class="divider"></div>
{% endif %}
<div class="comment-headers">
<table>
<tr>
<td>Subject</td>
{% comment %}
<!-- Link to single comment -->
{% endcomment %}
<td><a href="#{{ comment_id }}" id={{ comment_id }}>{{ comment.subject }}</a></td>
</tr>
<tr>
<td>From</td>
<td>{{ comment.from }}</td>
</tr>
<tr>
<td>Date</td>
<td>{{ comment.date | date: "%c, %:z GMT" }}</td>
</tr>
</table>
</div>
{{ comment.content | markdownify }}
{% comment %}
<!-- Don't print the divider after the last comment -->
{% endcomment %}
{% if forloop.last == false %}
<div class="divider"></div>
{% endif %}
{% endif %}
{% endfor %}
</div>
</article>
</div>

29
_includes/footer.html

@ -0,0 +1,29 @@
<div class="footer">
<span class="block">
<span class="rss">
<!--The feed svg image is a modified version of
https://publicdomainvectors.org/download.php?file=rodentia-icons_application-x-feed.svg
which is released under public domain-->
<a href="{{ site.baseurl }}/feed.xml">
<img src="{{ site.baseurl }}/assets/rodentia-icons_application-x-feed.svg"
alt="RSS"></a>
</span>
</span>
<span class="block">
Made using <a href="http://jekyllrb.com/">Jekyll</a> &amp;
<a href="https://github.com/frnmst/the-plain-libre" title="The
Plain Libre theme by Franco Masotti">The Plain Libre</a>
</span>
<span class="block">
Website content is released under the
<span class="copyright">
<img src="{{ site.baseurl }}/assets/by-sa.svg" alt="CC-BY-SA">
</span>
license
</span>
<span class="block">
&copy; {{ site.time | date: '%Y' }} {{ site.author_name }}
</span>
</div>

18
_includes/head.html

@ -0,0 +1,18 @@
{% comment %}<!--Seo metas -->{% endcomment %}
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{% if page.title %}
<title>{{ page.title }}</title>
{% else %}
<title>{{ site.title }}</title>
{% endif %}
<meta name="description"
content="{% if page.description %}{{ page.description | truncate: site.meta_description_words }}{% else if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: site.meta_excerpt_words }}{% else %}{{ site.description | truncate: site.meta_description_words }}{% endif %}">
<link rel="icon" href="{{ site.baseurl }}/assets/favicon.png">
<link rel="stylesheet" href="{{ site.baseurl }}/assets/core.css">
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ site.baseurl }}/feed.xml" />
<link rel="canonical" href="{{ page.url | prepend: site.baseurl | prepend: site.url }}">

22
_includes/header.html

@ -0,0 +1,22 @@
<div class="main">
<a href="#main">skip to main content</a>
{% if page.url != '/sitemap/' %}
<a href="{{ site.baseurl }}/sitemap/">sitemap</a>
{% endif %}
</div>
<aside class="logo">
{% if page.url == '/index.html' or page.url == '/' %}
{% assign link = '/about' %}
{% assign prompt = 'About' %}
{% else %}
{% assign link = '/' %}
{% assign prompt = 'Back to Home' %}
{% endif %}
<a href="{{ link | prepend: site.baseurl }}">
<img src="{{ site.baseurl }}/assets/{{ site.avatar_path }}" width="80px" height="80px" alt="avatar" class="avatar">
</a>
<span class="logo-prompt">{{ prompt }}</span>
</aside>

18
_includes/image.html

@ -0,0 +1,18 @@
{% if include.otherpost == true %}
{% assign url = "/media/" | append: include.file %}
{% else %}
{% capture url %}/media/{{ page.path | remove: "_posts/" | remove: ".md" | append: "/" | append: include.file }}{% endcapture %}
{% endif %}
{% if include.caption %}
<figure>
<a href="{{ url | prepend: site.baseurl }}" target="_blank" class="image">
<img src="{{ url | prepend: site.baseurl }}" alt="{% if include.alt %}{{ include.alt }}{% else %}Image{% endif %}">
</a>
<caption>{{ include.caption }}</caption>
</figure>
{% else %}
<a href="{{ url | prepend: site.baseurl }}" target="_blank" class="image">
<img src="{{ url | prepend: site.baseurl }}" alt="{% if include.alt %}{{ include.alt }}{% else %}Image{% endif %}">
</a>
{% endif %}

8
_includes/page_navigation.html

@ -0,0 +1,8 @@
<div class="page-navigation">
{% if page.is_home != true %}
<a class="home" href="{{ site.baseurl }}/" title="Back to
Homepage">Home</a>
<span>&middot;</span>
{% endif %}
<a href="#main" title="Back to top">Top</a></span>
</div>

17
_includes/post_navigation.html

@ -0,0 +1,17 @@
<div class="page-navigation">
{% if page.next.url %}
<a href="{{ site.baseurl }}{{ page.next.url }}" title="NEXT:
{{page.next.title}}">&lt;&lt;</a>
<span> &middot; </span>
{% endif %}
<a href="{{ site.baseurl }}/" title="Back to
Homepage">Home</a>
<span> &middot; </span>
<a href="#main" title="Back to top">Top</a>
{% if page.previous.url %}
<span> &middot; </span>
<a href="{{ site.baseurl }}{{ page.previous.url }}"
title="PREV: {{ page.previous.title }}">&gt;&gt;</a>
{% endif %}
</div>

19
_includes/tag_list.html

@ -0,0 +1,19 @@
{% assign site_tags = site.tags | sort %}
{% comment %}
<!--Tags summary with links as pararaphs -->
{% endcomment %}
<article>
<div class="tag-list">
{% for tag in site_tags %}
{% assign tagg = tag[0] | slugify %}
{% if page.is_home %}
{% capture link %}{{ site.baseurl }}/tags/#{{ tagg }}{% endcapture %}
<a href="{{ link }}">{{ tag[0] }}</a>&nbsp;
{% else %}
<a href="#{{ tagg }}">{{ tag[0] }}</a>&nbsp;
{% endif %}
{% endfor %}
</div>
</article>

0
_layouts/comment.html

10
_layouts/compress.html

@ -0,0 +1,10 @@
---
# Jekyll layout that compresses HTML
# v3.0.2
# http://jch.penibelst.de/
# © 2014–2015 Anatol Broder
# MIT License
---
{% capture _LINE_FEED %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

33
_layouts/default.html

@ -0,0 +1,33 @@
---
layout: compress
---
<!DOCTYPE html>
<html lang="en">
<head>
{% include head.html %}
</head>
<body>
{% include header.html %}
{% if page.is_home %}
{% include tag_list.html %}
{% endif %}
<main>
{{ content | replace: '&#8617;', '&#8617;&#xfe0e;' }}
</main>
{% comment %}<!--Can't use == false since page.is_home might be undefined.-->{% endcomment %}
{% if page.is_home != true and page.is_404 != true and page.is_tags != true and page.is_sitemap != true %}
{% include comments.html %}
{% endif %}
{% if page.is_post %}
{% include post_navigation.html %}
{% else %}
{% include page_navigation.html %}
{% endif %}
{% include footer.html %}
</body>
</html>

19
_layouts/page.html

@ -0,0 +1,19 @@
---
layout: default
---
<article>
<h1 class="title">{{ page.title }}</h1>
<div class="divider"></div>
{% if page.is_tags %}
{% include tag_list.html %}
{% endif %}
<div id="main"></div>
{{ content }}
</article>

36
_layouts/post.html

@ -0,0 +1,36 @@
---
layout: default
---
<article>
<div class="center">
<h1>{{ page.title }}</h1>
<time>First written on {{ page.date | date: '%B %-d, %Y' }}</time>
{% assign page_date = page.date | date: '%F' %}
{% assign page_updated = page.updated | date: '%F' %}
{% if page_date != page_updated %}
<br />
<br />
<time>Last updated on {{ page.updated | date: '%B %-d, %Y' }}</time>
{% endif %}
{% if page.tags %}
<br />
<br />
{% assign page_tags = page.tags | sort %}
<div class="tag-list">
{% for tag in page_tags %}
{% assign tagg = tag | slugify %}
{% capture link %}{{ site.baseurl }}/tags/#{{ tagg }}{% endcapture %}
<a href="{{ link }}">{{ tag }}</a>&nbsp;
{% endfor %}
</div>
{% endif %}
</div>
<div class="divider"></div>
<div id="main"></div>
{{ content }}
</article>

9
_pages/404.md

@ -0,0 +1,9 @@
---
layout: page
title: 404
permalink: 404.html
---
:(
Looks like this page doesn't exist.

63
_pages/about.md

@ -0,0 +1,63 @@
---
layout: page
title: About
permalink: /about/
---
## Presentation
Hello web world.
This blog tells my experiences with software, computing, "hacks",
hardware, technology and whatever comes to my mind I want to share.
Usually, when I talk about software I mean
[free software](https://www.gnu.org/philosophy/free-sw.en.html). This means
that most probably I won't talk about proprietary software and operating
systems like Windows, MacOs, etc... but only about GNU/Linux, GNU/Linux-libre
distributions or whatever fully free computing environments will come up. Who
knows what the future will hold us...
At the moment I am a proud [Parabola GNU/Linux-libre](https://parabola.nu)
user running a very lightweight desktop environment like
[spectrwm](http://www.spectrwm.org) after going through years of
[OpenBox](http://openbox.org)
I hope that this turns out to be a useful blog for anyone that encouters
similar problems I have solved.
Enjoy!
P.S: I also hope my use of english is correct. If that is not the case don't
hesitate to mail me.
## Comment rules
Every post (and some other pages like this one) contain a comment section which
is just a `mailto` link to my private mail containing an id to that post or
comment. You can just click or copy that link and send me an email.
When you send me an email I will moderate it. By default I will report
verbatim:
- the subject
- the sending date
- your name, if present, or your email if you request so in the comment. If
none is available I will simply use `anonymous` in this field.
- the content which can be written in krmarkdown (the one used on GitHub and
GitLab)
## Contacts
You will find me on [GitHub](https://github.com/frnmst),
[GitLab](https://gitlab.com/frnmst), [GNU Social](https://quitter.no/frnmst),
[mail one](mailto://franco.masotti@student.unife.it),
[mail two](mailto://franco.masotti@live.com),
[Tox](tox:9D855839E4BB0ADBF4F49063BF2ABC1479A7728011F20B563EA104B2EE10FF19DC8C255D8F3D),
[XMPP](xmpp://franco.masotti@xabber.de) and other
less relevant web locations.
You won't find me on Facebook, Whatsapp, Twitter, and similar.
If you want to see another similar blog wich I co-autor have a
look at [Linux Difficile](https://linuxdifficile.wordpress.com/).

45
_pages/feed.xml

@ -0,0 +1,45 @@
---
layout: null
permalink: feed.xml
---
<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title | xml_escape }}</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>
<link href="{{ site.baseurl }}/" rel="alternate"/>
<link href="{{ site.baseurl | append: feed.xml }}" rel="self"/>
<rights>Copyright @
{{ site.time | date: '%Y' }},
{{ site.author_name | xml_escape }}</rights>
<icon>{{ site.baseurl }}/assets/favicon.png</icon>
<author>
<name>{{ site.author_name | xml_escape }}</name>
<uri>{{ site.baseurl }}</uri>
<email>{{ site.author_email | xml_escape }}</email>
</author>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.baseurl }}/</id>
<generator version="{{ jekyll.version }}">Jekyll</generator>
{% for post in site.posts %}
{% assign content = post.content | replace: "&#8617;", "&#8617;&#xfe0e;" %}
{% assign content = content | replace: "data-lang", "lang" %}
{% assign content = content | replace: "<mark>", "<b>" | replace: "</mark>", "</b>" %}
<entry>
<title type="html">{{ post.title | xml_escape }}</title>
<id>{{ post.url | prepend: site.baseurl }}</id>
<updated>{{ post.updated | date_to_xmlschema }}</updated>
<published>{{ post.date | date_to_xmlschema }}</published>
<content type="html" xml:lang="en">
<![CDATA[{{ content }}]]>
</content>
</entry>
{% endfor %}
</feed>

41
_pages/index.html

@ -0,0 +1,41 @@
---
layout: default
permalink: index.html
---
<section>
<div id="main"></div>
{% for post in site.posts %}
{% unless post.next %}
<h3>{{ post.date | date: '%Y' }} ~</h3>
{% else %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
{% if year != nyear %}
<h3>{{ post.date | date: '%Y' }} ~</h3>
{% endif %}
{% endunless %}
<ul>
<li>
<div class="post-date">
<span>{{ post.date | date: "%b %d" }}</span>
</div>
<div class="title">
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</div>
{% if site.excerpt_enabled %}
<div class="excerpt">
{% if post.content contains site.excerpt_separator %}
{{ post.excerpt | strip_html }}
{% else %}
{{ post.excerpt | strip_html | truncatewords: site.excerpt_words }}
{% endif %}
</div>
{% endif %}
</li>
</ul>
{% endfor %}
</section>

27
_pages/sitemap.html

@ -0,0 +1,27 @@
---
layout: page
title: Sitemap
permalink: /sitemap/
---
{% assign site_pages = site.pages | sort %}
<h3>Pages</h3>
<ul>
{% for page in site_pages %}
{% if page.title != 404 %}
<li>
<a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% assign site_posts = site.posts | sort %}
<h3>Posts</h3>
<ul>
{% for post in site_posts %}
<li>
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>

28
_pages/tags.md

@ -0,0 +1,28 @@
---
layout: page
title: Tags
permalink: /tags/
---
<div class="tag-posts">
<article>
{% assign site_tags = site.tags | sort %}
{% for tag in site_tags %}
<h3 id="{{ tag[0] | slugify }}">{{ tag[0] }}</h3>
<ul>
{% assign tag_name = tag | first %}
{% for post in site.tags[tag_name] %}
<li>
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</article>
</div>

168
_posts/2017-04-24-qemu-ssh-tunnel.md

@ -0,0 +1,168 @@
---
title: Qemu SSH tunnel
updated: 2017-04-24 19:00
tags: [qemu, ssh tunnel]
description: How to use qemu via vnc and SSH
---
Hello readers,
I was in need to run a virtual machine to do some experiments an `archiso`
(sic) and `parabolaiso`. My `Intel(R) Core(TM)2 Quad CPU Q8200 @
2.33GHz` PC desktop processor does not support virtualization technology which
means that when I run a virtual machine it's very, very slow (barely usable).
So I thought: why not use the home server which has newer hardware and
supports virtualization:
```shell
$ lscpu | grep Virtualization
Virtualization: VT-x
```
Now, some time ago I've written a
[simple script](https://github.com/frnmst/qvm) to handle my "QEMU needs",
VirtualBox is not available on Parabola and I don't like the available QEMU
frontends.
So, after about 1 hour of information retreival throughout Internet articles I
was able to connect all the dots... Here it is.
## Premise
The technique used here is called ["SSH
tunneling"](https://en.wikipedia.org/wiki/Tunneling_protocol#Secure_Shell_tunneling)
and enables you to use an SSH server as an intermediary between the client and
a remote server. Let's see a trivial scheme of the VNC setup
```
port 22 port 5900
client <--> intermediary server <--> remote server
^ (it's in a localhost location
| in respect to the intermediary
| server)
|
|
| port 5901
|
$ vncviewer 127.0.0.1:1 (:1 is equivalent to :5901)
```
## Terminology
- `127.0.0.1`: local address (a.k.a `localhost`)
- `server.address`: address of the intermediary server
- `server-user`: login name of the intermediary server
- `vm-user`: login name of the virual machine
## Server
First thing: since my server does not have a GUI I installed the
`qemu-headless` package.
Here is the modified version of the install function of qvm
```shell
installs()
{
qemu-system-x86_64 -m "$vm_memory" \
-enable-kvm \
-monitor pty -vnc 127.0.0.1:0 \
-cdrom "$img_name" \
-boot order=d \
"$vhd_name" &
}
```
This line does the magic:
```shell
-monitor pty -vnc 127.0.0.1:0 \
```
The run function has now that same magic line:
```shell
[...]
qemu-system-x86_64 \
-m "$vm_memory" \
-enable-kvm \
-monitor pty -vnc 127.0.0.1:0 \
-device e1000,netdev=user.0 \
-netdev user,\
id=user.0,hostfwd=tcp::"$host_port"-:"$guest_port",\
hostfwd=tcp::"$ssh_host_port"-:"$ssh_guest_port" \
-virtfs local,path="$shared_data_path",\
security_model=none,mount_tag="$mount_tag" \
"$vhd" &
[...]
```
Make sure to have the following configurations in the OpenSSH configuration
(`/etc/ssh/ssh_config`) otherwise the next steps won't work
AllowTcpForwarding yes
PermitOpen yes
## Client
Before starting the VNC client, you must create an SSH socket (tunnel).
```shell
$ ssh -N -f -L 5901:127.0.0.1:5900 server-user@server.address
```
You must now install vnc clients like
[gtk-vnc](https://wiki.gnome.org/Projects/gtk-vnc) or
[TigerVNC](http://www.tigervnc.org).
I've noticed that TigerVNC seems to handle window resizes better, so I decided
to go for that.
```shell
$ vncviewer 127.0.0.1:1
```
You should now see the virtual machine.
## SSH
The next thing was to connect to the SSH daemon on the virtual machine just
like what qvm enables you to do. I thought I could use the same method of VNC.
Once the SSH daemon is up and running you can connect to it with the following
command from the intermediary server:
```shell
$ ssh -p 2222 vm-user@127.0.0.1
```
The SSH port of the virual machine is the default one (22). qvm exposes the
port 2222 by default so you can connect from `localhost` with it.
We need another step to be able to connect remotely and directly to the virtual
machine from our client:
```shell
$ ssh -N -f -L 2223:127.0.0.1:2222 server-user@server.address
```
then
```shell
$ ssh -p 2223 vm-user@127.0.0.1
```
You should now see the login.
## Final considerations
You can use this method also for internet browsing and lots of other stuff.
Infact, using SSH implies that the traffic between the client and remote server
is encrypted, but using VNC directly by default is NOT so pay
attention.
Cheers!
## Resources
- <http://blog.scottlowe.org/2013/08/21/accessing-vnc-consoles-of-kvm-guests-via-ssh/>
- <https://www.dragonsreach.it/2012/10/06/ssh-tunneling-for-vnc/>
- <https://www.cyberciti.biz/faq/linux-kvm-vnc-for-guest-machine/>
- <https://www.cyberciti.biz/faq/howto-setup-vnc-server-ssh-client-tunnel-via-internet/>

1
_sass/main.css

@ -0,0 +1 @@
main.scss

474
_sass/main.scss

@ -0,0 +1,474 @@
body {
background-color: #e6e6e6;
font-style: normal;
font-weight: 400;
font-size: 1.5em;
font-family: 'HiLo-DecoRegular';
padding: 20px;
margin: 0;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
@media (min-width: 992px) {
padding: 35px 50px;
}
}
h2,
h3,
h4,
h5 {
margin: 45px 0 25px;
}
img {
max-width: 100%;
}
a {
outline: none;
color: inherit;
text-decoration: none;
border-bottom: 1px solid #555;
&.image {
display: block;
text-align: center;
border: 0;
border-radius: 5px;
margin: 30px 0;