Skip to content

Commit

Permalink
Ensure templates use layouts/govuk to include the gov template
Browse files Browse the repository at this point in the history
This is in anticaption of further layouts being shared. I can predict
the need for layouts/start, layouts/question, layouts/error and layouts/done
for example.

By having the govuk base template also be imported using
layouts/govuk_template means we keep consistency in how we extend
layouts.
  • Loading branch information
michaeldfallen committed Aug 10, 2017
1 parent 1ad72b7 commit 72e33a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/test-app/views/HelloWorld.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "govuk_template.html" %}
{% extends "layouts/govuk_template.html" %}
{% from "patterns/header.njk" import header %}

{% block head -%}
Expand Down
2 changes: 1 addition & 1 deletion src/sources/govukTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
//Walk the tree to get back to the root of the module
const root = path.resolve(require.resolve('govuk_template_jinja'), '../../../');

const templates = path.resolve(root, 'views/layouts');
const templates = path.resolve(root, 'views');
const assets = path.resolve(root, 'assets');
const images = path.resolve(root, 'assets/images');
const javascripts = path.resolve(root, 'assets/javascripts');
Expand Down

0 comments on commit 72e33a4

Please sign in to comment.