hugo: github.com/gohugoio/hugo/config/privacy Index | Files

package privacy

import "github.com/gohugoio/hugo/config/privacy"

Index

Package Files

privacyConfig.go

type Config Uses

type Config struct {
    Disqus          Disqus
    GoogleAnalytics GoogleAnalytics
    Instagram       Instagram
    Twitter         Twitter
    Vimeo           Vimeo
    YouTube         YouTube
}

Config is a privacy configuration for all the relevant services in Hugo.

func DecodeConfig Uses

func DecodeConfig(cfg config.Provider) (pc Config, err error)

DecodeConfig creates a privacy Config from a given Hugo configuration.

type Disqus Uses

type Disqus struct {
    Service `mapstructure:",squash"`
}

Disqus holds the privacy configuration settings related to the Disqus template.

type GoogleAnalytics Uses

type GoogleAnalytics struct {
    Service `mapstructure:",squash"`

    // Enabling this will disable the use of Cookies and use Session Storage to Store the GA Client ID.
    UseSessionStorage bool

    // Enabling this will make the GA templates respect the
    // "Do Not Track" HTTP header. See  https://www.paulfurley.com/google-analytics-dnt/.
    RespectDoNotTrack bool

    // Enabling this will make it so the users' IP addresses are anonymized within Google Analytics.
    AnonymizeIP bool
}

GoogleAnalytics holds the privacy configuration settings related to the Google Analytics template.

type Instagram Uses

type Instagram struct {
    Service `mapstructure:",squash"`

    // If simple mode is enabled, a static and no-JS version of the Instagram
    // image card will be built.
    Simple bool
}

Instagram holds the privacy configuration settings related to the Instagram shortcode.

type Service Uses

type Service struct {
    Disable bool
}

Service is the common values for a service in a policy definition.

type Twitter Uses

type Twitter struct {
    Service `mapstructure:",squash"`

    // When set to true, the Tweet and its embedded page on your site are not used
    // for purposes that include personalized suggestions and personalized ads.
    EnableDNT bool

    // If simple mode is enabled, a static and no-JS version of the Tweet will be built.
    Simple bool
}

Twitter holds the privacy configuration settingsrelated to the Twitter shortcode.

type Vimeo Uses

type Vimeo struct {
    Service `mapstructure:",squash"`

    // If simple mode is enabled, only a thumbnail is fetched from i.vimeocdn.com and
    // shown with a play button overlaid. If a user clicks the button, he/she will
    // be taken to the video page on vimeo.com in a new browser tab.
    Simple bool
}

Vimeo holds the privacy configuration settingsrelated to the Vimeo shortcode.

type YouTube Uses

type YouTube struct {
    Service `mapstructure:",squash"`

    // When you turn on privacy-enhanced mode,
    // YouTube won’t store information about visitors on your website
    // unless the user plays the embedded video.
    PrivacyEnhanced bool
}

YouTube holds the privacy configuration settingsrelated to the YouTube shortcode.

Package privacy imports 2 packages (graph) and is imported by 20 packages. Updated 2019-08-13. Refresh now. Tools for package owners.