From 7108c2ebfd7d9a459255679d776da0ecfbb52053 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Tue, 9 Jul 2024 21:37:16 -0700 Subject: [PATCH 1/4] Add about social icon (#495) --- data/beautifulhugo/social.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data/beautifulhugo/social.toml b/data/beautifulhugo/social.toml index 5f868987..a2946d47 100644 --- a/data/beautifulhugo/social.toml +++ b/data/beautifulhugo/social.toml @@ -208,3 +208,9 @@ id = "angellist" url = "https://www.angel.co/p/%s" title = "AngelList" icon = "fab fa-angellist" + +[[social_icons]] +id = "about" +url = "%s" +title = "About" +icon = "fas fa-at" From acc1dd2c2c0227bcc5162381aa286e2e1c0b192e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9lemy=20Pal=C3=A9ologue?= <31370477+BarthPaleologue@users.noreply.github.com> Date: Wed, 10 Jul 2024 06:37:50 +0200 Subject: [PATCH 2/4] Add Cusdis support (#489) * Add cusdis support * update example website config.toml --- exampleSite/hugo.toml | 1 + layouts/_default/single.html | 17 ++++++++++++++++- static/css/main.css | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index dda5e178..f0d8e264 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -30,6 +30,7 @@ pygmentsCodefencesGuessSyntax = true socialShare = true delayDisqus = true showRelatedPosts = true +# cusdisID = "XXX" # Get your App id from cusdis.com # 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" # disclaimerText = "The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way." diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b5718e77..7e4c43d1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -61,7 +61,22 @@

{{ i18n "seeAlso" }}

{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }} - {{ if .Site.DisqusShortname }} + + {{ if .Site.Params.cusdisID }} + +
+ + + {{ end }} + + {{ if .Site.DisqusShortname }} {{ if .Site.Params.delayDisqus }}
diff --git a/static/css/main.css b/static/css/main.css index b485b538..39d502f7 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -153,6 +153,10 @@ figure:not(.dark) img, img.white { } } +#cusdis_thread { + margin-top: 30px; +} + /* --- Navbar --- */ .navbar-custom { From 89594f9af5f49e121e6327c182b5256d67cc8fa5 Mon Sep 17 00:00:00 2001 From: Jesus Christian Cruz Acono Date: Tue, 9 Jul 2024 22:41:20 -0600 Subject: [PATCH 3/4] Update nav.html (#493) added logo manager for asset, if is assets, optimize the logo in Hugo pipelines --- layouts/partials/nav.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 07580450..5594b294 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -66,7 +66,12 @@ From a48a6fa2dd47f4d52a96187785a1147050306b87 Mon Sep 17 00:00:00 2001 From: Guillaume Rivier Date: Wed, 10 Jul 2024 22:57:24 +0900 Subject: [PATCH 4/4] Site.Author is deprecated, use Params.author instead (#481) * Site.Author is deprecated, use Params.author instead * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update footer.html * Update ci.yml * Update ci.yml * Update footer.html * Update ci.yml * Update ci.yml --------- Co-authored-by: Henry Schreiner --- .github/workflows/ci.yml | 13 +++++++------ exampleSite/hugo.toml | 2 +- layouts/partials/footer.html | 19 +++++++++++-------- layouts/partials/head.html | 2 +- layouts/partials/post_meta.html | 2 +- layouts/partials/seo/structured/article.html | 2 +- layouts/partials/seo/structured/post.html | 4 ++-- layouts/partials/seo/twitter.html | 2 +- layouts/partials/share-links.html | 2 +- 9 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c35640b..118a4259 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,12 +37,13 @@ jobs: # For maximum backward compatibility with Hugo modules HUGO_ENVIRONMENT: production HUGO_ENV: production - run: | - hugo \ - --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" \ - -s "./exampleSite/" \ - --themesDir "../../" + run: > + hugo + --minify + --baseURL "${{ steps.pages.outputs.base_url }}/" + -s "./exampleSite/" + --themesDir "../../" + --logLevel info - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index f0d8e264..4744a0e7 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -47,7 +47,7 @@ pygmentsCodefencesGuessSyntax = true # src = "img/hexagon.jpg" # desc = "Hexagon" -[Author] +[Params.author] # Set only your "username" for default hosts and full URLs otherwise (e.g., "https://MyGitLab.org/username") name = "Some Person" website = "yourwebsite.com" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 74994a67..ead747de 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,6 +1,9 @@ {{ if eq .Type "page" }} {{ partial "page_meta.html" . }} {{ end }} + {{- if and (not (isset .Site.Params "author")) (isset .Site "author") -}} + {{ errorf "Please move [author] to [params.author]; Hugo has deprecated the former." }} + {{- end -}}