Skip to content

Commit

Permalink
Add message to the readme template
Browse files Browse the repository at this point in the history
And call it above the table of arguments block
  • Loading branch information
Jani Kraner committed Jun 18, 2018
1 parent 12a8543 commit 3f375f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/layouts/readme.njk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% set nunjucksHtmlUsageMessage = '**If you’re using Nunjucks macros in production be aware that using `html` arguments, or ones ending with `Html` can be a [security risk](https://en.wikipedia.org/wiki/Cross-site_scripting). More about it in the [Nunjucks documentation](https://mozilla.github.io/nunjucks/api.html#user-defined-templates-warning).**' %}
{% set componentName = componentPath %}
{% set componentNameHuman = componentName | replace("-", " ") | capitalize %}
{% set componentGuidanceLink = componentGuidanceLink | default('https://govuk-design-system-production.cloudapps.digital/components/' + componentName)%}
Expand Down Expand Up @@ -48,8 +49,11 @@ app.use('/assets', express.static(path.join(__dirname, '/node_modules/govuk-fron
<p>If you are using Nunjucks,then macros take the following arguments</p>

{% from "table/macro.njk" import govukTable %}

{{ nunjucksHtmlUsageMessage }}
{% block componentArguments %}
{% endblock %}
{{ nunjucksHtmlUsageMessage }}

<h3>Setting up Nunjucks views and paths</h3>
<p>Below is an example setup using express configure views:</p>
Expand Down

0 comments on commit 3f375f6

Please sign in to comment.