Commit Graph

18 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen d392893cd7
Misc config loading fixes
The main motivation behind this is simplicity and correctnes, but the new small config library is also faster:

```
BenchmarkDefaultConfigProvider/Viper-16         	  252418	      4546 ns/op	    2720 B/op	      30 allocs/op
BenchmarkDefaultConfigProvider/Custom-16        	  450756	      2651 ns/op	    1008 B/op	       6 allocs/op
```

Fixes #8633
Fixes #8618
Fixes #8630
Updates #8591
Closes #6680
Closes #5192
2021-06-14 17:00:32 +02:00
Bjørn Erik Pedersen d90e37e0c6 all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
2020-12-03 13:12:58 +01:00
Josh Gerdes edc5c4741c tpl: Add Do Not Track (dnt) option to Vimeo shortcode
Added a Vimeo EnableDNT privacy option to the Hugo config. This will enable the Vimeo 'Do Not Track' flag when either Vimeo shortcode tempalte options are used. When enabled, it will force the Vimeo player to be blocked from tracking any session data, including all cookies and stats.

Fixes #7700
2020-10-02 23:02:38 +02:00
Bjørn Erik Pedersen 9e57182705
tests: Convert from testify to quicktest 2019-08-12 13:26:32 +02:00
Cameron Moore daffeec30d config: Fix golint issues
config/configProvider.go:54:9: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary)
config/privacy/privacyConfig.go:99:1: exported function DecodeConfig should have comment or be unexported
config/services/servicesConfig.go:64:1: exported function DecodeConfig should have comment or be unexported
2018-09-07 08:25:51 +02:00
Alexandros 65deb72dc4 tplimpl: Remove speakerdeck shortcode
Fixes #4830
2018-06-09 11:13:36 +02:00
Alex 07b96d16e8 Fixes #4798 2018-05-31 18:05:38 +02:00
Alexandros 8de5324479 Add vimeo_simple
Fixes #4749
2018-05-30 00:48:36 +02:00
Bjørn Erik Pedersen a51945ea4b Add no-cookie variants of the Google Analytics templates
The current full set of options for GA is now:

```toml
[privacy]
[privacy.googleAnalytics]
disable = false
respectDoNotTrack = true
anonymizeIP = true
useSessionStorage = true
```

Fixes #4775
2018-05-25 15:56:10 +02:00
Bjørn Erik Pedersen 448081b840
Remove youtube_simple for now
We need to revisit and complete that.

See #4751
2018-05-25 11:16:23 +02:00
Bjørn Erik Pedersen 1f1d955b56
Add anonymizeIP to GA privacy config
See #4751
2018-05-25 10:53:39 +02:00
Bjørn Erik Pedersen 9753cb59f1
Support DNT in Twitter shortcode for GDPR
Fixes #4765
2018-05-24 12:25:52 +02:00
Bjørn Erik Pedersen 3bfe8f4be6
tpl: Alias tweet shortode to twitter
See #4765
2018-05-24 11:40:47 +02:00
Bjørn Erik Pedersen 9ad46a2035 Add instagram_simple shortcode
Fixes #4748
2018-05-23 16:52:08 +02:00
Bjørn Erik Pedersen 88e3568680 Add YouTube shortcode simple mode
Adapted from the work of @onedrawingperday.

See #4616
2018-05-21 21:56:42 +02:00
Bjørn Erik Pedersen 5f24a2c047 Add PrivacyEnhanced mode for YouTube to the GDPR Policy
See #4616
2018-05-21 16:49:00 +02:00
Bjørn Erik Pedersen 710142016b Add RespectDoNotTrack to GDPR privacy policy for Google Analytics
See #4616
2018-05-21 13:16:43 +02:00
Bjørn Erik Pedersen 0bbdef986d config: Add the foundation for GDPR privacy configuration
See #4616
2018-05-21 00:41:42 +02:00