From 22912bd30859a752be7d2da8040ece1f466d6b5f Mon Sep 17 00:00:00 2001 From: am1t Date: Fri, 2 Feb 2018 20:24:33 +0530 Subject: [PATCH 1/3] Enable indieweb support - Set up web sign-in via rel-me - Add info about owner via h-card - Add microformats to content via h-entry --- README.md | 2 ++ exampleSite/config.toml | 2 ++ layouts/partials/footer.html | 14 +++++++++++--- layouts/partials/header.html | 14 +++++++------- layouts/partials/post-content.html | 2 +- layouts/partials/post-header.html | 8 +++++--- layouts/post/single.html | 2 +- 7 files changed, 29 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c5c4dd28a..e4b9ef897 100644 --- a/README.md +++ b/README.md @@ -99,3 +99,5 @@ disqusShortname = "XXX" You can also inject arbitrary HTML into `` simply by overriding the `extra-in-head.html` partial, which is meant for that purpose. + +The theme is also enabled with [IndieWeb](https://indieweb.org) support which can be validated via different tools at website [IndieWebify.me](https://indiewebify.me/). diff --git a/exampleSite/config.toml b/exampleSite/config.toml index b0eedc999..2320e6659 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -9,6 +9,8 @@ googleAnalytics = "XXX" [Author] name = "My Name" profile = "https://google.com/+XXX" + email = "XXX@example.com" + nick = "my-name" [Taxonomies] tag = "tags" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 45da505d2..970a4cb0c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -11,9 +11,17 @@

- -

{{ end }} {{ with .Site.Params.twitter }} - + {{ end }} {{ with .Site.Params.gitlab }} - + {{ end }} {{ with .Site.Params.github }} - + {{ end }} {{ with .Site.Params.stackoverflow }} - + {{ end }} {{ with .Site.Params.linkedin }} - + {{ end }} {{ with .Site.Params.gplus }} - + {{ end }} {{ with .Site.Params.email }} - + {{ end }} diff --git a/layouts/partials/post-content.html b/layouts/partials/post-content.html index 5ca6487f7..a8febbbbc 100644 --- a/layouts/partials/post-content.html +++ b/layouts/partials/post-content.html @@ -1,4 +1,4 @@ -
+
{{ with .Params.Image }} {{ end }} diff --git a/layouts/partials/post-header.html b/layouts/partials/post-header.html index 9e43090d5..f493306d8 100644 --- a/layouts/partials/post-header.html +++ b/layouts/partials/post-header.html @@ -1,14 +1,16 @@
-

{{ .Title }}

+

{{ .Title }}

{{ if .Description }}

{{ .Description }}

{{ end }} diff --git a/layouts/post/single.html b/layouts/post/single.html index 146a1ab4d..ffbc7d15c 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -1,7 +1,7 @@ {{ partial "header.html" . }}
-
+
{{ partial "post-header.html" . }} {{ partial "post-content.html" . }} From ccc67a067e73db570c9e3465429943901157694d Mon Sep 17 00:00:00 2001 From: am1t Date: Fri, 2 Feb 2018 21:14:36 +0530 Subject: [PATCH 2/3] Configure Webmention endpoint --- exampleSite/config.toml | 1 + layouts/partials/header.html | 1 + 2 files changed, 2 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2320e6659..1a4033e1c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -25,6 +25,7 @@ googleAnalytics = "XXX" gplus = "https://google.com/+XXX" twitter = "https://twitter.com/XXX" stackoverflow = "https://stackoverflow.com/users/XXX/YYY" + webmentionEndpoint = "https://example.com/webmention" email = "XXX@example.com" opengraph = true shareTwitter = true diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 730e8997f..bebaa6954 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -11,6 +11,7 @@ {{ if .Site.Params.opengraph }}{{ partial "opengraph.html" . }}{{ end }} + {{ with .Site.Params.webmentionEndpoint }} {{ end }} From 96ad182d5d4ff12f07439bfc54d6268f6ed81bcb Mon Sep 17 00:00:00 2001 From: am1t Date: Tue, 26 Jun 2018 12:06:50 +0530 Subject: [PATCH 3/3] Validate nick and email being set Added check for Site.Author.nick and Site.Author.email being set set. Only if they are set to a non-empty value, the relevant block will be rendered. --- layouts/partials/footer.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 970a4cb0c..c31c12f2c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -17,11 +17,13 @@

class="p-name u-url url author metatag" rel="me"> {{ .Site.Author.name }} / - - / Powered by Hugo + {{ if and .Site.Author.email .Site.Author.nick }} + / + {{ end }} + Powered by Hugo