hugo/hugolib
bep beaa8b1bca Add support for URLs relative to context root
Setting `RelativeURLs` to `true` will make all relative URLs in the site *really* relative.

And will do so with speed.

So:

In `/post/myblogpost.html`:

`/mycss.css` becomes `../mycss.css`

The same in `/index.html` will become:

`./mycss.css` etc.

Note that absolute URLs will not be touched (either external resources, or URLs constructed with `BaseURL`).

The speediness is about the same as before:

```
benchmark                    old ns/op     new ns/op     delta
BenchmarkAbsURL              17462         18164         +4.02%
BenchmarkAbsURLSrcset        18842         19632         +4.19%
BenchmarkXMLAbsURLSrcset     18643         19313         +3.59%
BenchmarkXMLAbsURL           9283          9656          +4.02%

benchmark                    old allocs     new allocs     delta
BenchmarkAbsURL              24             28             +16.67%
BenchmarkAbsURLSrcset        29             32             +10.34%
BenchmarkXMLAbsURLSrcset     27             30             +11.11%
BenchmarkXMLAbsURL           12             14             +16.67%

benchmark                    old bytes     new bytes     delta
BenchmarkAbsURL              3154          3404          +7.93%
BenchmarkAbsURLSrcset        2376          2573          +8.29%
BenchmarkXMLAbsURLSrcset     2569          2763          +7.55%
BenchmarkXMLAbsURL           1888          1998          +5.83%

```

Fixes #1104
Fixes #622
Fixes #937
Fixes #157
2015-05-16 00:11:44 +02:00
..
author.go
benchmark_test.go
datafiles_test.go
handler_base.go
handler_file.go
handler_meta.go
handler_page.go Very experimental support for mmark 2015-05-08 22:05:41 -04:00
hugo.go
media.go
menu.go
menu_test.go Fix IsMenuCurrent for SectionPagesMenu 2015-05-09 20:53:58 +02:00
node.go Add Lastmod field 2015-05-15 13:09:30 +02:00
page.go Add Lastmod field 2015-05-15 13:09:30 +02:00
page_permalink_test.go
page_taxonomy_test.go
page_test.go
page_time_integration_test.go
pageGroup.go
pageGroup_test.go
pageSort.go
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go Fix paginator with uglyurls 2015-05-10 15:23:36 +02:00
pagination_test.go Fix paginator with uglyurls 2015-05-10 15:23:36 +02:00
path_separators_test.go Update test logs for uniformity and consistency 2015-05-08 22:27:00 -04:00
path_separators_windows_test.go Update test logs for uniformity and consistency 2015-05-08 22:27:00 -04:00
permalinks.go
permalinks_test.go
planner.go
redis.cn.md
rss_test.go
scratch.go
scratch_test.go
shortcode.go
shortcode_test.go Update test logs for uniformity and consistency 2015-05-08 22:27:00 -04:00
shortcodeparser.go
shortcodeparser_test.go
site.go Add support for URLs relative to context root 2015-05-16 00:11:44 +02:00
site_show_plan_test.go
site_test.go
site_url_test.go
siteinfo_test.go
sitemap.go
sitemap_test.go
summary.go
taxonomy.go Allow to reverse taxonomy entries. 2015-05-12 18:26:40 +02:00
taxonomy_test.go