]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
config: Add struct tags to deprecated and unused fields
authorJoe Mooring <joe.mooring@veriphor.com>
Sat, 8 Nov 2025 20:39:42 +0000 (12:39 -0800)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 9 Nov 2025 11:59:46 +0000 (12:59 +0100)
This will remove these fields from the output of newDocsHelper.

config/privacy/privacyConfig.go
config/services/servicesConfig.go

index 900f73540b6a15fdb88c0f969756f5090760734e..e837cedab35e9c168fcaebde34ca2dc9b5644a86 100644 (file)
@@ -30,7 +30,7 @@ type Config struct {
        Disqus          Disqus
        GoogleAnalytics GoogleAnalytics
        Instagram       Instagram
-       Twitter         Twitter // deprecated in favor of X in v0.141.0
+       Twitter         Twitter `json:"-"` // deprecated in favor of X in v0.141.0
        Vimeo           Vimeo
        YouTube         YouTube
        X               X
index f9d5e1a6e6cede46a91f9afb37740a9bd1ed466d..21dd7a6d9625ca9d78c6113acfc40e7be2e01eaa 100644 (file)
@@ -26,12 +26,12 @@ const (
        rssLimitKey        = "rssLimit"
 )
 
-// Config is a privacy configuration for all the relevant services in Hugo.
+// Config is a services configuration for all the relevant services in Hugo.
 type Config struct {
        Disqus          Disqus
        GoogleAnalytics GoogleAnalytics
-       Instagram       Instagram
-       Twitter         Twitter // deprecated in favor of X in v0.141.0
+       Instagram       Instagram `json:"-"` // the embedded instagram shortcode no longer uses this
+       Twitter         Twitter   `json:"-"` // deprecated in favor of X in v0.141.0
        X               X
        RSS             RSS
 }
@@ -53,12 +53,12 @@ type Instagram struct {
        // The Simple variant of the Instagram is decorated with Bootstrap 4 card classes.
        // This means that if you use Bootstrap 4 or want to provide your own CSS, you want
        // to disable the inline CSS provided by Hugo.
-       DisableInlineCSS bool
+       DisableInlineCSS bool // this is no longer used by the embedded instagram shortcode
 
        // App or Client Access Token.
        // If you are using a Client Access Token, remember that you must combine it with your App ID
        // using a pipe symbol (<APPID>|<CLIENTTOKEN>) otherwise the request will fail.
-       AccessToken string
+       AccessToken string // this is no longer used by the embedded instagram shortcode
 }
 
 // Twitter holds the functional configuration settings related to the Twitter shortcodes.