a first version of my site proted to jekyll
authorRalf Jung <post@ralfj.de>
Tue, 6 Oct 2015 19:20:44 +0000 (21:20 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 6 Oct 2015 19:20:44 +0000 (21:20 +0200)
.gitignore [new file with mode: 0644]
_config.yml [new file with mode: 0644]
_includes/menu.html [new file with mode: 0644]
_layouts/default.html [new file with mode: 0644]
_layouts/post.html [new file with mode: 0644]
blog/index.html [new file with mode: 0644]
build.sh [new file with mode: 0755]
feed.xml [new file with mode: 0644]
index.html [new file with mode: 0644]
projects/.gitignore [new file with mode: 0644]
style.css [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..badbc02
--- /dev/null
@@ -0,0 +1,2 @@
+_site
+.sass-cache
diff --git a/_config.yml b/_config.yml
new file mode 100644 (file)
index 0000000..f091138
--- /dev/null
@@ -0,0 +1,19 @@
+# Site settings
+title: ralfj.de
+url: "https://www.ralfj.de"
+
+struct:
+  - url: "/"
+    title: "ralfj.de"
+  - url: "/blog"
+    title: "test"
+
+defaults:
+  - scope:
+      path: "" # all files in the project
+    values:
+      layout: "default"
+
+# Build settings
+markdown: kramdown
+exclude: ['*.sh']
diff --git a/_includes/menu.html b/_includes/menu.html
new file mode 100644 (file)
index 0000000..86eae4f
--- /dev/null
@@ -0,0 +1,6 @@
+<div id="navi"><ul>
+    <li class="current"><a href="/">ralfj.de</a></li>
+    {% for item in site.struct %}
+        {{ item.url }}{{ item.title }}
+    {% endfor %}
+</ul></div>
diff --git a/_layouts/default.html b/_layouts/default.html
new file mode 100644 (file)
index 0000000..e19cd91
--- /dev/null
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width">
+
+    <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
+    {% if page.excerpt %}<meta name="description" content="{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}">{% endif %}
+
+    <link rel="stylesheet" href="/style.css">
+    <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.url }}">
+    {% if page.rss or page.layout == 'post' %}<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.url }}" />{% endif %}
+  </head>
+
+
+  <body><div id="frame">
+
+    {% include menu.html %}
+
+    <div id="page">
+        <h1>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</h1>
+        <div id="content">
+            {{ content }}
+        </div>
+    </div>
+
+  </div></body>
+
+</html>
diff --git a/_layouts/post.html b/_layouts/post.html
new file mode 100644 (file)
index 0000000..a2b4e52
--- /dev/null
@@ -0,0 +1,15 @@
+---
+layout: default
+---
+<div class="post">
+
+  <header class="post-header">
+    <h1 class="post-title">{{ page.title }}</h1>
+    <p class="post-meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
+  </header>
+
+  <article class="post-content">
+    {{ content }}
+  </article>
+
+</div>
diff --git a/blog/index.html b/blog/index.html
new file mode 100644 (file)
index 0000000..83d9398
--- /dev/null
@@ -0,0 +1,23 @@
+---
+layout: default
+---
+
+<div class="home">
+
+  <h1 class="page-heading">Posts</h1>
+
+  <ul class="post-list">
+    {% for post in site.posts %}
+      <li>
+        <span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
+
+        <h2>
+          <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
+        </h2>
+      </li>
+    {% endfor %}
+  </ul>
+
+  <p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
+
+</div>
diff --git a/build.sh b/build.sh
new file mode 100755 (executable)
index 0000000..4305b3b
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+PROJECTS_BASE="$HOME/src"
+TMPFILE=$(mktemp)
+
+while getopts "ds" opt; do
+  case $opt in
+    d)
+      DEVEL=1
+      ;;
+    s)
+      SYNC=1
+      ;;
+  esac
+done
+
+# update READMEs
+for PROJECT in lilass schsh; do
+    # get the file
+    if [ -n "$DEVEL" ]; then
+        INFILE="$PROJECTS_BASE/$PROJECT/README.md"
+    else
+        cd "$PROJECTS_BASE/$PROJECT"
+        git show master:README.rst > "$TMPFILE"
+        INFILE="$TMPFILE"
+        cd - > /dev/null
+    fi
+    OUTFILE="projects/$PROJECT/index.md"
+    # process it
+    echo "---" > "$OUTFILE"
+    head -n 1 "$INFILE" | sed 's/\(.*\)/title: "\1"/' >> "$OUTFILE"
+    echo "---" >> "$OUTFILE"
+    echo >> "$OUTFILE"
+    tail -n +3 "$INFILE" >> "$OUTFILE"
+done
+
+# call jekyll
+jekyll build
+
+if [ -n "$SYNC" ]; then
+    echo "TODO: sync to server"
+fi
diff --git a/feed.xml b/feed.xml
new file mode 100644 (file)
index 0000000..a6628bd
--- /dev/null
+++ b/feed.xml
@@ -0,0 +1,30 @@
+---
+layout: null
+---
+<?xml version="1.0" encoding="UTF-8"?>
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
+  <channel>
+    <title>{{ site.title | xml_escape }}</title>
+    <description>{{ site.description | xml_escape }}</description>
+    <link>{{ site.url }}{{ site.baseurl }}/</link>
+    <atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
+    <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
+    <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
+    <generator>Jekyll v{{ jekyll.version }}</generator>
+    {% for post in site.posts limit:10 %}
+      <item>
+        <title>{{ post.title | xml_escape }}</title>
+        <description>{{ post.content | xml_escape }}</description>
+        <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
+        <link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
+        <guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
+        {% for tag in post.tags %}
+        <category>{{ tag | xml_escape }}</category>
+        {% endfor %}
+        {% for cat in post.categories %}
+        <category>{{ cat | xml_escape }}</category>
+        {% endfor %}
+      </item>
+    {% endfor %}
+  </channel>
+</rss>
diff --git a/index.html b/index.html
new file mode 100644 (file)
index 0000000..326d043
--- /dev/null
@@ -0,0 +1,65 @@
+---
+---
+
+<h2>Willkommen</h2>
+<p>
+Willkommen auf ralfj.de, meinem Server für Experimente und digitale Unabhängigkeit.
+Auf dieser Maschine laufen diverse Dienste, die zum modernen Alltag gehören, und die ich ungern Datenkraken in irgendwelchen Wolken anvertrauen möchte (was, wenn es regnet?):
+<ul>
+    <li><a href="mailto:post-ÄT-ralfj-PUNKT-de">E-Mail</a>,</li>
+    <li>Jabber: Meine Jabber-ID lautet <a href="xmpp:ralf-ÄT-jabber-PUNKT-ralfj-PUNKT-de">ralf-ÄT-jabber-PUNKT-ralfj-PUNKT-de</a> (siehe auch <a href="https://de.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" target="_blank">den Wikipedia-Artikel zu Jabber</a>),</li>
+    <li><a href="/git">Git-Repositories</a>,</li>
+    <li><a href="https://lists.ralfj.de/">Mailing-Listen</a>,</li>
+    <li>ein DNS-Server (inkl. DynDNS und DNSSEC),</li>
+    <li>und einiges mehr.</li>
+</ul>
+Alle Software, die auf meinem Server läuft, ist selbstverständlich <a href="https://de.wikipedia.org/wiki/Freie_Software" target="_blank">frei</a>.
+Nur so kann ich davon ausgehen, dass sie nicht gegen mich bzw. meine Interessen handelt.
+Zudem läuft alle Kommunikation (soweit irgend möglich) verschlüsselt ab. Diese Art von Selbstverteidigung ist heutzutage offenbar nötig, um verbriefte Rechte (wie das Postgeheimnis) und unsere Freiheit auch im Internet durchzusetzen.<br>
+Mein GPG-Schlüssel hat übrigens die ID 0x1B24F3FF. Du kannst ihn <a href="0x1B24F3FF.asc">hier</a> oder von einem beliebigen <a href="https://sks-keyservers.net/" target="_blank">Schlüsselserver des SKS-Netzes</a> herunterladen.
+</p>
+<p>
+Warum ich mir diese Mühe mache? Nun, die Unabhängigkeit von den üblichen Internetgiganten habe ich ja schon erwähnt.
+Zudem macht es mir eine Menge Spaß, mir diese Technik mal genauer anzuschauen und zu verstehen, wie sie funktioniert.
+Nicht zuletzt habe ich beim Einrichten dieses Servers eine Menge gelernt.
+Falls du Fragen hierzu (oder zu sonst irgendwas auf diesem Server) hast, zögere bitte nicht, mich <a href="mailto:post-ÄT-ralfj-PUNKT-de">anzuschreiben</a>!
+</p>
+
+<p>
+Im Menü links findest du Informationen über mich bzw. was ich so tue.
+Vielleicht ist manches davon ja auch für dich interessant.
+<br/>
+Falls du etwas Zerstreuung suchst, schau dir doch mal das Video an, das ich gemeinsam mit einem Kommilitonen für die Computergraphik-Vorlesung erstellt habe:
+<a href="cs/cg">Breaking All the Way Out</a>.
+</p>
+
+<h2>Welcome</h2>
+<p>
+Welcome on ralfj.de, my server for experiments and digital independence.
+On this machine I maintain several services which are part of modern life, and which I would rather not entrust to data krakens in some cloud (what if it's raining?):
+<ul>
+    <li><a href="mailto:post-AT-ralfj-DOT-de">E-Mail</a>,</li>
+    <li>Jabber: My Jabber-ID is <a href="xmpp:ralf-AT-jabber-DOT-ralfj-DOT-de">ralf-AT-jabber-DOT-ralfj-DOT-de</a> (also see <a href="https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" target="_blank">the Wikipedia article about Jabber</a>),</li>
+    <li><a href="/git">Git repositories</a>,</li>
+    <li><a href="https://lists.ralfj.de/">Mailing lists</a>,</li>
+    <li>a DNS server (incl. DynDNS and DNSSEC),</li>
+    <li>and more.</li>
+</ul>
+All software running on my server is of course <a href="https://en.wikipedia.org/wiki/Free_Software" target="_blank">free</a>.
+This is the only way for me to expect that it is not actually acting against my interests.
+Besides, all communication (if at all possible) is encrypted. This self-defense is seemingly necessary today to achieve freedom and basic rights (like privacy of telecommunications) in the digital world.<br>
+Speaking of which, my GPG key has the ID 0x1B24F3FF. You can download it <a href="0x1B24F3FF.asc">here</a> or on any <a href="https://sks-keyservers.net/" target="_blank">keyserver of the SKS network</a>.
+</p>
+<p>
+You may wonder why I spend so much time on this. Well, I already mentioned independence of the usual internet giants.
+Besides, it's lots of fun to have a closer look at the tools and service we all use daily, and understand how they function.
+Last not least, I learned a lot while setting up this server.
+If you have questions about this (or anything else on this server), please don't hesitate to <a href="mailto:post-AT-ralfj-DOT-de">mail</a> me!
+</p>
+
+<p>
+Use the menu at the left to browse this site for information about me and my projects. Maybe some of them are also of interest to you?
+<br>
+If you are looking for some distraction, why not have a look at the video I created together with a fellow student for the computer graphics course:
+<a href="cs/cg">Breaking All the Way Out</a>.
+</p>
diff --git a/projects/.gitignore b/projects/.gitignore
new file mode 100644 (file)
index 0000000..c8b8b75
--- /dev/null
@@ -0,0 +1 @@
+*/index.md
diff --git a/style.css b/style.css
new file mode 100644 (file)
index 0000000..be1c63c
--- /dev/null
+++ b/style.css
@@ -0,0 +1,218 @@
+@charset "utf-8";
+
+/* General Fonts */
+html, body, div, p {
+    font-family: DejaVu Sans, Verdana, Arial, sans-serif;
+    font-size: 12pt;
+}
+/* Header Size & Spacing */
+h1 {
+    margin-top: 0.1em;
+    font-size: 200%;
+    margin-bottom: 0.4em;
+}
+h2 {
+    margin-top: 0.5em;
+    font-size: 150%;
+    margin-bottom: 0.2em;
+}
+h3 {
+    margin-top: 0.5em;
+    font-size: 135%;
+    margin-bottom: 0.1em;
+}
+h4 {
+    margin-top: 0.5em;
+    font-size: 120%;
+    margin-bottom: 0.0em;
+}
+
+/* Layout and Color stuff */
+/* General page structure */
+body {
+    padding: 0.8em;
+    margin: 0;
+    color:#DDD;
+    background-color:#505050;
+}
+#frame {
+    margin: 0 auto;
+    max-width: calc(50em + 2*11em); /* content width plus 2*navi width */
+}
+#page {
+    border: solid #121212 1px;
+    background-color: #252525;
+    margin: 0 11.0em; /* navi width */
+    border-radius: 10px;
+    padding: 0;
+}
+#page h1 {
+    border-bottom: solid #08f 2px;
+    text-align: center;
+    padding: 0 0.7em;
+}
+#content {
+    display: block;
+    margin: 0.7em;
+}
+/* Navigation menu */
+#navi {
+    /* No border, no padding, so all the width computations become easy. */
+    float: left;
+    background-color:#505050;
+    width: 11.0em; /* navi width */
+    padding: 0;
+    margin: 0;
+    margin-top:2.7em;
+}
+#navi ul {
+    margin: 0px;
+    padding: 0px;
+    list-style-type: none;
+}
+#navi ul ul {
+    /* Indentation for nested nodes */
+    margin-left: 1.2em;
+}
+#navi li {
+    /* Border around the links */
+    margin-top:0.1em;
+    background-color: #252525;
+    border-left: solid #36ff00 2px;
+    border-right: solid #36ff00 2px;
+    border-top-left-radius: 10px;
+    border-bottom-left-radius: 10px;
+}
+#navi li a {
+    display: block;
+    width: 100%;
+    
+    color: #9ed2ff;
+    font-size:110%;
+    text-decoration: none;
+    text-align: center;
+}
+#navi li.current
+{
+    border-color: #ffa700;
+}
+#navi li:hover {
+    border-color: #08f;
+    border-radius: 0;
+}
+#navi li:hover a {
+    color: #DDD;
+}
+/* Small screens */
+@media screen and (max-width:60em) {
+    #frame, #page, #navi {
+        margin: 0;
+        width: auto;
+        max-width: none;
+        clear: both;
+    }
+    #page {
+        /* the navi will be added above this */
+        border-top-left-radius: 0;
+        border-top-right-radius: 0;
+    }
+    #navi {
+        /* Place navi above the title */
+        float: none;
+        border-top-left-radius: 10px;
+        border-top-right-radius: 10px;
+        border-bottom: solid #36ff00 2px;
+        background-color: #252525;
+        padding: 0.7em;
+    }
+    #navi ul, #navi ul ul, #navi li, #navi li a {
+        margin: 0;
+        padding: 0;
+        display: inline;
+    }
+    /* Display only parent and children, and deocare them appropriately */
+    #navi li {
+        display:inline-block;
+        margin: 0 0.2em;
+    }
+    #navi li.sibling {
+        display:none;
+    }
+    #navi li.parent:before, #navi li.current:before {
+        content: "» ";
+    }
+    #navi li.child:before {
+        content: "» ";
+    }
+    #navi li.child + li:before {
+        content: "| ";
+    }
+    #navi li {
+        border: none;
+    }
+    #navi li.current a {
+        text-decoration: underline;
+    }
+}
+/* Printing */
+@media print {
+    #frame, #page {
+        margin: 0;
+        width: auto;
+        max-width: none;
+        border: none;
+    }
+    #page h1 {
+        border: none;
+    }
+    #navi {
+        display: none;
+    }
+}
+
+/* RST styling */
+article.rst dt {
+    font-weight: bold;
+}
+article.rst dd {
+    margin-bottom: 1em;
+}
+article.rst a.rst-footnote {
+    vertical-align: super;
+}
+article.rst div.rst-footnote {
+    display: table;
+}
+article.rst div.rst-footnote > * {
+    display: table-cell;
+}
+article.rst div.rst-footnote a {
+    min-width: 3em;
+}
+article.rst .rst-literal, article.rst pre {
+    font-family: monospace;
+    font-size: 82%;
+}
+article.rst .rst-literal {
+    padding: 0.1em 0.2em;
+    background-color: #505050;
+}
+article.rst pre {
+    padding: 0.6em;
+    background-color: #505050;
+}
+
+/* Content styling */
+#content p {
+    margin: 0.5em 0;
+    line-height: 1.3;
+}
+#content a {
+    color:#9ed2ff;
+}
+#content a:visited {
+    color:#bfe1ff;
+}
+#content a:hover {
+    color:#5089ba;
+}