summaryrefslogtreecommitdiffstats
path: root/hugolib/page_paths.go
AgeCommit message (Collapse)Author
2017-06-20media, hugolib: Support extension-less media typesBjørn Erik Pedersen
This change is motivated by Netlify's `_redirects` files, which is currently not possible to generate with Hugo. This commit adds a `Delimiter` field to media type, which defaults to ".", but can be blanked out. Fixes #3614
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-06-06hugolib: Fix disablePathToLower regressionBjørn Erik Pedersen
Fixes #3374
2017-05-10hugolib: The deprecated Extension, Now and TargetPath will now ERRORBjørn Erik Pedersen
2017-04-27hugolib: Avoid index.md in /index/index.htmlBjørn Erik Pedersen
Hugo 0.20 broke some sites that grouped their blog post and images together in subfolders. This commit re-introduces that behaviour: * If the file base name resolves to the same as the base name for the output type (i.e. "index" for HTML), the user probably meant it, so we treat that as an `uglyURL`, i.e. `my-blog-post-1.md`=> `/my-blog-post-1/index.html` * The main use case for this is to group blog post and images together. * Note that for the top level folder there will be a potential name conflict with a `section` `index.html` (if enabled) * This issue will not be relevant for subfolders in sections * Hugo will soon add support for nested sections, but we will have to find a way to separate them from the rest (`/content/_mysubsection` maybe). Fixes #3396
2017-03-27hugolib: Fix panic for Permalink in 404 etc. templatesBjørn Erik Pedersen
2017-03-27hugolib: Add OutputFormats with permalinks to PageBjørn Erik Pedersen
2017-03-27hugolib: Speed up URL handlingBjørn Erik Pedersen
2017-03-27Rename OutputType to OutputFormatBjørn Erik Pedersen
2017-03-27hugolib: Refactor/-work the permalink/target path logicBjørn Erik Pedersen
This is a pretty fundamental change in Hugo, but absolutely needed if we should have any hope of getting "multiple outputs" done. This commit's goal is to say: * Every file target path is created by `createTargetPath`, i.e. one function for all. * That function takes every page and site parameter into account, to avoid fragile string parsing to uglify etc. later on. * The path creation logic has full test coverage. * All permalinks, paginator URLs etc. are then built on top of that same logic. Fixes #1252 Fixes #2110 Closes #2374 Fixes #1885 Fixes #3102 Fixes #3179 Fixes #1641 Fixes #1989