hugo/hugolib
Bjørn Erik Pedersen 60dfb9a6e0 Add support for multiple staticDirs
This commit adds support for multiple statDirs both on the global and language level.

A simple `config.toml` example:

```bash
staticDir = ["static1", "static2"]
[languages]
[languages.no]
staticDir = ["staticDir_override", "static_no"]
baseURL = "https://example.no"
languageName = "Norsk"
weight = 1
title = "På norsk"

[languages.en]
staticDir2 = "static_en"
baseURL = "https://example.com"
languageName = "English"
weight = 2
title = "In English"
```

In the above, with no theme used:

the English site will get its static files as a union of "static1", "static2" and "static_en". On file duplicates, the right-most version will win.
the Norwegian site will get its static files as a union of "staticDir_override" and "static_no".

This commit also concludes the Multihost support in #4027.

Fixes #36
Closes #4027
2017-11-17 11:01:46 +01:00
..
testdata hugolib: Clean up a benchmark 2017-01-03 17:08:59 +01:00
404_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
alias.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
alias_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
author.go Revert the "standardize author data" 2016-09-18 19:16:39 +02:00
case_insensitive_test.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
config.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
config_test.go Add support for multiple config files via --config a.toml,b.toml,c.toml 2017-08-09 20:13:02 +02:00
datafiles_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
disableKinds_test.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
embedded_shortcodes_test.go Use Chroma as new default syntax highlighter 2017-09-25 08:59:02 +02:00
gitinfo.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
handler_base.go all: Fix spelling 2017-08-07 20:19:24 +02:00
handler_file.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
handler_meta.go Clean up lint in various packages 2017-09-29 16:23:16 +02:00
handler_page.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
handler_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
hugo_info.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
hugo_sites.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
hugo_sites_build.go Only re-render the view(s) you're working on 2017-10-14 13:40:43 +02:00
hugo_sites_build_test.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
hugo_sites_multihost_test.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
media.go Fix copyright headers in source files 2015-12-07 19:57:01 +01:00
menu.go hugolib: Finish menu vs section content pages 2017-02-20 22:20:02 +01:00
menu_old_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
menu_test.go tpl: Rework to handle both text and HTML templates 2017-04-02 23:13:10 +02:00
multilingual.go Add multilingual multihost support 2017-11-17 11:01:46 +01:00
node_as_page_test.go all: Update textual references in Go source to point to gohugoio/hugo 2017-06-13 18:47:17 +02:00
page.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
page_collections.go hugolib: Pre-allocate some slices 2017-11-11 09:39:43 +01:00
page_collections_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
page_output.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
page_paths.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
page_paths_test.go media, hugolib: Support extension-less media types 2017-06-20 11:04:14 +02:00
page_permalink_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
page_taxonomy_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
page_test.go Make sure Date and PublishDate is always set to a value if one is available 2017-10-13 13:18:23 +02:00
page_time_integration_test.go all: Update textual references in Go source to point to gohugoio/hugo 2017-06-13 18:47:17 +02:00
pageCache.go hugolib: Implement "related content" 2017-09-06 00:20:02 +02:00
pageCache_test.go hugolib: Implement "related content" 2017-09-06 00:20:02 +02:00
pageGroup.go hugolib: Pre-allocate some slices 2017-11-11 09:39:43 +01:00
pageGroup_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pages_related.go hugolib: Fix typo in aquired 2017-09-07 16:21:33 +02:00
pages_related_test.go Clean up lint in various packages 2017-09-29 16:23:16 +02:00
pageSort.go hugolib: Enhance .Param to permit arbitrarily nested parameter references 2017-02-19 08:50:08 +01:00
pageSort_test.go hugolib: Implement "related content" 2017-09-06 00:20:02 +02:00
pagesPrevNext.go huglib: Add even more missing GoDoc 2016-04-07 16:05:23 +02:00
pagesPrevNext_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
pagination.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
pagination_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
path_separators_test.go hugolib, output: Incorporate suffix and type in layout resolve 2017-03-27 15:43:56 +02:00
permalinker.go hugolib: Add optional outputFormat to Ref/RelRef 2017-04-04 23:09:01 +02:00
permalinks.go hugolib: Extend the sections API 2017-07-04 09:11:49 +02:00
permalinks_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
robotstxt_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
rss_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
scratch.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
scratch_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
shortcode.go output: Support templates per site/language 2017-07-04 09:12:44 +02:00
shortcode_test.go Add support for height argument to figure shortcode 2017-10-29 20:46:57 +01:00
shortcodeparser.go all: Remove dead code 2016-10-13 13:51:16 +02:00
shortcodeparser_test.go all: Refactor to nonglobal Viper, i18n etc. 2017-02-17 17:15:26 +01:00
site.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
site_benchmark_test.go Simplify Site benchmarks 2017-10-18 16:46:55 +02:00
site_output.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
site_output_test.go tpl/tplimpl: Fix escaped HTML Go 1.9 multioutput issue (#3880) 2017-09-13 12:32:06 +02:00
site_render.go Add support for multiple staticDirs 2017-11-17 11:01:46 +01:00
site_sections.go hugolib: Simplify Page.Eq 2017-08-17 09:43:39 +02:00
site_sections_test.go hugolib: Simplify Page.Eq 2017-08-17 09:43:39 +02:00
site_test.go Make sure Date and PublishDate is always set to a value if one is available 2017-10-13 13:18:23 +02:00
site_url_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
siteJSONEncode_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
sitemap.go hugolib: Fix some more Golint warnings 2016-03-23 10:10:28 +01:00
sitemap_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
taxonomy.go hubolib: Embed Page in WeightedPage 2017-05-09 23:58:25 +02:00
taxonomy_test.go hugolib: Add some more taxonomy permalinks test cases 2017-11-07 23:42:47 +01:00
template_engines_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
template_test.go all: Update import paths to gohugoio/hugo 2017-06-13 18:42:45 +02:00
testhelpers_test.go hugolib: Disable shaky leaktest on CI 2017-06-13 21:22:47 +02:00
translations.go all: Update textual references in Go source to point to gohugoio/hugo 2017-06-13 18:47:17 +02:00