From 5a919aaa2780b01efc27b0957715e0740b193abb Mon Sep 17 00:00:00 2001 From: Shyam Pather Date: Wed, 2 Jul 2025 15:31:53 -0700 Subject: [PATCH] Make theme compatible with latest Hugo (v0.147.9) Changes: - replaced `.Site.RSSLink` with `"index.xml" | absURL` - replaced `.Site.Social` with `.Site.Params.Social` and moved social definitions in the example site's config.yaml to live under `params`. - replaced Twitter Simple shortcode with X shortcode - replaced `paginate` in config.yaml with `pagination/pagerSize` --- exampleSite/config.yaml | 24 +++++++++++------------ exampleSite/content/posts/rich-content.md | 4 ++-- layouts/partials/footer.html | 6 +++--- layouts/partials/navigation.html | 4 ++-- layouts/partials/social.html | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 2e65d414..d5924464 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -6,14 +6,15 @@ theme: hugo-theme-mini # Default content language, support en (English) / zh (Chinese) / nl (Dutch) / fr (French) / es (Spanish) / da (Danish), default 'en' defaultContentLanguage: en -# !!! exampleSite only, you may need to delete the line: `themesDir: ../../` +# !!! exampleSite only, you may need to delete the line: `themesDir: ../../` themesDir: ../../ hasCJKLanguage: true permalinks: posts: /posts/:title/ -paginate: 3 +pagination: + pagerSize: 3 googleAnalytics: your-google-analytics-id disqusShortname: your-disqus-shortname @@ -33,15 +34,6 @@ markup: renderer: unsafe: true -# Social links in footer, support github,twitter,stackoverflow,facebook -social: - # e.g. - github: your-github-link - twitter: your-twitter-link - stackoverflow: your-stackoverflow-link - # facebook: your-facebook-link - - # Site parameters params: # Site Author @@ -51,6 +43,14 @@ params: # Site Description, used in HTML meat description: My Blog + # Social links in footer, support github,twitter,stackoverflow,facebook + social: + # e.g. + github: your-github-link + twitter: your-twitter-link + stackoverflow: your-stackoverflow-link + # facebook: your-facebook-link + ########################################### # Optional Configuration @@ -71,7 +71,7 @@ params: # To hidden post summary in home page, you could set `hiddenPostSummaryInHomePage: true`, default is `false` hiddenPostSummaryInHomePage: false # Website copyright, default: '© Copyright 2021 ❤️ {params.author}' - copyright: '' + copyright: '' # Extra links in navigation links: diff --git a/exampleSite/content/posts/rich-content.md b/exampleSite/content/posts/rich-content.md index c1ea8712..0e2af125 100644 --- a/exampleSite/content/posts/rich-content.md +++ b/exampleSite/content/posts/rich-content.md @@ -22,9 +22,9 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme --- -## Twitter Simple Shortcode +## X Shortcode -{{< twitter_simple 1085870671291310081 >}} +{{< x user="DesignReviewed" id="1085870671291310081" >}}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 27a75187..f6a179ad 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,5 @@