From d279c1c805deae202d11b2a452c9600210a41450 Mon Sep 17 00:00:00 2001 From: rphla <101242699+rphla@users.noreply.github.com> Date: Wed, 6 Jul 2022 06:39:29 +0800 Subject: [PATCH] Add GitHub "edit" button (#157) --- data/config.yaml | 2 ++ layouts/_default/single.html | 3 ++- layouts/partials/github.html | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/github.html diff --git a/data/config.yaml b/data/config.yaml index 7ef35a54..ce9ff0ab 100644 --- a/data/config.yaml +++ b/data/config.yaml @@ -9,6 +9,8 @@ enableSPA: true enableFooter: true enableContextualBacklinks: true enableRecentNotes: false +enableGitHubEdit: false +GHlink: https://github.com/jackyzha0/quartz/tree/hugo/content description: Host your second brain and digital garden for free. Quartz features extremely fast full-text search, Wikilink support, backlinks, local graph, tags, and link previews. diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 91eda290..06507a70 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,7 +15,8 @@
{{if .Title}}

{{ .Title }}

{{end}}

- Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}} + Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}. + {{ partial "github.html" . }}