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/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 +++++++++++++++ 6 files changed, 91 insertions(+) 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 (limited to 'users/fcuny/notes/layouts') 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 }} + -- cgit v1.2.3 From 7dbca0955261d48a6ebc23058153d1b36bdeaaff Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 6 Apr 2021 12:28:27 -0700 Subject: layout: clean up empty space --- users/fcuny/notes/layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/head.html b/users/fcuny/notes/layouts/partials/head.html index 9301a82..f41eb04 100644 --- a/users/fcuny/notes/layouts/partials/head.html +++ b/users/fcuny/notes/layouts/partials/head.html @@ -7,7 +7,7 @@ {{ $css := "/css/custom.css" }} - + -- cgit v1.2.3 From 25eb1dca2cf86e5cbf45c66ce497c790577ef3ed Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 6 Apr 2021 12:28:53 -0700 Subject: layout: fix format for the date --- users/fcuny/notes/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 5f49f24..450444b 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -15,7 +15,7 @@ {{ $section := "notes" }} -- cgit v1.2.3 From 11e25707f013a4251ab83a52ed0f3b008764a1ae Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 6 Apr 2021 12:32:43 -0700 Subject: layout: add date and tags to single pages We want to show the tags and the published/updated date for the articles. Add to the CSS the classes for these new elements. --- users/fcuny/notes/layouts/_default/single.html | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index a8c1dc7..0ab5e35 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -4,7 +4,32 @@

{{ .Title }}

-

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

+
+ {{- $pub := .Date.Format "2006-01-02" -}} + {{- $mod := "" -}} + {{- if (not .GitInfo) }} + {{- $mod = .Lastmod.Format "2006-01-02" -}} + {{ else }} + {{- $mod = .Page.GitInfo.CommitDate.Format "2006-01-02" -}} + {{ end -}} + {{ if eq $pub $mod }} +
published {{ $pub }}
+ {{ else }} +
published {{ $pub }}, last modified {{ $mod }}
+ {{ end }} + {{ if .Params.tags }} +
+ {{ if eq (len .Params.tags) 1 }} + in tag + {{ else }} + in tags + {{ end }} + {{ range $idx, $tag := .Params.tags }} + {{ $tag }} + {{ end }} +
+ {{ end }} +
{{ .Content }} -- cgit v1.2.3 From 81f002c3615784ff38fc957c14b993f08fb134fe Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 6 Apr 2021 12:33:39 -0700 Subject: taxonomy: add pages for tags We want to have pages that list all the articles related to a given tag. Update the configuration to add support for tags and the permalink structure. --- users/fcuny/notes/layouts/partials/postlist.html | 30 ++++++++++++++++++++++++ users/fcuny/notes/layouts/taxonomy/tag.html | 6 +++++ 2 files changed, 36 insertions(+) create mode 100644 users/fcuny/notes/layouts/partials/postlist.html create mode 100644 users/fcuny/notes/layouts/taxonomy/tag.html (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/postlist.html b/users/fcuny/notes/layouts/partials/postlist.html new file mode 100644 index 0000000..3695d82 --- /dev/null +++ b/users/fcuny/notes/layouts/partials/postlist.html @@ -0,0 +1,30 @@ +

← Back to Franck's homepage

+ +{{ range .GroupByDate "2006-Jan" }} +

{{ .Key }}

+
    + {{ range .Pages.ByDate }} +
  • +
    +

    {{ .Title }}

    + {{ if .Params.tags }} +
    + Tags: + {{ range $idx, $tag := .Params.tags }} + {{ $tag }} + {{ end }} +
    + {{ else }} +
    + {{ end }} +
    +
    +

    + {{ .Summary }} + Read more → +

    +
    +
  • + {{ end }} +
+{{ end }} diff --git a/users/fcuny/notes/layouts/taxonomy/tag.html b/users/fcuny/notes/layouts/taxonomy/tag.html new file mode 100644 index 0000000..2b7d98a --- /dev/null +++ b/users/fcuny/notes/layouts/taxonomy/tag.html @@ -0,0 +1,6 @@ +{{ define "main" }} + + {{ $pgs := where .Data.Pages "Params.hidden" "ne" "true" }} + {{ partial "postlist" $pgs }} + +{{ end }} -- cgit v1.2.3 From 86c8d29cec41f663d1a4abd155e8b7a13ad0c533 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 22 Apr 2021 12:44:27 -0700 Subject: layout: add a navbar I want to differentiate blog's entries from more general notes. For this, we create two menu entries, and add a navbar at the top. The nav bar let us select between the two kind of articles: blogs or notes. For now we have a single blog entry, and no notes. The page to list entries is simplified: we use the same layout for all lists (tags, notes, blogs). The CSS is updated to support the new nav bar. --- users/fcuny/notes/layouts/_default/baseof.html | 1 + users/fcuny/notes/layouts/_default/list.html | 8 ++------ users/fcuny/notes/layouts/_default/single.html | 2 -- users/fcuny/notes/layouts/index.html | 8 -------- users/fcuny/notes/layouts/partials/header.html | 15 +++++++++++++++ users/fcuny/notes/layouts/partials/postlist.html | 20 +------------------- 6 files changed, 19 insertions(+), 35 deletions(-) create mode 100644 users/fcuny/notes/layouts/partials/header.html (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/baseof.html b/users/fcuny/notes/layouts/_default/baseof.html index d9ca51a..3fd7011 100644 --- a/users/fcuny/notes/layouts/_default/baseof.html +++ b/users/fcuny/notes/layouts/_default/baseof.html @@ -3,6 +3,7 @@ {{ partial "head.html" . }}
+ {{- partial "header.html" . -}}
{{ block "main" . }}{{ end }}
diff --git a/users/fcuny/notes/layouts/_default/list.html b/users/fcuny/notes/layouts/_default/list.html index 3423cb6..2b7d98a 100644 --- a/users/fcuny/notes/layouts/_default/list.html +++ b/users/fcuny/notes/layouts/_default/list.html @@ -1,10 +1,6 @@ {{ define "main" }} -

{{ .Title }}

-{{ range .Pages.ByPublishDate.Reverse }} -

- {{ .Title }} -

-{{ end }} + {{ $pgs := where .Data.Pages "Params.hidden" "ne" "true" }} + {{ partial "postlist" $pgs }} {{ end }} diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index 0ab5e35..356f344 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -1,7 +1,5 @@ {{ define "main" }} -

← Back to Franck's homepage

-

{{ .Title }}

diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 450444b..f7581ff 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -11,12 +11,4 @@

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/header.html b/users/fcuny/notes/layouts/partials/header.html new file mode 100644 index 0000000..f918823 --- /dev/null +++ b/users/fcuny/notes/layouts/partials/header.html @@ -0,0 +1,15 @@ +
+ +
diff --git a/users/fcuny/notes/layouts/partials/postlist.html b/users/fcuny/notes/layouts/partials/postlist.html index 3695d82..28fd9b2 100644 --- a/users/fcuny/notes/layouts/partials/postlist.html +++ b/users/fcuny/notes/layouts/partials/postlist.html @@ -1,28 +1,10 @@ -

← Back to Franck's homepage

- -{{ range .GroupByDate "2006-Jan" }} +{{ range .GroupByDate "2006" }}

{{ .Key }}

    {{ range .Pages.ByDate }}
  • {{ .Title }}

    - {{ if .Params.tags }} -
    - Tags: - {{ range $idx, $tag := .Params.tags }} - {{ $tag }} - {{ end }} -
    - {{ else }} -
    - {{ end }} -
    -
    -

    - {{ .Summary }} - Read more → -

  • {{ end }} -- cgit v1.2.3 From cf2733ce2dbd2bc8217a2a12f3237b293d50140e Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 5 Aug 2021 11:52:50 -0700 Subject: blog: add humans.txt See humanstxt.org for more information. --- users/fcuny/notes/layouts/partials/head.html | 1 + 1 file changed, 1 insertion(+) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/head.html b/users/fcuny/notes/layouts/partials/head.html index f41eb04..39ef8aa 100644 --- a/users/fcuny/notes/layouts/partials/head.html +++ b/users/fcuny/notes/layouts/partials/head.html @@ -7,6 +7,7 @@ {{ $css := "/css/custom.css" }} + -- cgit v1.2.3 From d2c6009601af43f8502fc10902540e1e9b3ba428 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 5 Aug 2021 11:55:40 -0700 Subject: blog: add SSH public keys --- users/fcuny/notes/layouts/index.html | 1 + 1 file changed, 1 insertion(+) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index f7581ff..100a77f 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -7,6 +7,7 @@
  • Email: franck@fcuny.net
  • GitHub: @fcuny
  • Twitter: @franckcuny
  • +
  • Keys: SSH public keys

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

-- cgit v1.2.3 From defacba9d2a79616a9173f0abb88f4f2d5626e0b Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 5 Aug 2021 12:00:07 -0700 Subject: blog: update description --- users/fcuny/notes/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 100a77f..1b63249 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -10,6 +10,6 @@
  • Keys: SSH public keys
  • -

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

    +

    I'm currently working as an Engineer at Twitter, on the Compute team.

    {{ end }} -- cgit v1.2.3 From 9d0b3a718545c035ac359ddb8a2f2668c477e59d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 5 Aug 2021 12:53:13 -0700 Subject: css: bigger font and highlight colors Increase the font size and change some of the colors used for highlighting code. --- users/fcuny/notes/layouts/partials/head.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/head.html b/users/fcuny/notes/layouts/partials/head.html index 39ef8aa..7de4fd4 100644 --- a/users/fcuny/notes/layouts/partials/head.html +++ b/users/fcuny/notes/layouts/partials/head.html @@ -9,6 +9,8 @@ + + -- cgit v1.2.3 From 8d75c9be38a2318d77cca0b066360fbb317abfae Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 14 Aug 2021 13:17:23 -0700 Subject: blog: replace github with git.fcuny.net --- users/fcuny/notes/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 1b63249..b2f232d 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -5,7 +5,7 @@ -- cgit v1.2.3 From 0d5e2812c71d9b76885a04c0167d0b59e4e4827d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 15 Aug 2021 13:42:51 -0700 Subject: CSS: use a class for the menu We will have more use of the tag `nav` and we will need different styles for it. --- users/fcuny/notes/layouts/partials/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/header.html b/users/fcuny/notes/layouts/partials/header.html index f918823..508e259 100644 --- a/users/fcuny/notes/layouts/partials/header.html +++ b/users/fcuny/notes/layouts/partials/header.html @@ -1,5 +1,5 @@
    -
    +{{ if .Params.toc }} +
    + Table of Contents + {{ .TableOfContents }} +
    +{{ end }} + {{ .Content }} {{ end }} -- cgit v1.2.3 From 9aa8a776a5370aeb1c5250321371949c509ae64f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 15 Aug 2021 15:15:40 -0700 Subject: layout: don't use header tag in list --- users/fcuny/notes/layouts/partials/postlist.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/postlist.html b/users/fcuny/notes/layouts/partials/postlist.html index 28fd9b2..e124482 100644 --- a/users/fcuny/notes/layouts/partials/postlist.html +++ b/users/fcuny/notes/layouts/partials/postlist.html @@ -4,7 +4,7 @@ {{ range .Pages.ByDate }}
  • {{ end }} -- cgit v1.2.3 From dbacc543ca0a397a73a520d6c92fd08a7cf3b6aa Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 23 Aug 2021 09:15:40 -0700 Subject: CSS: makes the menu more readable Move the title to the left and the menu items to the right. --- users/fcuny/notes/layouts/partials/header.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/header.html b/users/fcuny/notes/layouts/partials/header.html index 508e259..76e23a2 100644 --- a/users/fcuny/notes/layouts/partials/header.html +++ b/users/fcuny/notes/layouts/partials/header.html @@ -1,15 +1,13 @@
    -- cgit v1.2.3 From 9af499ffbf985cd6bea50d079063e6f01cba139a Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 23 Aug 2021 09:32:05 -0700 Subject: CSS: use decoration on headers only for articles Add an element "article" to the single page template, and change the CSS to use the decoration for headers only for that kind of content. Having decoration for all headers is distracting, it's more suited for actual content. We also don't need decoration for h1, only smaller headers. --- users/fcuny/notes/layouts/_default/single.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index b4c5443..165c568 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -1,5 +1,7 @@ {{ define "main" }} +
    +

    {{ .Title }}

    @@ -18,9 +20,9 @@ {{ if .Params.tags }}
    {{ if eq (len .Params.tags) 1 }} - in tag + tag: {{ else }} - in tags + tags: {{ end }} {{ range $idx, $tag := .Params.tags }} {{ $tag }} @@ -38,4 +40,6 @@ {{ .Content }} +
    + {{ end }} -- cgit v1.2.3 From b61ae35e777222379ba4870d2019cf00186e3b07 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 23 Aug 2021 09:33:39 -0700 Subject: index: drop the main header It's ugly. --- users/fcuny/notes/layouts/index.html | 2 -- 1 file changed, 2 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index b2f232d..f34b21f 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -1,8 +1,6 @@ {{ define "main" }}
    -

    Franck Cuny

    -
    • Email: franck@fcuny.net
    • Git: @fcuny
    • -- cgit v1.2.3 From 23a9bbb216ae9618431e96e6b13d567f79383002 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 24 Aug 2021 19:21:23 -0700 Subject: blog: sort pages in reverse order --- users/fcuny/notes/layouts/partials/postlist.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/postlist.html b/users/fcuny/notes/layouts/partials/postlist.html index e124482..3d5cf04 100644 --- a/users/fcuny/notes/layouts/partials/postlist.html +++ b/users/fcuny/notes/layouts/partials/postlist.html @@ -1,7 +1,7 @@ {{ range .GroupByDate "2006" }}

      {{ .Key }}

        - {{ range .Pages.ByDate }} + {{ range .Pages.ByDate.Reverse }}
      • {{ .Title }} -- cgit v1.2.3 From b0385745b32b9853e31c1ccf53cf860e374f1ad0 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 20 Dec 2021 14:30:49 -0800 Subject: menu: simplify the menu --- users/fcuny/notes/layouts/partials/header.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/header.html b/users/fcuny/notes/layouts/partials/header.html index 76e23a2..9118a50 100644 --- a/users/fcuny/notes/layouts/partials/header.html +++ b/users/fcuny/notes/layouts/partials/header.html @@ -1,13 +1,7 @@
        -- cgit v1.2.3 From 57f443be096465eb3db6aff56ec32b88530cf6dd Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 20 Dec 2021 14:31:06 -0800 Subject: index: re-organize the main page Add a "contact" header with my information under it. --- users/fcuny/notes/layouts/index.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index f34b21f..9e15e77 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -1,13 +1,15 @@ {{ define "main" }} -
        - - -

        I'm currently working as an Engineer at Twitter, on the Compute team.

        +

        {{ .Site.Home.Title }}

        + +

        I'm currently working as an Engineer at Twitter, on the Compute team.

        + +

        Contact

        + {{ end }} -- cgit v1.2.3 From 14fc76a6078cbb5334e49ee5edabf51a5072e39d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 29 Dec 2021 09:11:14 -0800 Subject: RSS: fix the template Generate correctly the content of the RSS feed. I only want the blog articles, not the notes. --- users/fcuny/notes/layouts/index.atom.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.atom.xml b/users/fcuny/notes/layouts/index.atom.xml index 531e77c..1d73f9b 100644 --- a/users/fcuny/notes/layouts/index.atom.xml +++ b/users/fcuny/notes/layouts/index.atom.xml @@ -1,5 +1,5 @@ - Franck Cuny Website + {{ .Site.Title }} {{ .Permalink }}{{ with .Site.Author.name }} @@ -7,7 +7,8 @@ {{.}}{{ with $.Site.Author.email }} {{.}}{{end}} {{end}} - Hugo -- gohugo.io{{ range where (first 10 (where .Site.Pages "Section" "posts")) "Params.hidden" "ne" "true" }} + Hugo -- gohugo.io + {{ range where (first 10 (where .Site.Pages "Section" "blog")) "Params.hidden" "ne" "true" }} {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> @@ -18,5 +19,6 @@ {{- $fmt := "2006-01-02T15:04:05-07:00" }} {{ .Date.Format $fmt | safeHTML }} {{ ` - {{ end }} + + {{ end }} -- cgit v1.2.3 From a04ea1b2f562c05fa71ccfe2904d36dd1a5dad92 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 8 Jan 2022 10:07:43 -0800 Subject: index: update current job --- users/fcuny/notes/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 9e15e77..586aaa5 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -2,7 +2,7 @@

        {{ .Site.Home.Title }}

        -

        I'm currently working as an Engineer at Twitter, on the Compute team.

        +

        I'm an engineer currently working as a break. Previously I was a Site Reliability Engineer at Twitter, on the Compute team.

        Contact

          -- cgit v1.2.3 From 1ad09c465aca33641858bdd9aa06ecd76c3700e6 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 10 Jan 2022 11:46:19 -0800 Subject: index: rephrase --- users/fcuny/notes/layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 586aaa5..21a86b8 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -2,7 +2,7 @@

          {{ .Site.Home.Title }}

          -

          I'm an engineer currently working as a break. Previously I was a Site Reliability Engineer at Twitter, on the Compute team.

          +

          I'm an engineer currently on a break. Previously I was a Site Reliability Engineer working on Twitter's compute platform.

          Contact

            -- cgit v1.2.3 From 8d089c7d6d798410bfb50f5d2d30106974a984cf Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 21 Jan 2022 11:13:56 -0800 Subject: post: change formatting for the date --- users/fcuny/notes/layouts/_default/single.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index 165c568..4f21ded 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -5,17 +5,17 @@

            {{ .Title }}

            - {{- $pub := .Date.Format "2006-01-02" -}} + {{- $pub := .Date.Format "Jan 2, 2006" -}} {{- $mod := "" -}} {{- if (not .GitInfo) }} - {{- $mod = .Lastmod.Format "2006-01-02" -}} + {{- $mod = .Lastmod.Format "Jan 2, 2006" -}} {{ else }} - {{- $mod = .Page.GitInfo.CommitDate.Format "2006-01-02" -}} + {{- $mod = .Page.GitInfo.CommitDate.Format "Jan 2, 2006" -}} {{ end -}} {{ if eq $pub $mod }}
            published {{ $pub }}
            {{ else }} -
            published {{ $pub }}, last modified {{ $mod }}
            +
            published {{ $pub }} - last modified {{ $mod }}
            {{ end }} {{ if .Params.tags }}
            -- cgit v1.2.3 From e3c457f0b32c2d4c754ab80d60052b63555d6333 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 21 Jan 2022 11:14:06 -0800 Subject: nav: align the menu items to the right --- users/fcuny/notes/layouts/partials/header.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/header.html b/users/fcuny/notes/layouts/partials/header.html index 9118a50..e579329 100644 --- a/users/fcuny/notes/layouts/partials/header.html +++ b/users/fcuny/notes/layouts/partials/header.html @@ -1,7 +1,12 @@
            -
            -- cgit v1.2.3 From b11447bcba41ea413ab2ed633d4c8606b321ff80 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 21 Jan 2022 11:18:27 -0800 Subject: nav: use 'fcuny.net' instead of template variable Otherwise it's the name of the site, which is not what I'm looking for here. --- users/fcuny/notes/layouts/partials/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/partials/header.html b/users/fcuny/notes/layouts/partials/header.html index e579329..dede0ae 100644 --- a/users/fcuny/notes/layouts/partials/header.html +++ b/users/fcuny/notes/layouts/partials/header.html @@ -1,7 +1,7 @@
    + {{ end }} -- cgit v1.2.3 From 1f644e51028a77b2e3ef2de33d3497f8bf565ad2 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 23 Jan 2022 18:22:47 -0800 Subject: layout: proper TOC There's a need for two TOCs in the layout: one for when the page is on mobile; one for non mobile. When we are on mobile, we display the first TOC, before the article. When we're not on mobile, we hide that TOC and display one after the document. We restructure a bit the layout so that's it's a bit more readable too, and close tags properly. --- users/fcuny/notes/layouts/_default/single.html | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index 4f21ded..524145a 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" }} -
    +

    {{ .Title }}

    @@ -32,14 +32,23 @@
    {{ if .Params.toc }} -
    - Table of Contents +
    + Table of contents {{ .TableOfContents }}
    {{ end }} +
    {{ .Content }} +
    + +
    -
    +{{ if .Params.toc }} +
    + Table of contents + {{ .TableOfContents }} +
    +{{ end }} {{ end }} -- cgit v1.2.3 From 5abd6605d975c90a5a9620267bd6ba2371317b9c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 23 Jan 2022 18:49:53 -0800 Subject: layout: no need for a class to element 'article' --- users/fcuny/notes/layouts/_default/list.html | 2 +- users/fcuny/notes/layouts/_default/single.html | 2 +- users/fcuny/notes/layouts/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/list.html b/users/fcuny/notes/layouts/_default/list.html index 6d1c04f..d2c59a7 100644 --- a/users/fcuny/notes/layouts/_default/list.html +++ b/users/fcuny/notes/layouts/_default/list.html @@ -1,6 +1,6 @@ {{ define "main" }} -
    +
    {{ $pgs := where .Data.Pages "Params.hidden" "ne" "true" }} {{ partial "postlist" $pgs }} diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index 524145a..fe2477e 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -38,7 +38,7 @@
    {{ end }} -
    +
    {{ .Content }}
    diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 523ad08..2ab8c40 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -1,6 +1,6 @@ {{ define "main" }} -
    +

    {{ .Site.Home.Title }}

    -- cgit v1.2.3 From 24cebe8b0005ffd6e0dc390780ce54139a1179ec Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 23 Jan 2022 19:11:39 -0800 Subject: CSS: switch from class to id These elements are unique on each page. --- users/fcuny/notes/layouts/_default/single.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index fe2477e..7a85a05 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -4,7 +4,7 @@

    {{ .Title }}

    -
    +
    {{- $pub := .Date.Format "Jan 2, 2006" -}} {{- $mod := "" -}} {{- if (not .GitInfo) }} @@ -13,9 +13,9 @@ {{- $mod = .Page.GitInfo.CommitDate.Format "Jan 2, 2006" -}} {{ end -}} {{ if eq $pub $mod }} -
    published {{ $pub }}
    +
    published {{ $pub }}
    {{ else }} -
    published {{ $pub }} - last modified {{ $mod }}
    +
    published {{ $pub }} - last modified {{ $mod }}
    {{ end }} {{ if .Params.tags }}
    @@ -25,7 +25,7 @@ tags: {{ end }} {{ range $idx, $tag := .Params.tags }} - {{ $tag }} + {{ $tag }} {{ end }}
    {{ end }} @@ -45,7 +45,7 @@
    {{ if .Params.toc }} -
    +
    Table of contents {{ .TableOfContents }}
    -- cgit v1.2.3 From 5483be5a93faac53c2319696e1d024fd049b8a09 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 28 Mar 2022 19:50:38 -0700 Subject: convert blog to notes Separating the two sites so I can customize them differently. --- users/fcuny/notes/layouts/_default/baseof.html | 1 + users/fcuny/notes/layouts/_default/single.html | 14 ----------- users/fcuny/notes/layouts/index.atom.xml | 2 +- users/fcuny/notes/layouts/index.html | 17 +++++++------- users/fcuny/notes/layouts/partials/footer.html | 32 ++++++++++++++++++++++++++ users/fcuny/notes/layouts/partials/header.html | 12 ++++------ 6 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 users/fcuny/notes/layouts/partials/footer.html (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/baseof.html b/users/fcuny/notes/layouts/_default/baseof.html index 0c72fb1..410e2bc 100644 --- a/users/fcuny/notes/layouts/_default/baseof.html +++ b/users/fcuny/notes/layouts/_default/baseof.html @@ -6,5 +6,6 @@
    {{ block "main" . }}{{ end }}
    + {{- partial "footer.html" . -}} diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index 7a85a05..7f594ad 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/layouts/_default/single.html @@ -31,24 +31,10 @@ {{ end }}
    -{{ if .Params.toc }} -
    - Table of contents - {{ .TableOfContents }} -
    -{{ end }} -
    {{ .Content }}
    -{{ if .Params.toc }} -
    - Table of contents - {{ .TableOfContents }} -
    -{{ end }} - {{ end }} diff --git a/users/fcuny/notes/layouts/index.atom.xml b/users/fcuny/notes/layouts/index.atom.xml index 1d73f9b..e4b014b 100644 --- a/users/fcuny/notes/layouts/index.atom.xml +++ b/users/fcuny/notes/layouts/index.atom.xml @@ -8,7 +8,7 @@ {{.}}{{end}} {{end}} Hugo -- gohugo.io - {{ range where (first 10 (where .Site.Pages "Section" "blog")) "Params.hidden" "ne" "true" }} + {{ range where (first 10 (where .Site.Pages "Section" "notes")) "Params.hidden" "ne" "true" }} {{ `<![CDATA[` | safeHTML }}{{ .Title }}]]> diff --git a/users/fcuny/notes/layouts/index.html b/users/fcuny/notes/layouts/index.html index 2ab8c40..a340d3d 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -4,15 +4,16 @@

    {{ .Site.Home.Title }}

    -

    I'm an engineer currently on a break. Previously I was a Site Reliability Engineer working on Twitter's compute platform.

    +

    This is my collection of notes.

    -

    Contact

    - +

    Notes

    +
      + {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{ range $pages }} + {{- $fmt := "2006-01-02" }} +
    • , {{ .Title }}
    • + {{ end }} +
    diff --git a/users/fcuny/notes/layouts/partials/footer.html b/users/fcuny/notes/layouts/partials/footer.html new file mode 100644 index 0000000..e2bf7ab --- /dev/null +++ b/users/fcuny/notes/layouts/partials/footer.html @@ -0,0 +1,32 @@ + diff --git a/users/fcuny/notes/layouts/partials/header.html b/users/fcuny/notes/layouts/partials/header.html index dede0ae..fe90497 100644 --- a/users/fcuny/notes/layouts/partials/header.html +++ b/users/fcuny/notes/layouts/partials/header.html @@ -1,12 +1,10 @@
    -
    -- cgit v1.2.3 From a92df1fcec2d419f4352c56585f3cd1a871fc87c Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 3 Apr 2022 17:50:25 -0700 Subject: site: remove unnecessary elements --- users/fcuny/notes/layouts/_default/baseof.html | 1 - users/fcuny/notes/layouts/index.atom.xml | 24 ------------------- users/fcuny/notes/layouts/index.html | 16 +++++++------ users/fcuny/notes/layouts/partials/footer.html | 32 -------------------------- users/fcuny/notes/layouts/partials/head.html | 3 +-- users/fcuny/notes/layouts/partials/header.html | 5 ---- 6 files changed, 10 insertions(+), 71 deletions(-) delete mode 100644 users/fcuny/notes/layouts/index.atom.xml delete mode 100644 users/fcuny/notes/layouts/partials/footer.html (limited to 'users/fcuny/notes/layouts') diff --git a/users/fcuny/notes/layouts/_default/baseof.html b/users/fcuny/notes/layouts/_default/baseof.html index 410e2bc..0c72fb1 100644 --- a/users/fcuny/notes/layouts/_default/baseof.html +++ b/users/fcuny/notes/layouts/_default/baseof.html @@ -6,6 +6,5 @@
    {{ block "main" . }}{{ end }}
    - {{- partial "footer.html" . -}} diff --git a/users/fcuny/notes/layouts/index.atom.xml b/users/fcuny/notes/layouts/index.atom.xml deleted file mode 100644 index e4b014b..0000000 --- a/users/fcuny/notes/layouts/index.atom.xml +++ /dev/null @@ -1,24 +0,0 @@ - - {{ .Site.Title }} - - - {{ .Permalink }}{{ with .Site.Author.name }} - - {{.}}{{ with $.Site.Author.email }} - {{.}}{{end}} - {{end}} - Hugo -- gohugo.io - {{ range where (first 10 (where .Site.Pages "Section" "notes")) "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 index a340d3d..8ddc67d 100644 --- a/users/fcuny/notes/layouts/index.html +++ b/users/fcuny/notes/layouts/index.html @@ -2,16 +2,18 @@
    -

    {{ .Site.Home.Title }}

    + A place to collect random notes. -

    This is my collection of notes.

    - -

    Notes

    -
      +
        {{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ range $pages }} - {{- $fmt := "2006-01-02" }} -
      • , {{ .Title }}
      • +
      • + {{ .Title }} + {{ range $idx, $tag := .Params.tags }} + {{ $tag }} + {{ end }} +
      • + {{ end }}
      diff --git a/users/fcuny/notes/layouts/partials/footer.html b/users/fcuny/notes/layouts/partials/footer.html deleted file mode 100644 index e2bf7ab..0000000 --- a/users/fcuny/notes/layouts/partials/footer.html +++ /dev/null @@ -1,32 +0,0 @@ - diff --git a/users/fcuny/notes/layouts/partials/head.html b/users/fcuny/notes/layouts/partials/head.html index 7de4fd4..6e5a6fb 100644 --- a/users/fcuny/notes/layouts/partials/head.html +++ b/users/fcuny/notes/layouts/partials/head.html @@ -6,12 +6,11 @@ {{ $css := "/css/custom.css" }} - - + {{ .Title }} diff --git a/users/fcuny/notes/layouts/partials/header.html b/users/fcuny/notes/layouts/partials/header.html index fe90497..798463c 100644 --- a/users/fcuny/notes/layouts/partials/header.html +++ b/users/fcuny/notes/layouts/partials/header.html @@ -1,10 +1,5 @@
      -- cgit v1.2.3