From 100029b4d5d19c48ec793530478e68d714653eec Mon Sep 17 00:00:00 2001 From: echtwerner Date: Sun, 9 Dec 2018 13:06:26 +0100 Subject: [PATCH 01/25] Change reference from Jekyll to Hugo and add link --- exampleSite/content/post/2015-02-20-test-markdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/post/2015-02-20-test-markdown.md b/exampleSite/content/post/2015-02-20-test-markdown.md index 8ef8cbf..1b36059 100644 --- a/exampleSite/content/post/2015-02-20-test-markdown.md +++ b/exampleSite/content/post/2015-02-20-test-markdown.md @@ -5,7 +5,7 @@ date: 2015-02-20 tags: ["example", "markdown"] --- -You can write regular [markdown](http://markdowntutorial.com/) here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc. +You can write regular [markdown](http://markdowntutorial.com/) here and [Hugo](https://gohugo.io) will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc. **Here is some bold text** From f9400c66120484a2b0e0a79775f9ccbc23ed4524 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Sun, 16 Dec 2018 04:02:54 +0100 Subject: [PATCH 02/25] Changed to config.yaml --- README.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 63657e9..d769736 100644 --- a/README.md +++ b/README.md @@ -61,19 +61,24 @@ To use this feature, uncomment and fill out the `disqusShortname` parameter in ` ### Staticman support -Add *staticman* configuration section in `config.toml` or `config.yaml` +Add *Staticman* configuration section in `config.toml` or `config.yaml` -Sample `config.yaml` configuration +Sample `config.toml` configuration ``` - staticman: - api: https://api.staticman.net/v2/entry///master/comments - pulls: https://github.com///pulls - recaptcha: +[Params.staticman] + api = "https:///v3/entry/{GIT-HOST}///master/comments" +[Params.staticman.recaptcha] sitekey: "6LeGeTgUAAAAAAqVrfTwox1kJQFdWl-mLzKasV0v" secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic=" ``` +Note: The public `API-ENDPOINT` https://staticman.net is currently hitting its API limit, so one may use other API instances to provide Staticman comment service. + +The section `[Params.staticman.recaptcha]` is *optional*. To add reCAPTCHA to your site, you have to replace the default values with your own ones (to be obtained from Google.) The site `secret` has to be encrypted with + + https:///v3/encrypt/ + You must also configure the `staticman.yml` in you blog website. ``` @@ -99,7 +104,7 @@ comments: secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic=" ``` - +If you *don't* have the section `[Params.staticman]` in `config.toml`, you *won't* need the section `reCaptcha` in `staticman.yml` ### Google Analytics From 873599321466d73464e72be35c12d142b508b17d Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Sun, 16 Dec 2018 10:38:48 +0100 Subject: [PATCH 03/25] Git host independent Git hash support --- layouts/partials/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1e86216..8f73679 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -54,7 +54,7 @@

{{ i18n "poweredBy" . | safeHTML }} - {{ with .Site.Params.commit }} • [{{ getenv "GIT_COMMIT_SHA_SHORT" }}]{{ end }} + {{ if $.GitInfo }} • [{{ substr .GitInfo.Hash 0 8 }}]{{ end }}

From 09f5875f0308b9a49e2abe32f8dd76beca15655a Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Sun, 16 Dec 2018 10:49:37 +0100 Subject: [PATCH 04/25] Update README after c07daadd --- README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 63657e9..b81d92f 100644 --- a/README.md +++ b/README.md @@ -107,20 +107,15 @@ To add Google Analytics, simply sign up to [Google Analytics](https://www.google ### Commit SHA on the footer -If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two environment variables have to be set (`GIT_COMMIT_SHA` and `GIT_COMMIT_SHA_SHORT`) and parameter `commit` has to be defined in the config file: +If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters `commit` has to be defined in the config file `config.toml`: ``` +enableGitInfo = true [Params] commit = "https://github.com///tree/" ``` - -This can be achieved by running the next command prior to calling Hugo: -``` - GIT_COMMIT_SHA=`git rev-parse --verify HEAD` GIT_COMMIT_SHA_SHORT=`git rev-parse --short HEAD` -``` - -See at [xor-gate/xor-gate.org](https://github.com/xor-gate/xor-gate.org) an example of how to add it to a continuous integration system. +See at [vincenttam/vincenttam.gitlab.io](https://gitlab.com/vincenttam/vincenttam.gitlab.io) for an example of how to add it to a continuous integration system. ### Extra shortcodes From f29c83ec4888a06c81274f4933c802af173c0187 Mon Sep 17 00:00:00 2001 From: Zhiwei Yin Date: Mon, 24 Dec 2018 09:06:06 +0800 Subject: [PATCH 05/25] add weibo to social --- data/beautifulhugo/social.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index cead546..d98bacc 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -135,3 +135,9 @@ id = "500px" url = "https://500px.com/%s" title = "500px" icon = "fab fa-500px" + +[[social_icons]] +id = "weibo" +url = "https://weibo.com/%s" +title = "Weibo" +icon = "fab fa-weibo" \ No newline at end of file From 13bd0ba5e5700b44edc45817cc14416a970ab6a2 Mon Sep 17 00:00:00 2001 From: Zhiwei Yin Date: Mon, 24 Dec 2018 09:21:35 +0800 Subject: [PATCH 06/25] add weibo to exampleSite --- exampleSite/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 22dbfb9..bb820c2 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -67,6 +67,7 @@ pygmentsCodefencesGuessSyntax = true paypal = "username" telegram = "username" 500px = "username" + weibo = "username" [[menu.main]] name = "Blog" From 0c9be3282c7dc83df68a641fbb3ca9d8c63160a0 Mon Sep 17 00:00:00 2001 From: Pascal <1067997+pad92@users.noreply.github.com> Date: Wed, 16 Jan 2019 11:31:32 +0100 Subject: [PATCH 07/25] fix for #242 change for issue #242 --- layouts/_default/single.html | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7af7637..0ab1bf5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -23,14 +23,19 @@ {{ end }} {{ if .Site.Params.showRelatedPosts }} - {{ $related := .Site.RegularPages.Related . | first 3 }} - {{ with $related }} -

{{ i18n "seeAlso" }}

-
    - {{ range . }} -
  • {{ .Title }}
  • + {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} + {{ $.Scratch.Set "has_related" true }} {{ end }} -
+ + {{ if $.Scratch.Get "has_related" }} +

{{ i18n "seeAlso" }}

+
    + {{ $num_to_show := .Site.Params.related_content_limit | default 5 }} + {{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }} +
  • {{ .Title }}
  • + {{ end }} +
+ {{ end }} {{ end }} From b1cccc8f2c6d7c515b93828ff7bc9c04bd6c9d2a Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Fri, 18 Jan 2019 08:34:55 -0500 Subject: [PATCH 08/25] Add the canonical "footer" block The base template and block system allows easy integration of themes with theme components. The "footer" blocks is also one of the suggested blocks in the Hugo docs: https://gohugo.io/templates/base/#define-the-base-template. Add this block quickly enables the use of theme components like [hugo-search-fuse-js](https://github.com/kaushalmodi/hugo-search-fuse-js/). I ended up creating this PR because of an issue created there: https://github.com/kaushalmodi/hugo-search-fuse-js/issues/1. --- layouts/_default/baseof.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 25befda..a67d0c4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,6 +8,7 @@ {{ block "header" . }}{{ partial "header.html" . }}{{ end }} {{ block "main" . }}{{ end }} {{ partial "footer.html" . }} + {{ block "footer" . }}{{ end }} From cf84bbc101ff7ab723317ae156792b59b47118cf Mon Sep 17 00:00:00 2001 From: Olivier Benz Date: Fri, 15 Feb 2019 07:34:04 +0100 Subject: [PATCH 09/25] Update keybase icon --- data/beautifulhugo/social.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index cead546..2164a1f 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -110,7 +110,7 @@ icon = "fas fa-gamepad" id = "keybase" url = "https://keybase.io/%s" title = "Keybase" -icon = "fas fa-key" +icon = "fab fa-keybase" [[social_icons]] id = "vk" From c7ba7ddf32923aac437094bab6c34cb72b048814 Mon Sep 17 00:00:00 2001 From: Rishi Subramanian Date: Wed, 6 Mar 2019 13:15:49 -0800 Subject: [PATCH 10/25] Added Kaggle to social icons --- data/beautifulhugo/social.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index cead546..9ab329b 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -135,3 +135,10 @@ id = "500px" url = "https://500px.com/%s" title = "500px" icon = "fab fa-500px" + +[[social_icons]] +id = "kaggle" +url = "https://www.kaggle.com/%s" +title = "kaggle" +icon = "fab fa-kaggle" + From 69b9d9a622d63e82139565e64275a49bde01fda3 Mon Sep 17 00:00:00 2001 From: Rishi Subramanian Date: Wed, 6 Mar 2019 13:17:50 -0800 Subject: [PATCH 11/25] Added Kaggle to example site --- exampleSite/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 22dbfb9..1d8af1f 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -67,6 +67,7 @@ pygmentsCodefencesGuessSyntax = true paypal = "username" telegram = "username" 500px = "username" + kaggle = "username" [[menu.main]] name = "Blog" From 4970402e068db7c7ae727961abab6c8bdd8ae577 Mon Sep 17 00:00:00 2001 From: Mamadou Babaei Date: Sun, 21 Apr 2019 20:16:54 +0200 Subject: [PATCH 12/25] add missing .png pulled in by photoswipe.default-skin.min.css when self-hosting --- static/css/default-skin.png | Bin 0 -> 547 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 static/css/default-skin.png diff --git a/static/css/default-skin.png b/static/css/default-skin.png new file mode 100644 index 0000000000000000000000000000000000000000..441c502c92fe66534f0ca07b1c639a02a9bfc6e8 GIT binary patch literal 547 zcmeAS@N?(olHy`uVBq!ia0y~yVB`R@BRE)q> zQzfg0DSPAQu=lA~!r-)AA>V`{IQs4>>BL>kcznXerunmlb=| zWcaU3Q?y({((8tixy!m+M^9AR2>U-@Q#M^%Df}$cvwDB2dmHkM!%s>?s`+*-6<*}b zC6z+Z%-w!koN!M(Vgcu$6vxWM6}@S%6da&YLklvPaws&rO=B5mA?S z`j1}n(OIHjt=UhUKbx#56!7%kz(zdN0WP!2crw3%tChOzkj<5G+?=I5j*G7gE&0rKP}eS!-QI|4{hH?XQwM7IF@KnRe$O+> z{=5>|J!M5a2Uz(xeHVC@V0bikU*S=2|Myc@XUBb*dfe5v>F)hwKM!2~;rOU>BEr>~ b?RAXa8OAS+-W5gzBcH+3)z4*}Q$iB}<;L|a literal 0 HcmV?d00001 From 865e7a5edf31c38a5ff292bea57d72f38dfce534 Mon Sep 17 00:00:00 2001 From: Liang Zhou Date: Sun, 21 Apr 2019 23:22:55 -0500 Subject: [PATCH 13/25] Add option `showAuthor` to hide author. Resolves #267 --- layouts/partials/post_meta.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 61f6637..1678d3f 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -11,10 +11,12 @@ {{ if .Site.Params.wordCount }}  |  {{ .WordCount }} {{ i18n "words" }} {{ end }} - {{ if .Params.author }} -  |  {{ .Params.author | safeHTML }} - {{ else }} -  |  {{ .Site.Author.name | safeHTML }} + {{ if .Site.Params.showAuthor }} + {{ if .Params.author }} +  |  {{ .Params.author | safeHTML }} + {{ else }} +  |  {{ .Site.Author.name | safeHTML }} + {{ end }} {{ end }} {{- if .Site.Params.staticman -}}  |   From 37d73ff83284a07df70e53cc44cabe0c0ab8e747 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Thu, 25 Apr 2019 11:09:47 +0200 Subject: [PATCH 14/25] Fix #261 --- i18n/br.yaml | 2 +- i18n/de.yaml | 2 +- i18n/en.yaml | 2 +- i18n/eo.yaml | 2 +- i18n/es.yaml | 2 +- i18n/fr.yaml | 2 +- i18n/it.yaml | 2 +- i18n/ja.yaml | 2 +- i18n/nb.yaml | 2 +- i18n/nl.yaml | 2 +- i18n/pl.yaml | 2 +- i18n/ru.yaml | 2 +- i18n/zh-CN.yaml | 2 +- i18n/zh-TW.yaml | 2 +- layouts/_default/list.html | 4 ++-- layouts/index.html | 4 ++-- layouts/partials/footer.html | 6 +----- layouts/partials/head.html | 4 ++-- layouts/partials/post_meta.html | 2 +- layouts/partials/seo/opengraph.html | 4 ++-- layouts/partials/staticman-comments.html | 4 ++-- 21 files changed, 26 insertions(+), 30 deletions(-) diff --git a/i18n/br.yaml b/i18n/br.yaml index 76dabc3..98cbc47 100644 --- a/i18n/br.yaml +++ b/i18n/br.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Hugo v{{ .Hugo.Version }} powered  •  Tema por Beautiful Jekyll adaptado para Beautiful Hugo' + translation: 'Hugo v{{ .Site.Hugo.Version }} powered  •  Tema por Beautiful Jekyll adaptado para Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/de.yaml b/i18n/de.yaml index d2774cf..be3a79a 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' + translation: 'Hugo v{{ .Site.Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/en.yaml b/i18n/en.yaml index a4c316e..ce90070 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' + translation: 'Hugo v{{ .Site.Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/eo.yaml b/i18n/eo.yaml index 8d56660..68540ca 100644 --- a/i18n/eo.yaml +++ b/i18n/eo.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Hugo v{{ .Hugo.Version }}-povigita  •  Haŭto de Beautiful Jekyll adaptiĝis al Beautiful Hugo' + translation: 'Hugo v{{ .Site.Hugo.Version }}-povigita  •  Haŭto de Beautiful Jekyll adaptiĝis al Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/es.yaml b/i18n/es.yaml index 2ce455d..6c0850f 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' + translation: 'Hugo v{{ .Site.Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/fr.yaml b/i18n/fr.yaml index ddac58d..ed85a9b 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Carbure avec Hugo v{{ .Hugo.Version }} •  Avec le Theme Beautiful Jekyll adapté en Beautiful Hugo' + translation: 'Carbure avec Hugo v{{ .Site.Hugo.Version }} •  Avec le Theme Beautiful Jekyll adapté en Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/it.yaml b/i18n/it.yaml index 543a726..4bf0305 100644 --- a/i18n/it.yaml +++ b/i18n/it.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Sviluppato con Hugo v{{ .Hugo.Version }}  •  Tema: Beautiful Jekyll adattato a Beautiful Hugo' + translation: 'Sviluppato con Hugo v{{ .Site.Hugo.Version }}  •  Tema: Beautiful Jekyll adattato a Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/ja.yaml b/i18n/ja.yaml index 2e6b869..f810b0b 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '起動力にHugo v{{ .Hugo.Version }}  •  テーマにBeautiful Jekyllに基づいているBeautiful Hugo' + translation: '起動力にHugo v{{ .Site.Hugo.Version }}  •  テーマにBeautiful Jekyllに基づいているBeautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/nb.yaml b/i18n/nb.yaml index 11002d6..cd12ec6 100644 --- a/i18n/nb.yaml +++ b/i18n/nb.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Kjører på Hugo v{{ .Hugo.Version }} •  Tema fra Beautiful Jekyll tilpasset til Beautiful Hugo' + translation: 'Kjører på Hugo v{{ .Site.Hugo.Version }} •  Tema fra Beautiful Jekyll tilpasset til Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/nl.yaml b/i18n/nl.yaml index ab51ec3..02993bb 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Hugo v{{ .Hugo.Version }}-aangedreven  •  Thema door Beautiful Jekyll aangepast voor Beautiful Hugo' + translation: 'Hugo v{{ .Site.Hugo.Version }}-aangedreven  •  Thema door Beautiful Jekyll aangepast voor Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/pl.yaml b/i18n/pl.yaml index cbc8efc..e3d4f8b 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'Hugo v{{ .Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' + translation: 'Hugo v{{ .Site.Hugo.Version }} powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo' # Navigation - id: toggleNavigation diff --git a/i18n/ru.yaml b/i18n/ru.yaml index 8b37143..e05bdb4 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: 'На базе Hugo v{{ .Hugo.Version }}  •  Тема Beautiful Hugo на базе Beautiful Jekyll' + translation: 'На базе Hugo v{{ .Site.Hugo.Version }}  •  Тема Beautiful Hugo на базе Beautiful Jekyll' # Navigation - id: toggleNavigation diff --git a/i18n/zh-CN.yaml b/i18n/zh-CN.yaml index ff6807f..9b104c3 100644 --- a/i18n/zh-CN.yaml +++ b/i18n/zh-CN.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '由 Hugo v{{ .Hugo.Version }} 强力驱动  •  主题 Beautiful Hugo 移植自 Beautiful Jekyll' + translation: '由 Hugo v{{ .Site.Hugo.Version }} 强力驱动  •  主题 Beautiful Hugo 移植自 Beautiful Jekyll' # Navigation - id: toggleNavigation diff --git a/i18n/zh-TW.yaml b/i18n/zh-TW.yaml index 17d9234..fea27b0 100644 --- a/i18n/zh-TW.yaml +++ b/i18n/zh-TW.yaml @@ -33,7 +33,7 @@ # Footer - id: poweredBy # Accepts HTML - translation: '由 Hugo v{{ .Hugo.Version }} 提供  •  主題 Beautiful Hugo 移植自 Beautiful Jekyll' + translation: '由 Hugo v{{ .Site.Hugo.Version }} 提供  •  主題 Beautiful Hugo 移植自 Beautiful Jekyll' # Navigation - id: toggleNavigation diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 164a75c..5e52b60 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -47,12 +47,12 @@ diff --git a/layouts/index.html b/layouts/index.html index 7be74c8..d7544e2 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -49,12 +49,12 @@ diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 65c5616..030f657 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -17,11 +17,7 @@ {{ end }} {{ if .Site.Params.rss }}
  • - {{ if .RSSLink }} - - {{ else }} - - {{ end }} + diff --git a/layouts/partials/head.html b/layouts/partials/head.html index fef8579..2c872b4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -57,11 +57,11 @@ {{- with .Site.Params.fb_app_id }} {{- end }} - + - {{ .Hugo.Generator -}} + {{ hugo.Generator -}} diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 61f6637..09c57d0 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -18,7 +18,7 @@ {{ end }} {{- if .Site.Params.staticman -}}  |   - {{ $slug := replace .URL "/" "" }} + {{ $slug := replace .relPermalink "/" "" }} {{ if .Site.Data.comments }} {{ $comments := index $.Site.Data.comments $slug }} {{ if $comments }} diff --git a/layouts/partials/seo/opengraph.html b/layouts/partials/seo/opengraph.html index 19e6ee0..9a14a07 100644 --- a/layouts/partials/seo/opengraph.html +++ b/layouts/partials/seo/opengraph.html @@ -10,6 +10,6 @@ {{- with .Site.Params.fb_app_id }} {{- end }} - + - \ No newline at end of file + diff --git a/layouts/partials/staticman-comments.html b/layouts/partials/staticman-comments.html index 8f54b02..3662c8e 100644 --- a/layouts/partials/staticman-comments.html +++ b/layouts/partials/staticman-comments.html @@ -1,6 +1,6 @@
    - {{ $slug := replace .URL "/" "" }} + {{ $slug := replace .relPermalink "/" "" }} {{ if .Site.Data.comments }} {{ $comments := index $.Site.Data.comments $slug }} @@ -36,7 +36,7 @@
    - + {{ if .Site.Params.staticman.recaptcha }} From c44ae13891440b3352947c0a0cd65378f6ffff27 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Thu, 25 Apr 2019 12:16:32 +0200 Subject: [PATCH 15/25] =?UTF-8?q?Fix=20typo:=20.relPermalink=20=E2=86=92?= =?UTF-8?q?=20.RelPermalink?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/post_meta.html | 2 +- layouts/partials/staticman-comments.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 09c57d0..f7e03d7 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -18,7 +18,7 @@ {{ end }} {{- if .Site.Params.staticman -}}  |   - {{ $slug := replace .relPermalink "/" "" }} + {{ $slug := replace .RelPermalink "/" "" }} {{ if .Site.Data.comments }} {{ $comments := index $.Site.Data.comments $slug }} {{ if $comments }} diff --git a/layouts/partials/staticman-comments.html b/layouts/partials/staticman-comments.html index 3662c8e..8d01894 100644 --- a/layouts/partials/staticman-comments.html +++ b/layouts/partials/staticman-comments.html @@ -1,6 +1,6 @@
    - {{ $slug := replace .relPermalink "/" "" }} + {{ $slug := replace .RelPermalink "/" "" }} {{ if .Site.Data.comments }} {{ $comments := index $.Site.Data.comments $slug }} @@ -36,7 +36,7 @@ - + {{ if .Site.Params.staticman.recaptcha }} From 5d23d2ac0d79c7224fe76b495f97d33086d84d00 Mon Sep 17 00:00:00 2001 From: ksunden Date: Tue, 30 Apr 2019 22:15:39 -0500 Subject: [PATCH 16/25] Add mastodon social icon --- data/beautifulhugo/social.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index cead546..f0c11f1 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -135,3 +135,9 @@ id = "500px" url = "https://500px.com/%s" title = "500px" icon = "fab fa-500px" + +[[social_icons]] +id = "mastodon" +url = "https://%s" +title = "Mastodon" +icon = "fab fa-mastodon" From b9aa300bac2532e5c2f4a943e674c8f247dafbd3 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Tue, 25 Jun 2019 11:24:50 +0200 Subject: [PATCH 17/25] Remove Google+ --- data/beautifulhugo/social.toml | 6 ------ exampleSite/config.toml | 1 - layouts/partials/share-links.html | 9 +-------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index cead546..c547ebb 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -10,12 +10,6 @@ url = "https://www.facebook.com/%s" title = "Facebook" icon = "fab fa-facebook" -[[social_icons]] -id = "googleplus" -url = "https://plus.google.com/%s" -title = "Google+" -icon = "fab fa-google-plus" - [[social_icons]] id = "github" url = "https://github.com/%s" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 22dbfb9..3b51f56 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -47,7 +47,6 @@ pygmentsCodefencesGuessSyntax = true website = "yourwebsite.com" email = "youremail@domain.com" facebook = "username" - googleplus = "+username" # or xxxxxxxxxxxxxxxxxxxxx github = "username" gitlab = "username" bitbucket = "username" diff --git a/layouts/partials/share-links.html b/layouts/partials/share-links.html index d264d1c..78fe91b 100644 --- a/layouts/partials/share-links.html +++ b/layouts/partials/share-links.html @@ -9,13 +9,6 @@
  • - -
  • - - - -
  • -
  • @@ -52,4 +45,4 @@
  • - {{ end }} \ No newline at end of file + {{ end }} From 79abb2e4d600600772b594d32e8434f61e83fcab Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Thu, 15 Aug 2019 20:27:27 +0200 Subject: [PATCH 18/25] Address changes introduced by hugo v0.57.0 see https://github.com/gohugoio/hugo/releases/tag/v0.57.0 --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index d7544e2..a6b7b27 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@ {{ end }}
    - {{ $pag := .Paginate (where .Data.Pages "Type" "post") }} + {{ $pag := .Paginate (where .Site.RegularPages "Type" "post") }} {{ range $pag.Pages }}
    From 11317542406ac8064978dcb81ad652bf2c623c45 Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Mon, 19 Aug 2019 15:16:50 +0200 Subject: [PATCH 19/25] Let's use `mainSections` when looking for relevant content for the home page --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index a6b7b27..9381c43 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@ {{ end }}
    - {{ $pag := .Paginate (where .Site.RegularPages "Type" "post") }} + {{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }} {{ range $pag.Pages }}
    From 20609b681b4b47c63341bd3d947e60dbf3677b24 Mon Sep 17 00:00:00 2001 From: Michael Romero Date: Thu, 5 Sep 2019 00:10:10 -0700 Subject: [PATCH 20/25] Change "showAuthor" to "hideAuthor", since show is the default behavior --- exampleSite/config.toml | 1 + layouts/partials/post_meta.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 894df8f..462290f 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -28,6 +28,7 @@ pygmentsCodefencesGuessSyntax = true socialShare = true delayDisqus = true showRelatedPosts = true +# hideAuthor = true # gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic" #[[Params.bigimg]] diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html index 70f52ba..a449767 100644 --- a/layouts/partials/post_meta.html +++ b/layouts/partials/post_meta.html @@ -11,7 +11,7 @@ {{ if .Site.Params.wordCount }}  |  {{ .WordCount }} {{ i18n "words" }} {{ end }} - {{ if .Site.Params.showAuthor }} + {{ if not .Site.Params.hideAuthor }} {{ if .Params.author }}  |  {{ .Params.author | safeHTML }} {{ else }} From fdd332f7e1923eac6dac8ddafe5507dd607e70fd Mon Sep 17 00:00:00 2001 From: Michael Romero Date: Thu, 5 Sep 2019 00:27:18 -0700 Subject: [PATCH 21/25] Adding mainSection = ["post","posts"] - required to show pages with "post" type in sections outside of "post" --- exampleSite/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 462290f..4b25bbd 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -16,6 +16,7 @@ pygmentsCodefencesGuessSyntax = true [Params] # homeTitle = "Beautiful Hugo Theme" # Set a different text for the header on the home page subtitle = "Build a beautiful and simple website in minutes" + mainSections = ["post","posts"] logo = "img/avatar-icon.png" # Expecting square dimensions favicon = "img/favicon.ico" dateFormat = "January 2, 2006" From b71c2754dc32bb8690fabe795c300a7432243191 Mon Sep 17 00:00:00 2001 From: Michael Romero Date: Thu, 5 Sep 2019 01:03:35 -0700 Subject: [PATCH 22/25] Added a "video" type for post preview --- layouts/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/index.html b/layouts/index.html index 9381c43..d72364a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -22,6 +22,9 @@ {{ if .Params.image }} {{ .Title }} {{ end }} + {{ if .Params.video }} + {{ partial "post_meta.html" . }} From 071625aad73175f81f7867bb8e937fa603d9ff02 Mon Sep 17 00:00:00 2001 From: Martin Funk Date: Fri, 30 Aug 2019 11:53:11 +0200 Subject: [PATCH 23/25] social_icons slack.com --- data/beautifulhugo/social.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index dacd4d4..5021193 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -34,6 +34,12 @@ url = "https://twitter.com/%s" title = "Twitter" icon = "fab fa-twitter" +[[social_icons]] +id = "slack" +url = "https://%s.slack.com/" +title = "Slack" +icon = "fab fa-slack" + [[social_icons]] id = "reddit" url = "https://reddit.com/u/%s" From 137b64f7ce853afced2e9399ec931e4e4716ec40 Mon Sep 17 00:00:00 2001 From: Martin Funk Date: Fri, 13 Sep 2019 08:36:55 +0200 Subject: [PATCH 24/25] add slack to exampleSite --- exampleSite/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4b25bbd..ef59cba 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -69,6 +69,7 @@ pygmentsCodefencesGuessSyntax = true telegram = "username" 500px = "username" weibo = "username" + slack = "username" [[menu.main]] name = "Blog" From cbd5195d5d2be57037ac0d8656871906a1831e00 Mon Sep 17 00:00:00 2001 From: Michael Romero Date: Fri, 20 Sep 2019 22:41:59 -0700 Subject: [PATCH 25/25] Add Mastodon to config example --- exampleSite/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 4b25bbd..7ec82b9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -69,6 +69,7 @@ pygmentsCodefencesGuessSyntax = true telegram = "username" 500px = "username" weibo = "username" + mastodon = "url" [[menu.main]] name = "Blog"