summaryrefslogtreecommitdiffstats
path: root/hugolib/config.go
AgeCommit message (Collapse)Author
2017-06-20hugolib: Add disableAliasesBjørn Erik Pedersen
Note that even with this setting enabled, the aliases themselves are preserved on the pages. The big motivation for this change is to be able to use the alias definitions to generate `.htaccess` or Netlify's `_redirect` files with server-side redirects. Fixes #3613
2017-06-13Run gofmt to get imports in line vs gohugoio/hugoBjørn Erik Pedersen
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-05-31hugolib: Respect disableKinds=["sitemap"]Bjørn Erik Pedersen
Fixes #3544
2017-05-10commands, hugolib: Deprecate disable404, disableRSS, disableSitemap, ↵Bjørn Erik Pedersen
disableRobotsTXT Use disableKinds instead. Fixes #3345
2017-05-06hugolib: Add default config for ignoreFilesChase Adams
2017-03-27Remove the now superflous defaultExtensionBjørn Erik Pedersen
And some other unsed fields and methods.
2017-03-10hugolib: Default rssLimit to unlimitedCameron Moore
Fixes #3145
2017-02-17hugolib: Make RSS item limit configurableCameron Moore
Add a new rssLimit site configuration option with default of 15. Prior to this fix, you could create your own RSS feed to override the default limit of 15, but we still had a hardcoded limit of 50 items set in `hugolib.renderRSS()`. With this option in place, the `range first 15 .Data.Pages` logic is no longer hardcoded into the embedded RSS template. Because the size of the slice passed to the template is now limited to rssLimit instead of 50, this commit is a breaking change for sites with a custom RSS template that expects more than 15 items. Fixes #3035
2017-02-17all: Refactor to nonglobal Viper, i18n etc.Bjørn Erik Pedersen
This is a final rewrite that removes all the global state in Hugo, which also enables the use if `t.Parallel` in tests. Updates #2701 Fixes #3016
2016-11-07commands, tpl: Get rid of repeating viper accessesAlbert Nigmatzianov
* all: Delete some blank lines * commands, tpl: Get rid of repeating viper accesses
2016-11-01Add GitInfoBjørn Erik Pedersen
This commit adds a `GitInfo` object to `Page` if `EnableGitInfo` is set. It then also sets `Lastmod` for the given `Page` to the author date provided by Git. The Git integrations should be fairly performant, but it adds "some time" to the build, somewhat depending on the Git history size. If you want, you can run without during development and turn it on when deploying to the live server: `hugo --enableGitInfo`. Fixes #2102
2016-10-24all: Unify case of config variable namesAlbert Nigmatzianov
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI.
2016-09-16tpl: Add EnableMissingTranslationPlaceholders optiondigitalcraftsman
Fixes #2451
2016-09-15Make paginate settings configurable per languageBjørn Erik Pedersen
Fixes #2449
2016-09-06Remove unused Multilingual Viper defaultBjørn Erik Pedersen
See #2312
2016-09-06Render main content language in root by defaultBjørn Erik Pedersen
Fixes #2312
2016-09-06Make it possible to configure Blackfroday per languageBjørn Erik Pedersen
See #2309
2016-09-06Make the config loading testableBjørn Erik Pedersen
This is needed to verify #2309, but it closes a big hole in Hugo's automated tests. The loading of the config is now moved to `hugolib` and the same default settings are now used in production and tests. As Viper now uses Afero as its filesystem, we now can write fairly complete integration tests with ease. See #2309
2014-04-05Hugo config abstracted into a general purpose config library called "Viper".spf13
Hugo casting now in own library called "cast"
2014-03-31Adding support for logging & verbose logging. Consolidation of error ↵spf13
handling. Integration of jWalterWeatherman library. Fixed #137
2014-02-27Reorganization of helpers. Centralized Url/Path logic. Fixed #175.spf13
2014-01-29gofmt all go codeTibor Vass
2014-01-13Add `canonifyurls` config option.Phil Pennock
Be able to inhibit AbsURL canonicalization of content, on a site configuration basis. Advantages of being able to inhibit this include making it easier to rendering on other hostnames, and being able to include resources on http or https depending on how this page was retrieved, avoiding mixed-mode client complaints without adding latency for plain http.
2013-12-28Fix static file change detection on Windows.Egon Elbre
Fixed windows uses different filepath separator. The filepath.ToSlash shouldn't be used, because it can cause errors in filepath suffix and prefix testing since "c:\a" isn't a prefix of "c:/a/b/c".
2013-11-18configurable permalinks supportPhil Pennock
A sample config.yaml for a site might contain: ```yaml permalinks: post: /:year/:month/:title/ ``` Then, any article in the `post` section, will have the canonical URL formed via the permalink specification given. Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-11-12Truncated; .Site.Params; First functionPhil Pennock
* Add `.Truncated` bool to each page; will be set true if the `.Summary` is truncated and it's worth showing a "more" link of some kind. * Add `Params` to the site config, defining `.Site.Params` accessible to each page; this lets the site maintainer associate arbitrary data with names, on a site-wide basis. * Provide a `First` function to templates: * Use-case: `{{range First 5 .Site.Recent}}` or anything else which is a simple iterable provided by hugolib * Tests by me for `.Truncated` and `First` Also @noahcampbell contributed towards this: * Add UnitTest for `.Site.Params`: > Digging into this test case a bit more, I'm realizing that we need > to create a param test case to ensure that for each type we render > (page, index, homepage, rss, etc.) that the proper fields are > represented. This will help us refactor without fear in the > future. Sample config.yaml: ```yaml title: "Test site" params: Subtitle: "More tests always good" AuthorName: "John Doe" SidebarRecentLimit: 5 ``` Signed-off-by: Noah Campbell <noahcampbell@gmail.com>
2013-09-12Normalize paths within hugoNoah Campbell
filepath was used inconsistently throughout the hugolib. With the introduction of source and target modules, all path are normalized to "/". This simplifies the processing of paths. It does mean that contributors need to be aware of using path/filepath in any module other than source or target is not recommended. The current exception is hugolib/config.go
2013-08-12Use / for template names regardless of platform.Noah Campbell
The path seperator was causing templates to not be loaded on windows. Now all template names use / internally.
2013-07-26Adding support for destination dir, split out staticspf13
2013-07-19Default is now pretty urls (without .html)spf13
Adding --uglyurls option to retain previous behavior
2013-07-11proper BaseUrl handling (if has trailing slash or not)spf13
2013-07-11Accidentally left in debugging codespf13
2013-07-11Now support for config files as yaml, json or tomlspf13
2013-07-06sanity: move from json to yamltycho garen
2013-07-04adding hugospf13