~allie/website-2020 unlisted

8ade0666f09c6d80afe934ce7fe4d72ecd98c0dc — Alfie Pates 5 months ago
Initial Commit
A  => Makefile +75 -0
@@ 1,75 @@
PY?=python3
PELICAN?=pelican
PELICANOPTS=

BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py


DEBUG ?= 0
ifeq ($(DEBUG), 1)
	PELICANOPTS += -D
endif

RELATIVE ?= 0
ifeq ($(RELATIVE), 1)
	PELICANOPTS += --relative-urls
endif

help:
	@echo 'Makefile for a pelican Web site                                           '
	@echo '                                                                          '
	@echo 'Usage:                                                                    '
	@echo '   make html                           (re)generate the web site          '
	@echo '   make clean                          remove the generated files         '
	@echo '   make regenerate                     regenerate files upon modification '
	@echo '   make publish                        generate using production settings '
	@echo '   make serve [PORT=8000]              serve site at http://localhost:8000'
	@echo '   make serve-global [SERVER=0.0.0.0]  serve (as root) to $(SERVER):80    '
	@echo '   make devserver [PORT=8000]          serve and regenerate together      '
	@echo '   make ssh_upload                     upload the web site via SSH        '
	@echo '   make rsync_upload                   upload the web site via rsync+ssh  '
	@echo '                                                                          '
	@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html   '
	@echo 'Set the RELATIVE variable to 1 to enable relative urls                    '
	@echo '                                                                          '

html:
	$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

clean:
	[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)

regenerate:
	$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)

serve:
ifdef PORT
	$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
else
	$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
endif

serve-global:
ifdef SERVER
	$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b $(SERVER)
else
	$(PELICAN) -l $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT) -b 0.0.0.0
endif


devserver:
ifdef PORT
	$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) -p $(PORT)
else
	$(PELICAN) -lr $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
endif

publish:
	$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)


.PHONY: html help clean regenerate serve serve-global devserver publish 
\ No newline at end of file

A  => Pipfile +12 -0
@@ 1,12 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
pelican = {extras = ["markdown"],version = "*"}

[requires]
python_version = "3.7"

A  => Pipfile.lock +134 -0
@@ 1,134 @@
{
    "_meta": {
        "hash": {
            "sha256": "1ba2eb97ba9f734c12c1a93008fe8dc0d11ceeef504cd7cb64a4d3338246898a"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.7"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "blinker": {
            "hashes": [
                "sha256:471aee25f3992bd325afa3772f1063dbdbbca947a041b8b89466dc00d606f8b6"
            ],
            "version": "==1.4"
        },
        "docutils": {
            "hashes": [
                "sha256:6c4f696463b79f1fb8ba0c594b63840ebd41f059e92b31957c46b74a4599b6d0",
                "sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827",
                "sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99"
            ],
            "version": "==0.15.2"
        },
        "feedgenerator": {
            "hashes": [
                "sha256:5ae05daa9cfa47fa406ee4744d0b7fa1c8a05a7a47ee0ad328ddf55327cfb106"
            ],
            "version": "==1.9"
        },
        "jinja2": {
            "hashes": [
                "sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f",
                "sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de"
            ],
            "version": "==2.10.3"
        },
        "markdown": {
            "hashes": [
                "sha256:2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a",
                "sha256:56a46ac655704b91e5b7e6326ce43d5ef72411376588afa1dd90e881b83c7e8c"
            ],
            "version": "==3.1.1"
        },
        "markupsafe": {
            "hashes": [
                "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473",
                "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161",
                "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235",
                "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5",
                "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff",
                "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b",
                "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1",
                "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e",
                "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183",
                "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66",
                "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1",
                "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1",
                "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e",
                "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b",
                "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905",
                "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735",
                "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d",
                "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e",
                "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d",
                "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c",
                "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21",
                "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2",
                "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5",
                "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b",
                "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6",
                "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f",
                "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f",
                "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"
            ],
            "version": "==1.1.1"
        },
        "pelican": {
            "extras": [
                "markdown"
            ],
            "hashes": [
                "sha256:656d8ff9f778951f4e317c9e6530e92b02698c5961ebf019c583775a30f857f6",
                "sha256:be7ea9a09311374322b5579c88975ae003409e40c833e761780a0d0dbd84e756"
            ],
            "index": "pypi",
            "version": "==4.2.0"
        },
        "pygments": {
            "hashes": [
                "sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b",
                "sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"
            ],
            "version": "==2.5.2"
        },
        "python-dateutil": {
            "hashes": [
                "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
                "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
            ],
            "version": "==2.8.1"
        },
        "pytz": {
            "hashes": [
                "sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d",
                "sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be"
            ],
            "version": "==2019.3"
        },
        "six": {
            "hashes": [
                "sha256:1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd",
                "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"
            ],
            "version": "==1.13.0"
        },
        "unidecode": {
            "hashes": [
                "sha256:1d7a042116536098d05d599ef2b8616759f02985c85b4fef50c78a5aaf10822a",
                "sha256:2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8"
            ],
            "version": "==1.1.1"
        }
    },
    "develop": {}
}

A  => content/blog/2019-12-17-initial-commit.md +45 -0
@@ 1,45 @@
Title: Initial Commit
Summary: I built a new personal website... again. 

I built a new personal website, again.

I know. This is perhaps the fifth website to live at this domain? 

This won't be the last, either. 

What
----

The (rather wonderful) [Pelican][pelican], with a theme I wrote myself. You can find the code [here][code], if you're interested, but it's nothing particularly special. 

I'm using [PureCSS][purecss] to make the process of styling the thing less awful - I'm not a front-end dev, I just [play one on the internet][playone].

It's work in progress, and I will iterate on it as time goes on.

Why
---

In a nutshell: I'm building a new website because I lost the motivation to maintain my old one. 

I was previously using [Jekyll][jekyll] which was... fine, but the process of theming a Jekyll site is a bit obtuse, as is everything else about Jekyll. Again, I'm not a front-end dev, so I just grabbed a theme that seemed to fit my requirements, and left it there. That was fine, but it also didn't feel massively like it was "mine". 

The biggest reason I've spun up this new thing, however, is that my previous site was just... hard to maintian from mobile. This was mostly due to a raft of terrible engineering decisions I made whilst deciding how to deploy it. I'm not sure this site may end up better, but I bought an iOS app called [Working Copy][workingcopy] recently, which has made the whole "`git` on the move" thing much more palatable. When I'm happy with how this is working, I'll post a writeup and link it here. 

As an aside: I flirted with a blogging platform called [writefreely][writefreely] for a while, too. It's pretty cool, you should check it out if you're looking for something a lot more low-effort than maintaining a static site. I like it a lot. I'm considering porting my blogposts over from it, if I can make them fit in here well. 

So, yeah. New blog. Let's see how this goes. 

~a

----

_The soundtrack to this blogpost is [this album][tunes] I found on Soundcloud. It's weird and ambient yet also dancey, in a deliciously home-made lo-fi way. I found myself tapping my foot to it a lot._

[pelican]: https://getpelican.com
[jekyll]: https://jekyllrb.com
[writefreely]: https://writefreely.org
[workingcopy]: https://workingcopyapp.com
[code]: about:blank
[purecss]: https://purecss.io
[playone]: https://www.youtube.com/watch?v=ts0XG6qDIco 
[tunes]: https://soundcloud.com/777gogogo-complete/cosmic-spring

A  => output/archives.html +30 -0
@@ 1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
        <title>The personal website of Alfie Pates - Archives</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
<h1>Archives for The personal website of Alfie Pates</h1>

<dl>
    <dt>Tue 17 December 2019</dt>
    <dd><a href="/blog/initial-commit/">Initial Commit</a></dd>
</dl>
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/author/alfie-pates.html +40 -0
@@ 1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
        <title>The personal website of Alfie Pates - Articles by Alfie Pates</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
<section id="content">
<h2>Articles by Alfie Pates</h2>

<ol id="post-list">
        <li><article class="hentry">
                <header> <h2 class="entry-title"><a href="/blog/initial-commit/" rel="bookmark" title="Permalink to Initial Commit">Initial Commit</a></h2> </header>
                <footer class="post-info">
                    <time class="published" datetime="2019-12-17T00:00:00+00:00"> Tue 17 December 2019 </time>
                    <address class="vcard author">By
                        <a class="url fn" href="/author/alfie-pates.html">Alfie Pates</a>
                    </address>
                </footer><!-- /.post-info -->
                <div class="entry-content"> <p>I built a new personal website... again.</p> </div><!-- /.entry-content -->
        </article></li>
</ol><!-- /#posts-list -->
</section><!-- /#content -->
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/authors.html +28 -0
@@ 1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
        <title>The personal website of Alfie Pates - Authors</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
    <h1>Authors on The personal website of Alfie Pates</h1>
    <ul>
        <li><a href="/author/alfie-pates.html">Alfie Pates</a> (1)</li>
    </ul>
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/blog/index.html +40 -0
@@ 1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
        <title>The personal website of Alfie Pates - blog category</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
<section id="content">
<h2>Articles in the blog category</h2>

<ol id="post-list">
        <li><article class="hentry">
                <header> <h2 class="entry-title"><a href="/blog/initial-commit/" rel="bookmark" title="Permalink to Initial Commit">Initial Commit</a></h2> </header>
                <footer class="post-info">
                    <time class="published" datetime="2019-12-17T00:00:00+00:00"> Tue 17 December 2019 </time>
                    <address class="vcard author">By
                        <a class="url fn" href="/author/alfie-pates.html">Alfie Pates</a>
                    </address>
                </footer><!-- /.post-info -->
                <div class="entry-content"> <p>I built a new personal website... again.</p> </div><!-- /.entry-content -->
        </article></li>
</ol><!-- /#posts-list -->
</section><!-- /#content -->
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/blog/initial-commit/index.html +66 -0
@@ 1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
          <title>The personal website of Alfie Pates - Initial Commit</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->





</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
<section id="content" class="body">
  <header>
    <h2 class="entry-title">
      <a href="/blog/initial-commit/" rel="bookmark"
         title="Permalink to Initial Commit">Initial Commit</a></h2>
 
  </header>
  <footer class="post-info">
    <time class="published" datetime="2019-12-17T00:00:00+00:00">
      Tue 17 December 2019
    </time>
    <address class="vcard author">
      By           <a class="url fn" href="/author/alfie-pates.html">Alfie Pates</a>
    </address>
    <div class="category">
        Category: <a href="/blog/">blog</a>
    </div>
  </footer><!-- /.post-info -->
  <div class="entry-content">
    <p>I built a new personal website, again.</p>
<p>I know. This is perhaps the fifth website to live at this domain? </p>
<p>This won't be the last, either. </p>
<h2>What</h2>
<p>The (rather wonderful) <a href="https://getpelican.com">Pelican</a>, with a theme I wrote myself. You can find the code <a href="about:blank">here</a>, if you're interested, but it's nothing particularly special. </p>
<p>I'm using <a href="https://purecss.io">PureCSS</a> to make the process of styling the thing less awful - I'm not a front-end dev, I just <a href="https://www.youtube.com/watch?v=ts0XG6qDIco">play one on the internet</a>.</p>
<p>It's work in progress, and I will iterate on it as time goes on.</p>
<h2>Why</h2>
<p>In a nutshell: I'm building a new website because I lost the motivation to maintain my old one. </p>
<p>I was previously using <a href="https://jekyllrb.com">Jekyll</a> which was... fine, but the process of theming a Jekyll site is a bit obtuse, as is everything else about Jekyll. Again, I'm not a front-end dev, so I just grabbed a theme that seemed to fit my requirements, and left it there. That was fine, but it also didn't feel massively like it was "mine". </p>
<p>The biggest reason I've spun up this new thing, however, is that my previous site was just... hard to maintian from mobile. This was mostly due to a raft of terrible engineering decisions I made whilst deciding how to deploy it. I'm not sure this site may end up better, but I bought an iOS app called <a href="https://workingcopyapp.com">Working Copy</a> recently, which has made the whole "<code>git</code> on the move" thing much more palatable. When I'm happy with how this is working, I'll post a writeup and link it here. </p>
<p>As an aside: I flirted with a blogging platform called <a href="https://writefreely.org">writefreely</a> for a while, too. It's pretty cool, you should check it out if you're looking for something a lot more low-effort than maintaining a static site. I like it a lot. I'm considering porting my blogposts over from it, if I can make them fit in here well. </p>
<p>So, yeah. New blog. Let's see how this goes. </p>
<p>~a</p>
<hr>
<p><em>The soundtrack to this blogpost is <a href="https://soundcloud.com/777gogogo-complete/cosmic-spring">this album</a> I found on Soundcloud. It's weird and ambient yet also dancey, in a deliciously home-made lo-fi way. I found myself tapping my foot to it a lot.</em></p>
  </div><!-- /.entry-content -->
</section>
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/categories.html +28 -0
@@ 1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
        <title>The personal website of Alfie Pates - Categories</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
    <h1>Categories on The personal website of Alfie Pates</h1>
    <ul>
        <li><a href="/blog/">blog</a> (1)</li>
    </ul>
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/index.html +40 -0
@@ 1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
        <title>The personal website of Alfie Pates</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
<section id="content">
<h2>All articles</h2>

<ol id="post-list">
        <li><article class="hentry">
                <header> <h2 class="entry-title"><a href="/blog/initial-commit/" rel="bookmark" title="Permalink to Initial Commit">Initial Commit</a></h2> </header>
                <footer class="post-info">
                    <time class="published" datetime="2019-12-17T00:00:00+00:00"> Tue 17 December 2019 </time>
                    <address class="vcard author">By
                        <a class="url fn" href="/author/alfie-pates.html">Alfie Pates</a>
                    </address>
                </footer><!-- /.post-info -->
                <div class="entry-content"> <p>I built a new personal website... again.</p> </div><!-- /.entry-content -->
        </article></li>
</ol><!-- /#posts-list -->
</section><!-- /#content -->
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/tags.html +27 -0
@@ 1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
        <title>The personal website of Alfie Pates - Tags</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="/">The personal website of Alfie Pates <strong></strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        </ul></nav><!-- /#menu -->
    <h1>Tags for The personal website of Alfie Pates</h1>
    <ul>
    </ul>
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>
\ No newline at end of file

A  => output/theme/style.css +14 -0
@@ 1,14 @@
#banner {
	margin: 0 auto;
	padding: 0 2em;
	margin-bottom: 50px;
	line-height 1.6em; 
}

#content {
	margin: 0 auto;
	padding: 0 2em;
	max-width: 768px;
	margin-bottom: 50px;
	line-height: 1.6em;
}

A  => pelicanconf.py +49 -0
@@ 1,49 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals

AUTHOR = 'Alfie Pates'
SITENAME = 'The personal website of Alfie Pates'
SITEURL = ''
THEME = 'theme'

PATH = 'content'

DISPLAY_CATEGORIES_ON_MENU = False
SUMMARY_MAX_LENGTH = 15

# Generate Pages
PAGE_URL = '{slug}/'
PAGE_SAVE_AS = '{slug}/index.html'

# Generate Article and Category pages
ARTICLE_URL = '{category}/{slug}/'
ARTICLE_SAVE_AS = '{category}/{slug}/index.html'
CATEGORY_URL = '{slug}/'
CATEGORY_SAVE_AS = "{slug}/index.html"

TIMEZONE = 'Europe/London'

DEFAULT_LANG = 'en'

# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None

# Blogroll
#LINKS = (('Pelican', 'http://getpelican.com/'),
#         ('Python.org', 'http://python.org/'),
#         ('Jinja2', 'http://jinja.pocoo.org/'),
#         ('You can modify those links in your config file', '#'),)

# Social widget
#SOCIAL = (('You can add links in your config file', '#'),
#          ('Another social link', '#'),)

DEFAULT_PAGINATION = False

# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True

A  => publishconf.py +25 -0
@@ 1,25 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals

# This file is only used if you use `make publish` or
# explicitly specify it as your config file.

import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *

# If your site is available via HTTPS, make sure SITEURL begins with https://
SITEURL = 'https://www.alfiepates.me'
RELATIVE_URLS = False

FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/{slug}.atom.xml'

DELETE_OUTPUT_DIRECTORY = True

# Following items are often useful when publishing

#DISQUS_SITENAME = ""
#GOOGLE_ANALYTICS = ""
\ No newline at end of file

A  => tasks.py +110 -0
@@ 1,110 @@
# -*- coding: utf-8 -*-

import os
import shutil
import sys
import datetime

from invoke import task
from invoke.util import cd
from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer
from pelican.settings import DEFAULT_CONFIG, get_settings_from_file

SETTINGS_FILE_BASE = 'pelicanconf.py'
SETTINGS = {}
SETTINGS.update(DEFAULT_CONFIG)
LOCAL_SETTINGS = get_settings_from_file(SETTINGS_FILE_BASE)
SETTINGS.update(LOCAL_SETTINGS)

CONFIG = {
    'settings_base': SETTINGS_FILE_BASE,
    'settings_publish': 'publishconf.py',
    # Output path. Can be absolute or relative to tasks.py. Default: 'output'
    'deploy_path': SETTINGS['OUTPUT_PATH'],
    # Port for `serve`
    'port': 8000,
}

@task
def clean(c):
    """Remove generated files"""
    if os.path.isdir(CONFIG['deploy_path']):
        shutil.rmtree(CONFIG['deploy_path'])
        os.makedirs(CONFIG['deploy_path'])

@task
def build(c):
    """Build local version of site"""
    c.run('pelican -s {settings_base}'.format(**CONFIG))

@task
def rebuild(c):
    """`build` with the delete switch"""
    c.run('pelican -d -s {settings_base}'.format(**CONFIG))

@task
def regenerate(c):
    """Automatically regenerate site upon file modification"""
    c.run('pelican -r -s {settings_base}'.format(**CONFIG))

@task
def serve(c):
    """Serve site at http://localhost:$PORT/ (default port is 8000)"""

    class AddressReuseTCPServer(RootedHTTPServer):
        allow_reuse_address = True

    server = AddressReuseTCPServer(
        CONFIG['deploy_path'],
        ('', CONFIG['port']),
        ComplexHTTPRequestHandler)

    sys.stderr.write('Serving on port {port} ...\n'.format(**CONFIG))
    server.serve_forever()

@task
def reserve(c):
    """`build`, then `serve`"""
    build(c)
    serve(c)

@task
def preview(c):
    """Build production version of site"""
    c.run('pelican -s {settings_publish}'.format(**CONFIG))

@task
def livereload(c):
    """Automatically reload browser tab upon file modification."""
    from livereload import Server
    build(c)
    server = Server()
    # Watch the base settings file
    server.watch(CONFIG['settings_base'], lambda: build(c))
    # Watch content source files
    content_file_extensions = ['.md', '.rst']
    for extension in content_file_extensions:
        content_blob = '{0}/**/*{1}'.format(SETTINGS['PATH'], extension)
        server.watch(content_blob, lambda: build(c))
    # Watch the theme's templates and static assets
    theme_path = SETTINGS['THEME']
    server.watch('{}/templates/*.html'.format(theme_path), lambda: build(c))
    static_file_extensions = ['.css', '.js']
    for extension in static_file_extensions:
        static_file = '{0}/static/**/*{1}'.format(theme_path, extension)
        server.watch(static_file, lambda: build(c))
    # Serve output path on configured port
    server.serve(port=CONFIG['port'], root=CONFIG['deploy_path'])


@task
def publish(c):
    """Publish to production via rsync"""
    c.run('pelican -s {settings_publish}'.format(**CONFIG))
    c.run(
        'rsync --delete --exclude ".DS_Store" -pthrvz -c '
        '-e "ssh -p {ssh_port}" '
        '{} {ssh_user}@{ssh_host}:{ssh_path}'.format(
            CONFIG['deploy_path'].rstrip('/') + '/',
            **CONFIG))


A  => theme/static/style.css +14 -0
@@ 1,14 @@
#banner {
	margin: 0 auto;
	padding: 0 2em;
	margin-bottom: 50px;
	line-height 1.6em; 
}

#content {
	margin: 0 auto;
	padding: 0 2em;
	max-width: 768px;
	margin-bottom: 50px;
	line-height: 1.6em;
}

A  => theme/templates/archives.html +14 -0
@@ 1,14 @@
{% extends "base.html" %}

{% block title %}{{ SITENAME }} - Archives{% endblock %}

{% block content %}
<h1>Archives for {{ SITENAME }}</h1>

<dl>
{% for article in dates %}
    <dt>{{ article.locale_date }}</dt>
    <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
{% endblock %}

A  => theme/templates/article.html +67 -0
@@ 1,67 @@
{% extends "base.html" %}
{% block html_lang %}{{ article.lang }}{% endblock %}

{% block title %}{{ SITENAME }} - {{ article.title }}{% endblock %}

{% block head %}
  {{ super() }}

  {% import 'translations.html' as translations with context %}
  {% if translations.entry_hreflang(article) %}
    {{ translations.entry_hreflang(article) }}
  {% endif %}

  {% if article.description %}
    <meta name="description" content="{{article.description}}" />
  {% endif %}

  {% for tag in article.tags %}
    <meta name="tags" content="{{tag}}" />
  {% endfor %}

{% endblock %}

{% block content %}
<section id="content" class="body">
  <header>
    <h2 class="entry-title">
      <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
         title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
 {% import 'translations.html' as translations with context %}
 {{ translations.translations_for(article) }}
  </header>
  <footer class="post-info">
    <time class="published" datetime="{{ article.date.isoformat() }}">
      {{ article.locale_date }}
    </time>
    {% if article.modified %}
    <time class="modified" datetime="{{ article.modified.isoformat() }}">
      {{ article.locale_modified }}
    </time>
    {% endif %}
    {% if article.authors %}
    <address class="vcard author">
      By {% for author in article.authors %}
          <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
        {% endfor %}
    </address>
    {% endif %}
    {% if article.category %}
    <div class="category">
        Category: <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
    </div>
    {% endif %}
    {% if article.tags %}
    <div class="tags">
        Tags:
        {% for tag in article.tags %}
            <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
        {% endfor %}
    </div>
    {% endif %}
  </footer><!-- /.post-info -->
  <div class="entry-content">
    {{ article.content }}
  </div><!-- /.entry-content -->
</section>
{% endblock %}

A  => theme/templates/author.html +8 -0
@@ 1,8 @@
{% extends "index.html" %}

{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %}

{% block content_title %}
<h2>Articles by {{ author }}</h2>
{% endblock %}


A  => theme/templates/authors.html +12 -0
@@ 1,12 @@
{% extends "base.html" %}

{% block title %}{{ SITENAME }} - Authors{% endblock %}

{% block content %}
    <h1>Authors on {{ SITENAME }}</h1>
    <ul>
    {% for author, articles in authors|sort %}
        <li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
    {% endfor %}
    </ul>
{% endblock %}

A  => theme/templates/base.html +65 -0
@@ 1,65 @@
<!DOCTYPE html>
<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock html_lang %}">
<head>
        {% block head %}
        <title>{% block title %}{{ SITENAME }}{% endblock title %}</title>
        <meta charset="utf-8" />

	<!-- Style-related stuff. -->
	<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
	<link rel="stylesheet" href="{{ SITEURL }}/theme/style.css">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<!-- PELICAN GUFF TO DO WITH SYNDICATION ETC. Looks important... -->
	{% if FEED_ALL_ATOM %}
        <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_ATOM_URL %}{{ FEED_ALL_ATOM_URL }}{% else %}{{ FEED_ALL_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
        {% endif %}
        {% if FEED_ALL_RSS %}
        <link href="{{ FEED_DOMAIN }}/{% if FEED_ALL_RSS_URL %}{{ FEED_ALL_RSS_URL }}{% else %}{{ FEED_ALL_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
        {% endif %}
        {% if FEED_ATOM %}
        <link href="{{ FEED_DOMAIN }}/{%if FEED_ATOM_URL %}{{ FEED_ATOM_URL }}{% else %}{{ FEED_ATOM }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
        {% endif %}
        {% if FEED_RSS %}
        <link href="{{ FEED_DOMAIN }}/{% if FEED_RSS_URL %}{{ FEED_RSS_URL }}{% else %}{{ FEED_RSS }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
        {% endif %}
        {% if CATEGORY_FEED_ATOM and category %}
        <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_ATOM_URL %}{{ CATEGORY_FEED_ATOM_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_ATOM.format(slug=category.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
        {% endif %}
        {% if CATEGORY_FEED_RSS and category %}
        <link href="{{ FEED_DOMAIN }}/{% if CATEGORY_FEED_RSS_URL %}{{ CATEGORY_FEED_RSS_URL.format(slug=category.slug) }}{% else %}{{ CATEGORY_FEED_RSS.format(slug=category.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
        {% endif %}
        {% if TAG_FEED_ATOM and tag %}
        <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_ATOM_URL %}{{ TAG_FEED_ATOM_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_ATOM.format(slug=tag.slug) }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
        {% endif %}
        {% if TAG_FEED_RSS and tag %}
        <link href="{{ FEED_DOMAIN }}/{% if TAG_FEED_RSS_URL %}{{ TAG_FEED_RSS_URL.format(slug=tag.slug) }}{% else %}{{ TAG_FEED_RSS.format(slug=tag.slug) }}{% endif %}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
        {% endif %}
        {% endblock head %}
</head>

<body id="index" class="home">
        <header id="banner" class="body">
                <h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
        </header><!-- /#banner -->
        <nav id="menu"><ul>
        {% for title, link in MENUITEMS %}
            <li><a href="{{ link }}">{{ title }}</a></li>
        {% endfor %}
        {% if DISPLAY_PAGES_ON_MENU %}
          {% for p in pages %}
            <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
          {% endfor %}
        {% endif %}
        {% if DISPLAY_CATEGORIES_ON_MENU %}
          {% for cat, null in categories %}
            <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a></li>
          {% endfor %}
        {% endif %}
        </ul></nav><!-- /#menu -->
        {% block content %}
        {% endblock %}
        <footer id="contentinfo" class="body">
        </footer><!-- /#contentinfo -->
</body>
</html>

A  => theme/templates/categories.html +12 -0
@@ 1,12 @@
{% extends "base.html" %}

{% block title %}{{ SITENAME }} - Categories{% endblock %}

{% block content %}
    <h1>Categories on {{ SITENAME }}</h1>
    <ul>
    {% for category, articles in categories|sort %}
        <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
    {% endfor %}
    </ul>
{% endblock %}

A  => theme/templates/category.html +8 -0
@@ 1,8 @@
{% extends "index.html" %}

{% block title %}{{ SITENAME }} - {{ category }} category{% endblock %}

{% block content_title %}
<h2>Articles in the {{ category }} category</h2>
{% endblock %}


A  => theme/templates/gosquared.html +14 -0
@@ 1,14 @@
{% if GOSQUARED_SITENAME %}
<script type="text/javascript">
    var GoSquared={};
    GoSquared.acct = "{{ GOSQUARED_SITENAME }}";
    (function(w){
        function gs(){
            w._gstc_lt=+(new Date); var d=document;
            var g = d.createElement("script"); g.type = "text/javascript"; g.async = true; g.src = "https://d1l6p2sc9645hc.cloudfront.net/tracker.js";
            var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(g, s);
        }
        w.addEventListener?w.addEventListener("load",gs,false):w.attachEvent("onload",gs);
    })(window);
</script>
{% endif %}

A  => theme/templates/index.html +28 -0
@@ 1,28 @@
{% extends "base.html" %}
{% block content %}
<section id="content">
{% block content_title %}
<h2>All articles</h2>
{% endblock %}

<ol id="post-list">
{% for article in articles_page.object_list %}
        <li><article class="hentry">
                <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
                <footer class="post-info">
                    <time class="published" datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }} </time>
                    <address class="vcard author">By
                    {% for author in article.authors %}
                        <a class="url fn" href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
                    {% endfor %}
                    </address>
                </footer><!-- /.post-info -->
                <div class="entry-content"> {{ article.summary }} </div><!-- /.entry-content -->
        </article></li>
{% endfor %}
</ol><!-- /#posts-list -->
{% if articles_page.has_other_pages() %}
    {% include 'pagination.html' %}
{% endif %}
</section><!-- /#content -->
{% endblock content %}

A  => theme/templates/page.html +27 -0
@@ 1,27 @@
{% extends "base.html" %}
{% block html_lang %}{{ page.lang }}{% endblock %}

{% block title %}{{ SITENAME }} - {{ page.title }}{%endblock%}

{% block head %}
  {{ super() }}

  {% import 'translations.html' as translations with context %}
  {% if translations.entry_hreflang(page) %}
    {{ translations.entry_hreflang(page) }}
  {% endif %}
{% endblock %}

{% block content %}
    <h1>{{ page.title }}</h1>
    {% import 'translations.html' as translations with context %}
    {{ translations.translations_for(page) }}

    {{ page.content }}

    {% if page.modified %}
        <p>
        Last updated: {{ page.locale_modified }}
        </p>
    {% endif %}
{% endblock %}

A  => theme/templates/pagination.html +11 -0
@@ 1,11 @@
{% if DEFAULT_PAGINATION %}
<p class="paginator">
    {% if articles_page.has_previous() %}
        <a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
    {% endif %}
    Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}
    {% if articles_page.has_next() %}
        <a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
    {% endif %}
</p>
{% endif %}

A  => theme/templates/period_archives.html +14 -0
@@ 1,14 @@
{% extends "base.html" %}

{% block title %}{{ SITENAME }} - {{ period | reverse | join(' ') }} archives{% endblock %}

{% block content %}
<h1>Archives for {{ period | reverse | join(' ') }}</h1>

<dl>
{% for article in dates %}
    <dt>{{ article.locale_date }}</dt>
    <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
{% endblock %}

A  => theme/templates/tag.html +7 -0
@@ 1,7 @@
{% extends "index.html" %}

{% block title %}{{ SITENAME }} - {{ tag }} tag{% endblock %}

{% block content_title %}
<h2>Articles tagged with {{ tag }}</h2>
{% endblock %}

A  => theme/templates/tags.html +12 -0
@@ 1,12 @@
{% extends "base.html" %}

{% block title %}{{ SITENAME }} - Tags{% endblock %}

{% block content %}
    <h1>Tags for {{ SITENAME }}</h1>
    <ul>
    {% for tag, articles in tags|sort %}
        <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
    {% endfor %}
    </ul>
{% endblock %}

A  => theme/templates/translations.html +16 -0
@@ 1,16 @@
{% macro translations_for(article) %}
{% if article.translations %}
Translations:
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}
{% endmacro %}

{% macro entry_hreflang(entry) %}
{% if entry.translations %}
  {% for translation in entry.translations %}
    <link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
  {% endfor %}
{% endif %}
{% endmacro %}