summaryrefslogtreecommitdiffstats
path: root/hugolib/permalinks_test.go
AgeCommit message (Collapse)Author
2014-11-02Change permalink validation and substitution.Austin Ziegler
2014-05-01permitting empty files again. Fixing some tests to now pass.spf13
2014-04-26Fix permalinks to subdomainstummychow
If you don't have access to the root domain of your site (eg a GitHub project page) and you try to generate custom permalinks, they must begin with a slash. Go's URL resolution library sees the leading slash and thinks "this URL starts at the root", just like a filesystem - so it discards your subdomain and maps all custom permalinks from the root of your site. Fine if you control the root domain, not so useful if you don't. Removing the check for a leading slash fixes this problem. You can now specify custom permalinks that do not start with a slash, and they will map safely regardless of what subdomain you upload the generated site under. Tests have been updated for this commit so that they continue to function.
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>