Move GOVUK Frontend templates from node_modules

`node_modules` isn't available in a live
environment so the `.njk` templates we're now
using from GOVUK Frontend need to go in the repo'
code.

Adds them in a new `app/templates/vendor` folder
to match how we do that in
`app/assets/stylesheets`.
This commit is contained in:
Tom Byers
2019-11-25 13:04:23 +00:00
parent 0ff6054dac
commit 73d846cc61
9 changed files with 282 additions and 2 deletions

View File

@@ -720,7 +720,7 @@ def init_jinja(application):
repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
template_folders = [
os.path.join(repo_root, 'app/templates'),
os.path.join(repo_root, 'node_modules/govuk-frontend'),
os.path.join(repo_root, 'app/templates/vendor/govuk-frontend'),
]
jinja_loader = jinja2.FileSystemLoader(template_folders)
application.jinja_loader = jinja_loader