package services
import "github.com/gohugoio/hugo/config/services"
Index ¶
Types ¶
type Config ¶
type Config struct {
Disqus Disqus
GoogleAnalytics GoogleAnalytics
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
}
Config is a services configuration for all the relevant services in Hugo.
func DecodeConfig ¶
DecodeConfig creates a services Config from a given Hugo configuration.
type Disqus ¶
type Disqus struct {
// A Shortname is the unique identifier assigned to a Disqus site.
Shortname string
}
Disqus holds the functional configuration settings related to the Disqus template.
type GoogleAnalytics ¶
type GoogleAnalytics struct {
// The GA tracking ID.
ID string
}
GoogleAnalytics holds the functional configuration settings related to the Google Analytics template.
type Instagram ¶
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 // 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 // this is no longer used by the embedded instagram shortcode
}
Instagram holds the functional configuration settings related to the Instagram shortcodes.
type RSS ¶
type RSS struct {
// Limit the number of pages.
Limit int
}
RSS holds the functional configuration settings related to the RSS feeds.
type Twitter ¶
type Twitter struct {
// The Simple variant of Twitter is decorated with a basic set of inline styles.
// This means that if you want to provide your own CSS, you want
// to disable the inline CSS provided by Hugo.
DisableInlineCSS bool
}
Twitter holds the functional configuration settings related to the Twitter shortcodes. Deprecated in favor of X in v0.141.0.
type X ¶
type X struct {
// The Simple variant of X is decorated with a basic set of inline styles.
// This means that if you want to provide your own CSS, you want
// to disable the inline CSS provided by Hugo.
DisableInlineCSS bool
}
X holds the functional configuration settings related to the X shortcodes.
Source Files ¶
- Version
- v0.153.4 (latest)
- Published
- Dec 28, 2025
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 4 months ago –
Tools for package owners.