about summary refs log tree commit diff
path: root/users/fcuny/blog/layouts
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-03-07 16:23:59 -0800
committerFranck Cuny <franck@fcuny.net>2021-03-07 16:23:59 -0800
commit6f3729b383909ca091925defed83d8ce37b9e7d5 (patch)
treed4cc5dc34b6d00857a50de13260205d438d8ca05 /users/fcuny/blog/layouts
downloadworld-6f3729b383909ca091925defed83d8ce37b9e7d5.tar.gz
initial site with hugo
Start my website from scratch once more, using hugo to generate it. For
now the layout is pretty simple:
- an index page that will list future notes
- notes should be created under the "content" directory

The theme is custom and I'll try to keep this simple.
Diffstat (limited to '')
-rw-r--r--users/fcuny/blog/layouts/_default/baseof.html11
-rw-r--r--users/fcuny/blog/layouts/_default/list.html10
-rw-r--r--users/fcuny/blog/layouts/_default/single.html11
-rw-r--r--users/fcuny/blog/layouts/index.atom.xml22
-rw-r--r--users/fcuny/blog/layouts/index.html22
-rw-r--r--users/fcuny/blog/layouts/partials/head.html15
6 files changed, 91 insertions, 0 deletions
diff --git a/users/fcuny/blog/layouts/_default/baseof.html b/users/fcuny/blog/layouts/_default/baseof.html
new file mode 100644
index 0000000..d9ca51a
--- /dev/null
+++ b/users/fcuny/blog/layouts/_default/baseof.html
@@ -0,0 +1,11 @@
+<!doctype html>
+<html lang="en">
+  {{ partial "head.html" . }}
+  <body>
+    <div class="main">
+      <main>
+       {{ block "main" . }}{{ end }}
+      </main>
+    </div>
+  </body>
+</html>
diff --git a/users/fcuny/blog/layouts/_default/list.html b/users/fcuny/blog/layouts/_default/list.html
new file mode 100644
index 0000000..3423cb6
--- /dev/null
+++ b/users/fcuny/blog/layouts/_default/list.html
@@ -0,0 +1,10 @@
+{{ define "main" }}
+
+<h1>{{ .Title }}</h1>
+{{ range .Pages.ByPublishDate.Reverse }}
+<p>
+  <a class="font-125" href="{{ .RelPermalink }}">{{ .Title }}</a>
+</p>
+{{ end }}
+
+{{ end }}
diff --git a/users/fcuny/blog/layouts/_default/single.html b/users/fcuny/blog/layouts/_default/single.html
new file mode 100644
index 0000000..a8c1dc7
--- /dev/null
+++ b/users/fcuny/blog/layouts/_default/single.html
@@ -0,0 +1,11 @@
+{{ define "main" }}
+
+<p><a href="/">&larr; Back to Franck's homepage</a></p>
+
+<h1>{{ .Title }}</h1>
+
+<p><span class="published">{{ .Date.Format "January 2021" }}</span></p>
+
+{{ .Content }}
+
+{{ end }}
diff --git a/users/fcuny/blog/layouts/index.atom.xml b/users/fcuny/blog/layouts/index.atom.xml
new file mode 100644
index 0000000..531e77c
--- /dev/null
+++ b/users/fcuny/blog/layouts/index.atom.xml
@@ -0,0 +1,22 @@
+<feed xmlns="http://www.w3.org/2005/Atom">
+  <title>Franck Cuny Website</title>
+  <link href="{{ .Permalink }}feed.xml" rel="self"/>
+  <link href="{{ .Permalink }}"/>
+  <id>{{ .Permalink }}</id>{{ with .Site.Author.name }}
+  <author>
+    <name>{{.}}</name>{{ with $.Site.Author.email }}
+    <email>{{.}}</email>{{end}}
+  </author>{{end}}
+  <generator>Hugo -- gohugo.io</generator>{{ range where (first 10 (where .Site.Pages "Section" "posts")) "Params.hidden" "ne" "true" }}
+  <entry>
+    {{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title>
+    <link href="{{ .Permalink }}"/>
+    <id>{{ .Permalink }}</id>{{ with .Site.Params.Author }}
+    <author>
+      <name>{{.}}</name>
+    </author>{{end}}
+    {{- $fmt := "2006-01-02T15:04:05-07:00" }}
+    <published>{{ .Date.Format $fmt | safeHTML }}</published>
+    {{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content>
+  </entry>{{ end }}
+</feed>
diff --git a/users/fcuny/blog/layouts/index.html b/users/fcuny/blog/layouts/index.html
new file mode 100644
index 0000000..5f49f24
--- /dev/null
+++ b/users/fcuny/blog/layouts/index.html
@@ -0,0 +1,22 @@
+{{ define "main" }}
+
+<div>
+  <h1>Franck Cuny</h1>
+
+  <ul>
+    <li>Email: <a href="mailto:franck@fcuny.net">franck@fcuny.net</a></li>
+    <li>GitHub: <a href="https://github.com/fcuny">@fcuny</a></li>
+    <li>Twitter: <a href="https://twitter.com/franckcuny">@franckcuny</a></li>
+  </ul>
+
+  <p>I'm currently working as a <a href="https://twitter.com/twittersre">Site Reliability Engineer</a> at Twitter, on the Compute team.</p>
+
+  <h2>Notes</h2>
+  {{ $section := "notes" }}
+  <ul>
+    {{ range (where .Site.RegularPages.ByTitle "Section" $section ) }}
+    <li><a href="{{ .Permalink }}">{{ .Params.title | humanize | title }} ({{ .Date.Format "2021-01" }})</a></li>
+    {{ end }}
+  </ul>
+
+{{ end }}
diff --git a/users/fcuny/blog/layouts/partials/head.html b/users/fcuny/blog/layouts/partials/head.html
new file mode 100644
index 0000000..9301a82
--- /dev/null
+++ b/users/fcuny/blog/layouts/partials/head.html
@@ -0,0 +1,15 @@
+<head>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+  <link rel="canonical" href="{{ .Permalink }}">
+
+  {{ $css := "/css/custom.css"  }}
+  <link rel="stylesheet" href="{{ $css }}">
+  <link rel="alternate" href="{{ "/feed.xml" | relURL }}" type="application/atom+xml" title="ATOM feed">
+  
+  <meta name="description" content="Franck Cuny's website, with articles about computers stuff.">
+  <meta name="author" content="Franck Cuny">
+
+  <title>{{ .Title }}</title>
+</head>