Commit graph

5 commits

Author SHA1 Message Date
Joel Scoble
4b9e4c90d9 #462 fix, remove leading and trailing dashes from urlized slug. includes test changes 2014-10-07 17:05:11 -04:00
Lorenzo Bolla
e98f0014f2 Allow to use filename in permalinks 2014-05-28 17:59:49 -04:00
tummychow
2e954d8551 Fix permalinks to subdomains
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.
2014-04-26 23:01:28 -06:00
spf13
44d57fdc0c Reorganize helpers 2013-12-05 09:29:41 -05:00
Phil Pennock
07978e4a49 configurable permalinks support
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-18 13:32:56 -08:00