hugo/hugolib
bep 1b42dc572a Fix RelPermalink() and Urls in menus vs canonifyUrls
canonifyUrls=true, RelPermalink and baseUrl with sub-path did not work.

This fixes that by adding a check for canonifyUrl=trues=true in RelPermalink().

So given

- baseUrl "http://somehost.com/sub/"
- the path "some-path/file.html"

For canonifyUrls=false RelPermalink() returns "/sub/some-path/file.html"
For canonifyUrls=true RelPermalink() returns "/some-path/file.html"

In the last case, the Url will be made absolute and clickable in a later step.

This commit also makes the menu urls defined in site config releative. To make them work with canonifying of urls, the context root is prepended if canonifying is turned off.

Fixes #519
Fixes #711
2015-01-23 14:13:00 +01:00
..
author.go Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video structs 2014-12-18 22:26:10 -05:00
benchmark_test.go
handler_base.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
handler_file.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
handler_meta.go refactor handlers to use types instead of structs. 2014-11-20 12:43:34 -05:00
handler_page.go Register rstHandler to restore experimental reST support 2015-01-21 06:41:19 -07:00
hugo.go Fix the Hugo.Generator tag so it can be used 2015-01-19 08:26:06 +01:00
media.go Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video structs 2014-12-18 22:26:10 -05:00
menu.go
menu_test.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
node.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
page.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
page_permalink_test.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
page_taxonomy_test.go
page_test.go Fix "hugo new" EOF error with an archetype file without the final EOL 2015-01-10 19:48:35 +01:00
page_time_integration_test.go
pageGroup.go Fix GroupBy function issues 2014-11-13 22:48:58 -05:00
pageGroup_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
pageSort.go
pagesPrevNext.go Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
pagesPrevNext_test.go Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
path_separators_test.go Correct spelling of two test files: seperators → separators 2015-01-11 02:21:51 -07:00
path_separators_windows_test.go Correct typo in hugolib/path_separators_windows_test.go 2015-01-12 13:15:04 -07:00
permalinks.go
permalinks_test.go
planner.go
redis.cn.md
rss_test.go Various fixes in RSS feed generation 2014-11-17 18:55:40 -05:00
shortcode.go Protect the innerShortCodeCache by a RW lock 2015-01-21 19:13:11 +01:00
shortcode_test.go Fix issue with nested shortcodes 2015-01-15 12:21:15 +01:00
shortcodeparser.go Shortcode rewrite, take 2 2014-11-17 18:32:06 -05:00
shortcodeparser_test.go Shortcode rewrite, take 2 2014-11-17 18:32:06 -05:00
site.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
site_show_plan_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
site_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
site_url_test.go Fix various Windows-issues 2014-12-09 09:43:15 -05:00
siteinfo_test.go
sitemap.go
sitemap_test.go Updating tests to use new Targets & Writers and switch to using Afero.MemMapFs for more accurate tests. 2014-11-04 00:41:47 -05:00
summary.go
taxonomy.go Adding Prev/Next functionality to all lists of pages (sections, taxonomies, etc) 2014-11-27 23:15:25 -05:00
taxonomy_test.go