Prepare site for static serving with relative URLs

This commit is contained in:
Jesper Hess 2016-11-08 22:46:22 +01:00
parent 65642ec086
commit 870e07ee8f
Signed by: graffen
GPG Key ID: 351A89E40D763F0F
5 changed files with 41 additions and 29 deletions

7
_includes/base.html Normal file
View File

@ -0,0 +1,7 @@
<!-- _includes/base.html -->
{% assign base = '' %}
{% assign depth = page.url | split: '/' | size | minus: 1 %}
{% if depth <= 1 %}{% assign base = '.' %}
{% elsif depth == 2 %}{% assign base = '..' %}
{% elsif depth == 3 %}{% assign base = '../..' %}
{% elsif depth == 4 %}{% assign base = '../../..' %}{% endif %}

View File

@ -1,3 +1,4 @@
{% include base.html %}
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -6,7 +7,7 @@
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
<link rel="stylesheet" href="{{base}}/css/main.css">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: base}}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{base}}feed.xml" />
</head>

View File

@ -1,6 +1,6 @@
<header class="site-header">
<div class="wrapper">
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
<a class="site-title" href="{{ base }}/">{{ site.title }}</a>
</div>
<div class="wrapper"><small>This site is also available as a Tor hidden service here: http://graffenteqk3od63.onion</small></div>
</header>

View File

@ -20,9 +20,9 @@ Since I cannot guarantee that the OTR fingerprints listed below are always 100%
my current fingerprint, or by verifying it through some other trusted means.
* Email: [jesper@graffen.dk][email]
[GnuPG](graffen.asc) Fingerprint: `03CD 582F 13C0 682C 8F52 9C05 8417 0D85 CAEB D4B2`
[GnuPG][graffen.asc] Fingerprint: `03CD 582F 13C0 682C 8F52 9C05 8417 0D85 CAEB D4B2`
If you have keybase, I prefer keybase-encrypted (and signed) messages rather than GnuPG.
* OTR (Jabber/XMPP): [graffen@xmpp.dk](xmpp:graffen@xmpp.dk)
* OTR (Jabber/XMPP): [graffen@xmpp.dk][graffen@xmpp.dk]
* graffen@xmpp.dk/Home
Fingerprint: `F513D9C5 36393609 51C801B5 C5F584C7 DC60B7D7`
* graffen@xmpp.dk/Qubes
@ -49,13 +49,13 @@ For managing my SSH keys, I use a [Bitcoin Trezor][bitcointrezor]
# Crypto
### GnuPG
Read my latest GnuPG key [Transition Notice](/transition-notice.html)
Read my latest GnuPG key [Transition Notice][transitionnotice]
### Key signing policy
I will sign your PGP key if you ask me to, and I have somehow verified that the identity of the key matches your
identity. I will probably also ask you to sign my key.
[GPG Key Signing Policy](/keysigning/policy/) [[Signed version]](/keysigning/policy/index.md.asc)
[GPG Key Signing Policy][keysigningpolicy] [[Signed version]](keysigning/policy/index.md.asc)
### Deprecated Crypto Keys
The following keys have been deprecated for one reason or another. Please don't use these to communicate with me. I haven't been too good at taking backups of my Jabber OTR keys so I've gone through a few of them.
@ -71,10 +71,12 @@ The following keys have been deprecated for one reason or another. Please don't
[blog]:https://blog.graffen.dk
[keybase]:https://keybase.io/graffen/
[graffen.asc]:graffen.asc
[xmpp.dk]:https://xmpp.dk
[graffen@xmpp.dk]:xmpp://graffen@xmpp.dk
[email]:mailto:jesper@graffen.dk
[sshkey]:graffen-ssh-key.txt
[sshkey_signed]:graffen-ssh-key.txt.asc
[bitcointrezor]:https://bitcointrezor.com
[transitionnotice]:transition-notice.html
[keysigningpolicy]:keysigning/policy/

View File

@ -23,9 +23,9 @@ Since I cannot guarantee that the OTR fingerprints listed below are always 100%
my current fingerprint, or by verifying it through some other trusted means.
* Email: [jesper@graffen.dk][email]
[GnuPG](graffen.asc) Fingerprint: `03CD 582F 13C0 682C 8F52 9C05 8417 0D85 CAEB D4B2`
[GnuPG][graffen.asc] Fingerprint: `03CD 582F 13C0 682C 8F52 9C05 8417 0D85 CAEB D4B2`
If you have keybase, I prefer keybase-encrypted (and signed) messages rather than GnuPG.
* OTR (Jabber/XMPP): [graffen@xmpp.dk](xmpp:graffen@xmpp.dk)
* OTR (Jabber/XMPP): [graffen@xmpp.dk][graffen@xmpp.dk]
* graffen@xmpp.dk/Home
Fingerprint: `F513D9C5 36393609 51C801B5 C5F584C7 DC60B7D7`
* graffen@xmpp.dk/Qubes
@ -52,13 +52,13 @@ For managing my SSH keys, I use a [Bitcoin Trezor][bitcointrezor]
# Crypto
### GnuPG
Read my latest GnuPG key [Transition Notice](/transition-notice.html)
Read my latest GnuPG key [Transition Notice][transitionnotice]
### Key signing policy
I will sign your PGP key if you ask me to, and I have somehow verified that the identity of the key matches your
identity. I will probably also ask you to sign my key.
[GPG Key Signing Policy](/keysigning/policy/) [[Signed version]](/keysigning/policy/index.md.asc)
[GPG Key Signing Policy][keysigningpolicy] [[Signed version]](keysigning/policy/index.md.asc)
### Deprecated Crypto Keys
The following keys have been deprecated for one reason or another. Please don't use these to communicate with me. I haven't been too good at taking backups of my Jabber OTR keys so I've gone through a few of them.
@ -74,26 +74,28 @@ The following keys have been deprecated for one reason or another. Please don't
[blog]:https://blog.graffen.dk
[keybase]:https://keybase.io/graffen/
[graffen.asc]:graffen.asc
[xmpp.dk]:https://xmpp.dk
[graffen@xmpp.dk]:xmpp://graffen@xmpp.dk
[email]:mailto:jesper@graffen.dk
[sshkey]:graffen-ssh-key.txt
[sshkey_signed]:graffen-ssh-key.txt.asc
[bitcointrezor]:https://bitcointrezor.com
[transitionnotice]:transition-notice.html
[keysigningpolicy]:keysigning/policy/
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCgAGBQJYC4RVAAoJEDUaieQNdj8PdGgP/RQW7yrX4RSPC4KNnzlvegv/
G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