Mercurial > piecrust2
diff tests/servings/test_theme.yaml @ 675:3df808b133f8
internal: Improve how theme configuration is validated and merged.
* Add default theme config up-front so it benefits from the usual validation.
* Add an explicit `use_default_theme_content` setting.
* Add/fix unit tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 06 Mar 2016 23:49:41 -0800 |
parents | |
children | 45ad976712ec |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/servings/test_theme.yaml Sun Mar 06 23:49:41 2016 -0800 @@ -0,0 +1,21 @@ +--- +url: / +config: + site: + title: "Some Test" +in: + theme/theme_config.yml: "name: testtheme" + theme/pages/_index.md: "This is {{site.title}} by {{name}}" + theme/templates/default.html: "THEME: {{content}}" +out: "THEME: This is Some Test by testtheme" +--- +url: /foo.html +config: + site: + title: "Some Test" + foo: bar +in: + pages/foo.md: "This is: {{foo}} by {{name}}" + theme/theme_config.yml: "name: testtheme" +out: "This is: bar by testtheme" +