diff --git a/docs/userGuide/syntax/dates.md b/docs/userGuide/syntax/dates.md index bf930cc05d..c50b95612a 100644 --- a/docs/userGuide/syntax/dates.md +++ b/docs/userGuide/syntax/dates.md @@ -36,10 +36,10 @@ The default output format is `"ddd D MMM"` e.g. Fri 6 Mar {{ njcode('base1 | date(format2, 0)') }} :glyphicon-arrow-right: {{ base1 | date(format2, 0) }}
{{ njcode('base1 | date(format2, 10)') }} :glyphicon-arrow-right: {{ base1 | date(format2, 10) }}
-#### Page variables -Dates can be supplied using [page variables](../reusingContents.html#variables) for convenience. +#### Nunjucks variables +Dates can be supplied using [Nunjucks variables](../reusingContents.html#variables) for convenience. -Inside `variables.md` or referencing page: +Inside the `.md` file of a page: ``` {% raw %}{% set date_pagevar = "2020-03-06" %}{% endraw %} ``` diff --git a/packages/cli/test/functional/test_site/_markbind/variables.md b/packages/cli/test/functional/test_site/_markbind/variables.md index 651c833c20..a654e45ed0 100644 --- a/packages/cli/test/functional/test_site/_markbind/variables.md +++ b/packages/cli/test/functional/test_site/_markbind/variables.md @@ -9,6 +9,5 @@ Global Variable Overriding Included Variable Global Variable Global Variable Overriding Page Variable - 2019-01-01 {{ base2 | date("ddd D MMM", 10) }} diff --git a/packages/cli/test/functional/test_site/index.md b/packages/cli/test/functional/test_site/index.md index 3e3e30736d..c081eda5b9 100644 --- a/packages/cli/test/functional/test_site/index.md +++ b/packages/cli/test/functional/test_site/index.md @@ -71,6 +71,10 @@ Page Variable with {{ global_variable }} **Test Page Variable and Included Variable Integrations** +{% set outerNunjucksVariable %} +Outer Nunjucks Variable +{% endset %} + # Heading with multiple keywords diff --git a/packages/cli/test/functional/test_site/sub_site/nested_sub_site/_markbind/variables.md b/packages/cli/test/functional/test_site/sub_site/nested_sub_site/_markbind/variables.md new file mode 100644 index 0000000000..4a19d29999 --- /dev/null +++ b/packages/cli/test/functional/test_site/sub_site/nested_sub_site/_markbind/variables.md @@ -0,0 +1,4 @@ + +To inject this HTML segment in your MarkBind files, use {{ example }} where you want to place it. +More generally, surround the segment's id with double curly braces. + \ No newline at end of file diff --git a/packages/cli/test/functional/test_site/testPageVariablesInInclude.md b/packages/cli/test/functional/test_site/testPageVariablesInInclude.md index f64540ffcc..ffba3e422a 100644 --- a/packages/cli/test/functional/test_site/testPageVariablesInInclude.md +++ b/packages/cli/test/functional/test_site/testPageVariablesInInclude.md @@ -1,3 +1,3 @@ **Outer Page Variable Should Not Leak Into Inner Pages** -{{ nested_page_variable or "Outer Page Variable Should Not Leak Into Inner Pages" }} +{{ outerNunjucksVariable or "Outer Page Variable Should Not Leak Into Inner Pages" }} diff --git a/packages/cli/test/functional/test_site_special_tags/_markbind/variables.md b/packages/cli/test/functional/test_site_special_tags/_markbind/variables.md new file mode 100644 index 0000000000..4a19d29999 --- /dev/null +++ b/packages/cli/test/functional/test_site_special_tags/_markbind/variables.md @@ -0,0 +1,4 @@ + +To inject this HTML segment in your MarkBind files, use {{ example }} where you want to place it. +More generally, surround the segment's id with double curly braces. + \ No newline at end of file diff --git a/packages/core/template/default/_markbind/variables.md b/packages/core/template/default/_markbind/variables.md index aab37f29a9..4a19d29999 100644 --- a/packages/core/template/default/_markbind/variables.md +++ b/packages/core/template/default/_markbind/variables.md @@ -1,6 +1,4 @@ -To inject this HTML segment in your markbind files, use {{ example }} where you want to place it. +To inject this HTML segment in your MarkBind files, use {{ example }} where you want to place it. More generally, surround the segment's id with double curly braces. - - - \ No newline at end of file + \ No newline at end of file diff --git a/packages/core/template/minimal/_markbind/variables.md b/packages/core/template/minimal/_markbind/variables.md index aab37f29a9..4a19d29999 100644 --- a/packages/core/template/minimal/_markbind/variables.md +++ b/packages/core/template/minimal/_markbind/variables.md @@ -1,6 +1,4 @@ -To inject this HTML segment in your markbind files, use {{ example }} where you want to place it. +To inject this HTML segment in your MarkBind files, use {{ example }} where you want to place it. More generally, surround the segment's id with double curly braces. - - - \ No newline at end of file + \ No newline at end of file