From a3f8e661ad54cfec14ca671ea671e728ffc9bb91 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. --- users/fcuny/notes/.gitignore | 1 + users/fcuny/notes/archetypes/default.md | 5 +++ users/fcuny/notes/config.toml | 35 +++++++++++++++++++ users/fcuny/notes/layouts/_default/baseof.html | 11 ++++++ users/fcuny/notes/layouts/_default/list.html | 10 ++++++ users/fcuny/notes/layouts/_default/single.html | 11 ++++++ users/fcuny/notes/layouts/index.atom.xml | 22 ++++++++++++ users/fcuny/notes/layouts/index.html | 22 ++++++++++++ users/fcuny/notes/layouts/partials/head.html | 15 ++++++++ users/fcuny/notes/static/CNAME | 1 + users/fcuny/notes/static/css/custom.css | 47 ++++++++++++++++++++++++++ 11 files changed, 180 insertions(+) create mode 100644 users/fcuny/notes/.gitignore create mode 100644 users/fcuny/notes/archetypes/default.md create mode 100644 users/fcuny/notes/config.toml create mode 100644 users/fcuny/notes/layouts/_default/baseof.html create mode 100644 users/fcuny/notes/layouts/_default/list.html create mode 100644 users/fcuny/notes/layouts/_default/single.html create mode 100644 users/fcuny/notes/layouts/index.atom.xml create mode 100644 users/fcuny/notes/layouts/index.html create mode 100644 users/fcuny/notes/layouts/partials/head.html create mode 100644 users/fcuny/notes/static/CNAME create mode 100644 users/fcuny/notes/static/css/custom.css (limited to 'users/fcuny') diff --git a/users/fcuny/notes/.gitignore b/users/fcuny/notes/.gitignore new file mode 100644 index 0000000..6e68499 --- /dev/null +++ b/users/fcuny/notes/.gitignore @@ -0,0 +1 @@ +/docs/ diff --git a/users/fcuny/notes/archetypes/default.md b/users/fcuny/notes/archetypes/default.md new file mode 100644 index 0000000..7ce2f1a --- /dev/null +++ b/users/fcuny/notes/archetypes/default.md @@ -0,0 +1,5 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +--- + diff --git a/users/fcuny/notes/config.toml b/users/fcuny/notes/config.toml new file mode 100644 index 0000000..44080ae --- /dev/null +++ b/users/fcuny/notes/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/users/fcuny/notes/layouts/_default/baseof.html b/users/fcuny/notes/layouts/_default/baseof.html new file mode 100644 index 0000000..d9ca51a --- /dev/null +++ b/users/fcuny/notes/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{ partial "head.html" . }} + +
+
+ {{ block "main" . }}{{ end }} +
+
+ + diff --git a/users/fcuny/notes/layouts/_default/list.html b/users/fcuny/notes/layouts/_default/list.html new file mode 100644 index 0000000..3423cb6 --- /dev/null +++ b/users/fcuny/notes/layouts/_default/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} + +

{{ .Title }}

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

+ {{ .Title }} +

+{{ end }} + +{{ end }} diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html new file mode 100644 index 0000000..a8c1dc7 --- /dev/null +++ b/users/fcuny/notes/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/users/fcuny/notes/layouts/index.atom.xml b/users/fcuny/notes/layouts/index.atom.xml new file mode 100644 index 0000000..531e77c --- /dev/null +++ b/users/fcuny/notes/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/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html new file mode 100644 index 0000000..5f49f24 --- /dev/null +++ b/users/fcuny/notes/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/users/fcuny/notes/layouts/partials/head.html b/users/fcuny/notes/layouts/partials/head.html new file mode 100644 index 0000000..9301a82 --- /dev/null +++ b/users/fcuny/notes/layouts/partials/head.html @@ -0,0 +1,15 @@ + + + + + + + {{ $css := "/css/custom.css" }} + + + + + + + {{ .Title }} + diff --git a/users/fcuny/notes/static/CNAME b/users/fcuny/notes/static/CNAME new file mode 100644 index 0000000..7398ba2 --- /dev/null +++ b/users/fcuny/notes/static/CNAME @@ -0,0 +1 @@ +fcuny.net \ No newline at end of file diff --git a/users/fcuny/notes/static/css/custom.css b/users/fcuny/notes/static/css/custom.css new file mode 100644 index 0000000..45f9732 --- /dev/null +++ b/users/fcuny/notes/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