From cd7c3abdbda16ab0a6cb0d7bed504ed930f9ca73 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 7 Mar 2021 16:23:59 -0800 Subject: 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. --- .gitignore | 1 + archetypes/default.md | 5 +++++ config.toml | 35 +++++++++++++++++++++++++++++++++ layouts/_default/baseof.html | 11 +++++++++++ layouts/_default/list.html | 10 ++++++++++ layouts/_default/single.html | 11 +++++++++++ layouts/index.atom.xml | 22 +++++++++++++++++++++ layouts/index.html | 22 +++++++++++++++++++++ layouts/partials/head.html | 15 ++++++++++++++ static/CNAME | 1 + static/css/custom.css | 47 ++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 180 insertions(+) create mode 100644 .gitignore create mode 100644 archetypes/default.md create mode 100644 config.toml create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.atom.xml create mode 100644 layouts/index.html create mode 100644 layouts/partials/head.html create mode 100644 static/CNAME create mode 100644 static/css/custom.css diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e68499 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/docs/ diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..7ce2f1a --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +--- + diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..44080ae --- /dev/null +++ b/config.toml @@ -0,0 +1,35 @@ +baseURL = "http://fcuny.net/" +languageCode = "en-us" +title = "Franck Cuny's Website" +publishDir = "docs" + +[params] + homeText = "A collection of articles" + +[permalinks] + articles = "/:section/:slug/" + +[markup] + [markup.highlight] + anchorLineNos = false + codeFences = true + guessSyntax = false + hl_Lines = "" + lineAnchors = "" + lineNoStart = 1 + lineNos = false + lineNumbersInTable = true + noClasses = true + style = "emacs" + tabWidth = 2 + +[mediaTypes."application/atom"] +suffixes = ["xml"] + +[outputFormats.Atom] +mediaType = "application/atom" +baseName = "feed" +isPlainText = false + +[outputs] +home = [ "HTML", "Atom" ] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..d9ca51a --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{ partial "head.html" . }} + +
+
+ {{ block "main" . }}{{ end }} +
+
+ + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..3423cb6 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} + +

{{ .Title }}

+{{ range .Pages.ByPublishDate.Reverse }} +

+ {{ .Title }} +

+{{ end }} + +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..a8c1dc7 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,11 @@ +{{ define "main" }} + +

← Back to Franck's homepage

+ +

{{ .Title }}

+ +

{{ .Date.Format "January 2021" }}

+ +{{ .Content }} + +{{ end }} diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml new file mode 100644 index 0000000..531e77c --- /dev/null +++ b/layouts/index.atom.xml @@ -0,0 +1,22 @@ + + Franck Cuny Website + + + {{ .Permalink }}{{ with .Site.Author.name }} + + {{.}}{{ with $.Site.Author.email }} + {{.}}{{end}} + {{end}} + Hugo -- gohugo.io{{ range where (first 10 (where .Site.Pages "Section" "posts")) "Params.hidden" "ne" "true" }} + + {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> + + {{ .Permalink }}{{ with .Site.Params.Author }} + + {{.}} + {{end}} + {{- $fmt := "2006-01-02T15:04:05-07:00" }} + {{ .Date.Format $fmt | safeHTML }} + {{ ` + {{ end }} + diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..5f49f24 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,22 @@ +{{ define "main" }} + +
+

Franck Cuny

+ + + +

I'm currently working as a Site Reliability Engineer at Twitter, on the Compute team.

+ +

Notes

+ {{ $section := "notes" }} + + +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..9301a82 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,15 @@ + + + + + + + {{ $css := "/css/custom.css" }} + + + + + + + {{ .Title }} + diff --git a/static/CNAME b/static/CNAME new file mode 100644 index 0000000..7398ba2 --- /dev/null +++ b/static/CNAME @@ -0,0 +1 @@ +fcuny.net \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..45f9732 --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,47 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:400,700'); +@import url('https://fonts.googleapis.com/css?family=Roboto+Mono:400'); + +*, *:before, *:after { box-sizing: border-box; } + +body { + background-color: #ffffea; + line-height: 1.6rem; + font-size: 18px; + font-family: "Roboto Slab", serif; + color: #000; + padding: 2rem; +} + +.main { + margin: auto; + max-width: 50rem; +} + +a { + text-decoration: none; + color: #00add8; +} + +p { color: #1a1a19; } + +h1 { + line-height: normal; +} + +h2 { + margin-top: 2rem; + line-height: 1.4em; +} + +span.published, span.updated { + display: block; + font-style: oblique; +} + +pre { + padding: 1rem 2rem; + margin: 0; + font-size: 16px; + font-family: "Roboto Mono", Monaco, "Lucida Console", monospace; + overflow: scroll; +} -- cgit 1.4.1