hugo/hugolib
Bjørn Erik Pedersen 3eb313fef4 Simplify .Site.GetPage etc.
This commit is a follow up to a recent overhaul of the GetPage/ref/relref implemenation.

The most important change in this commit is the update to `.Site.GetPage`:

* To reduce the amount of breakage in the wild to its minimum, I have reworked .Site.GetPage with some rules:

* We cannot support more than 2 arguments, i.e. .Site.GetPage "page" "posts" "mypage.md" will now throw an error. I think this is the most uncommon syntax and should be OK. It is an easy fix to change the above to .Site.GetPage "/posts/mypage.md" or similar.
* .Site.GetPage "home", .Site.GetPage "home" "" and .Site.GetPage "home" "/" will give you the home page. This means that if you have page in root with the name home.md you need to do .Site.GetPage "/home.md" or similar

This commit also fixes some multilingual issues, most notable it is now possible to do cross-language ref/relref lookups by prepending the language code to the path, e.g. `/jp/posts/mypage.md`.

This commit also reverts the site building tests related to this to "Hugo 0.44 state", to get better control of the changes made.

Closes #4147
Closes #4727
Closes #4728
Closes #4728
Closes #4726
Closes #4652
2018-07-18 00:07:20 +02:00
..
filesystems hugolib: Fix static filesystem for themed multihost sites 2018-07-12 12:18:56 +02:00
pagemeta
paths
testdata
testsite/content
404_test.go
alias.go
alias_test.go
author.go
case_insensitive_test.go
config.go hugolib: Only set 'allThemes' if there are themes in the config file 2018-07-15 16:13:48 +02:00
config_test.go hugolib: Only set 'allThemes' if there are themes in the config file 2018-07-15 16:13:48 +02:00
datafiles_test.go
disableKinds_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
embedded_shortcodes_test.go
embedded_templates_test.go
fileInfo.go
gitinfo.go
hugo_info.go
hugo_info_test.go
hugo_sites.go
hugo_sites_build.go Flush partialCached cache on rebuilds 2018-07-11 20:40:04 +02:00
hugo_sites_build_failures_test.go
hugo_sites_build_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
hugo_sites_multihost_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
hugo_themes_test.go
language_content_dir_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
media.go
menu.go
menu_test.go
multilingual.go
orderedMap.go
orderedMap_test.go
page.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
page_bundler.go
page_bundler_capture.go
page_bundler_capture_test.go
page_bundler_handlers.go
page_bundler_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
page_collections.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
page_collections_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
page_output.go media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
page_paths.go media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
page_paths_test.go media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
page_permalink_test.go
page_resource.go
page_taxonomy_test.go
page_test.go Add a newScratch template func 2018-07-06 17:51:38 +02:00
page_time_integration_test.go
page_without_content.go
pageCache.go
pageCache_test.go
pageGroup.go
pageGroup_test.go
pages_language_merge.go
pages_language_merge_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
pages_related.go
pages_related_test.go
pageSort.go
pageSort_test.go
pagesPrevNext.go
pagesPrevNext_test.go
pagination.go
pagination_test.go media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
path_separators_test.go
permalinker.go
permalinks.go
permalinks_test.go
prune_resources.go
resource_chain_test.go resource: Fix resources.Concat for transformed resources 2018-07-12 19:36:12 +02:00
robotstxt_test.go
rss_test.go
shortcode.go media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
shortcode_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
shortcodeparser.go
shortcodeparser_test.go
site.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
site_benchmark_test.go
site_output.go
site_output_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
site_render.go media: Allow multiple file suffixes per media type 2018-07-10 22:13:52 +02:00
site_sections.go Revert "Consider root and current section's content type if set in front matter" 2018-07-09 10:29:18 +02:00
site_sections_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
site_stats_test.go
site_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
site_url_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
siteJSONEncode_test.go
sitemap.go
sitemap_test.go
taxonomy.go
taxonomy_test.go Simplify .Site.GetPage etc. 2018-07-18 00:07:20 +02:00
template_engines_test.go
template_test.go
testhelpers_test.go
translations.go