hugo/hugolib
Jonathan Anderson e72ce89aaf Move s.prepUrl() before prepending BaseUrl.
When we have an absolute menu url specified in the config file
(e.g., `menu: { main: { name: "News", url: "/news" } }`),
its menu entry is generated by prefixing it with the BaseUrl.
The result is then run through prepUrl(), which uses helpers.Urlize to
convert urls such as 'My First Link' to 'my-first-link'.

The behaviour is backwards: we do not want to run helpers.Urlize on the
BaseUrl, only on the absolute component. Currently, a BaseUrl such as
'http://my.edu/ENG101' will be converted to 'http://my.edu/eng101',
resulting in broken links in all of my menus.

This commit switches the URL prep and BaseUrl prepending actions around. I
would argue that these URLs shouldn't be run through prepUrl anyway
because the site developer has specified them explicitly in a config file
and might be surprised for, e.g., URLs to change case, but that's another
commit for another time.
2015-01-26 01:03:18 +01:00
..
author.go Added AuthorList, Author, AuthorSocial, SiteSocial, Image and Video structs 2014-12-18 22:26:10 -05:00
benchmark_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
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 Implement HasMenuCurrent and IsMenuCurrent for Nodes 2014-11-01 22:34:49 -04:00
menu_test.go Move s.prepUrl() before prepending BaseUrl. 2015-01-26 01:03:18 +01:00
node.go Fix RelPermalink() and Urls in menus vs canonifyUrls 2015-01-23 14:13:00 +01:00
page.go Fix for page.GetParam() for JSON and TOML maps 2015-01-24 15:25:44 +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 fix tags not being in lowercase, #491 2014-09-11 17:03:31 -04:00
page_test.go Fix for page.GetParam() for JSON and TOML maps 2015-01-24 15:25:44 +01:00
page_time_integration_test.go permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00
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 Add sort and grouping functions for publish date and param of Page 2014-11-01 22:41:04 -04:00
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 Change permalink validation and substitution. 2014-11-02 00:43:01 -04:00
permalinks_test.go Change permalink validation and substitution. 2014-11-02 00:43:01 -04:00
planner.go New targets & new renderers and write methods [WIP] 2014-11-04 00:39:37 -05:00
redis.cn.md Adding benchmark for parsing pages using unicode. 2013-08-09 17:36:32 -07:00
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 Move s.prepUrl() before prepending BaseUrl. 2015-01-26 01:03:18 +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 Fix permalink functionality, which was broken in 62dd1d4. 2014-05-12 15:47:52 -04:00
sitemap.go Add Sitemaps config values handling 2014-05-09 23:11:33 -04:00
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 Big refactor of how source files are used. Also added default destination extension option. 2014-10-16 20:20:09 -04:00
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 permitting empty files again. Fixing some tests to now pass. 2014-05-01 14:11:56 -04:00