summaryrefslogtreecommitdiffstats
path: root/tpl
AgeCommit message (Collapse)Author
2018-06-03tpl/strings: Remove overflow check in strings.RepeatBjørn Erik Pedersen
The test fails on 32 bit systems. Let it panic instead.
2018-06-03tpl/strings: Adjust the overflow validation in strings.RepeatBjørn Erik Pedersen
This now matches the validation in the stdlib, but we return an error instead.
2018-06-03tpl: Add strings.RepeatDavid E. Wheeler
2018-05-31Fixes #4798Alex
2018-05-30tpl: Remove frameborder attr YT iframe + CSS fixesAlex
2018-05-30Fix vimeo_simple thumb scalingAlex
2018-05-30Add vimeo_simpleAlexandros
Fixes #4749
2018-05-27fix typo instagram_simpleAlex
2018-05-25Fix GA anonymizeIp orderBjørn Erik Pedersen
2018-05-25Add no-cookie variants of the Google Analytics templatesBjørn Erik Pedersen
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-25tpl: Remove the shortcode assets for nowBjørn Erik Pedersen
Not in use.
2018-05-25tpl: Adjust instagram_simple marginsBjørn Erik Pedersen
2018-05-25Remove youtube_simple for nowBjørn Erik Pedersen
We need to revisit and complete that. See #4751
2018-05-25Add anonymizeIP to GA privacy configBjørn Erik Pedersen
See #4751
2018-05-24Fix broken testBjørn Erik Pedersen
2018-05-24Support DNT in Twitter shortcode for GDPRBjørn Erik Pedersen
Fixes #4765
2018-05-24tpl: Alias tweet shortode to twitterBjørn Erik Pedersen
See #4765
2018-05-23Regenerate embedded templatesBjørn Erik Pedersen
See #4761
2018-05-23Fix youtube_simple thumb scalingAlexandros
Fixes #4761
2018-05-23Add instagram_simple shortcodeBjørn Erik Pedersen
Fixes #4748
2018-05-23Remove the id from youtube_simpleBjørn Erik Pedersen
For now, anyway. See #4751
2018-05-23Fix some recently broken embedded templatesBjørn Erik Pedersen
And add tests for them. Fixes #4757
2018-05-22Move the privacy config into a parentBjørn Erik Pedersen
See #4751
2018-05-22tpl: Add another class and an id to youtube_simpleBjørn Erik Pedersen
To provide some more styling options. See #4616
2018-05-21Make the simple mode YouTube links schemalessBjørn Erik Pedersen
See #4616
2018-05-21Add YouTube shortcode simple modeBjørn Erik Pedersen
Adapted from the work of @onedrawingperday. See #4616
2018-05-21Add PrivacyEnhanced mode for YouTube to the GDPR PolicyBjørn Erik Pedersen
See #4616
2018-05-21Add RespectDoNotTrack to GDPR privacy policy for Google AnalyticsBjørn Erik Pedersen
See #4616
2018-05-21tpl/tplimpl: Adjust GA templatesBjørn Erik Pedersen
See #4616
2018-05-21tpl/tplimpl/embedded: Wrap the relevant templates with the privacy policy ↵Bjørn Erik Pedersen
disable check See #4616
2018-05-05tpl/tplimpl: Move README one level upBjørn Erik Pedersen
2018-05-04tpl/tplimpl: Extract internal templatesBjørn Erik Pedersen
Having them in separate files should make maintainance easier. When adding new or making changes to the templates: ```bash mage generate ``` This will get the Go code in sync. Fixes #4457
2018-04-22tpl/path: Add path.Ext, path.Dir and path.BaseBjørn Erik Pedersen
2018-04-21tpl/os: Make fileExist use the same filesystem as readFileBjørn Erik Pedersen
Fixes #4633
2018-04-17Updated GetCSV error message (#4636)Lucas Liberacki
2018-04-15tpl/urls: Add anchorize template funcBjørn Erik Pedersen
2018-04-15tpl/path: Add path.JoinBjørn Erik Pedersen
2018-04-15tpl: Add path.Split template funcBjørn Erik Pedersen
2018-04-02Add support for a content dir set per languageBjørn Erik Pedersen
A sample config: ```toml defaultContentLanguage = "en" defaultContentLanguageInSubdir = true [Languages] [Languages.en] weight = 10 title = "In English" languageName = "English" contentDir = "content/english" [Languages.nn] weight = 20 title = "På Norsk" languageName = "Norsk" contentDir = "content/norwegian" ``` The value of `contentDir` can be any valid path, even absolute path references. The only restriction is that the content dirs cannot overlap. The content files will be assigned a language by 1. The placement: `content/norwegian/post/my-post.md` will be read as Norwegian content. 2. The filename: `content/english/post/my-post.nn.md` will be read as Norwegian even if it lives in the English content folder. The content directories will be merged into a big virtual filesystem with one simple rule: The most specific language file will win. This means that if both `content/norwegian/post/my-post.md` and `content/english/post/my-post.nn.md` exists, they will be considered duplicates and the version inside `content/norwegian` will win. Note that translations will be automatically assigned by Hugo by the content file's relative placement, so `content/norwegian/post/my-post.md` will be a translation of `content/english/post/my-post.md`. If this does not work for you, you can connect the translations together by setting a `translationKey` in the content files' front matter. Fixes #4523 Fixes #4552 Fixes #4553
2018-03-20tpl/transform: Add a comments test for RemarshalBjørn Erik Pedersen
See #4521
2018-03-16Add a way to merge pages by languageBjørn Erik Pedersen
As an example: ```html {{ $pages := .Site.RegularPages | lang.Merge $frSite.RegularPages | lang.Merge $enSite.RegularPages }} ``` Will "fill in the gaps" in the current site with, from left to right, content from the French site, and lastly the English. Fixes #4463
2018-02-22Properly handle -DEV suffix when comparing Hugo versionsBjørn Erik Pedersen
See #4443
2018-02-22Make ge, le etc. work with the Hugo Version numberBjørn Erik Pedersen
This means that you can do something ala: ```html {{ if ge .Hugo.Version "0.36" }}Reasonable new Hugo version!{{ end }} ``` The intented use is feature toggling, but please note that it will take some time and Hugo versions until this can be trusted. It does not work in older Hugo versions. Fixes #4443
2018-02-10tpl/transform: Add template func for TOML/JSON/YAML docs examples conversionBjørn Erik Pedersen
Usage: ```html {{ "title = \"Hello World\"" | transform.Remarshal "json" | safeHTML }} ``` Fixes #4389
2018-02-09Add "target" and "rel" parameters to figure shortcodeKaushal Modi
Also: - Remove unnecessary space from `figure` tag if no class is specified. - Update related tests. - Add test cases for the changes made to the figure shortcode. - Document the newly added target and rel parameters - Add more detail to the documentation of all figure shortcode parameters.
2018-02-09Use more canonical "twitter:image" property, not "twitter:image:src"Kaushal Modi
This change is made in the "twitter_cards" internal template. References: - https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary-card-with-large-image - https://twittercommunity.com/t/twitter-image-src-or-twitter-image/16085/7
2018-02-05tpl: Ensure site templates can override theme templatesCameron Moore
The tplimpl package was misusing the TemplateLookupDescriptor.WorkingDir field from the output package. By incorrectly setting it to the theme directory instead of the site root, the user is unable to override theme templates in some situations. Fixes #3505
2018-01-29tpl: Update Twitter card to also consider images in .ResourcesBjørn Erik Pedersen
The new lookup order: 1) Page.Params.images if set 2) Image resources: images with name "feature" (priority), "cover", "thumbnail" 3) Site.Params.images if set Fixes #4349
2018-01-27tpl/collections: Seed random on init onlyliguoqinjim
2017-12-29tpl/transform: Do not unescape input to highlightBjørn Erik Pedersen
Fixes #4179