Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update govuk-eleventy-plugin dependency (pre-release) #200

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/_components/example/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
</li>
</ul>
<div class="govuk-tabs__panel" id="{{ params.example }}-preview">
<iframe class="app-example__frame" data-module="app-example-frame" src="{{ examplePath | url }}"></iframe>
<iframe class="app-example__frame" data-module="app-example-frame" src="{{ examplePath }}"></iframe>
<p class="app-example__toolbar">
<a class="app-example__new-window" href="{{ examplePath | url }}" target="_blank">Open this example in a new tab</a>
<a class="app-example__new-window" href="{{ examplePath }}" target="_blank">Open this example in a new tab</a>
</p>
</div>
<div class="govuk-tabs__panel govuk-tabs__panel--hidden" id="{{ params.example }}-html">
Expand Down
4 changes: 2 additions & 2 deletions docs/_layouts/example-full-width.njk
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
{% endblock %}

{% block scripts %}
<script src="{{ '/assets/iframeResizer.contentWindow.js' | url }}"></script>
<script src="{{ '/assets/x-govuk/all.js' | url }}"></script>
<script src="/assets/iframeResizer.contentWindow.js"></script>
<script src="/assets/x-govuk/all.js"></script>
<script>
window.GOVUKPrototypeComponents.initAll()
</script>
Expand Down
4 changes: 2 additions & 2 deletions docs/_layouts/example.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
{% endblock %}

{% block scripts %}
<script src="{{ '/assets/iframeResizer.contentWindow.js' | url }}"></script>
<script src="{{ '/assets/x-govuk/all.js' | url }}"></script>
<script src="/assets/iframeResizer.contentWindow.js"></script>
<script src="/assets/x-govuk/all.js"></script>
<script>
window.GOVUKPrototypeComponents.initAll()
</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/sub-navigation.njk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "layouts/sub-navigation.njk" %}

{% block scripts %}
<script src="{{ '/assets/iframeResizer.js' | url }}"></script>
<script src="/assets/iframeResizer.js"></script>
<script>
iFrameResize({}, `[data-module="app-example-frame"]`)
</script>
Expand Down
2 changes: 2 additions & 0 deletions docs/assets/sass/settings.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$govuk-brand-colour: #2288aa;
$govuk-font-family: system-ui, sans-serif;
2 changes: 1 addition & 1 deletion docs/data-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ description: Use data attributes to help guide users during user research.

{% for page in collections["data-attributes"] %}

- [{{ page.data.title }}]({{ page.url | url }}) – {{ page.data.description }}
- [{{ page.data.title }}]({{ page.url }}) – {{ page.data.description }}

{% endfor %}
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ startButton:
{% for item in collections.homepage %}
<section class="govuk-grid-column-one-third-from-desktop govuk-!-margin-bottom-8">
<h2 class="govuk-heading-m govuk-!-margin-bottom-2">
<a class="govuk-link--no-visited-state" href="{{ item.url | url }}">{{ item.data.title | smart }}</a>
<a class="govuk-link--no-visited-state" href="{{ item.url }}">{{ item.data.title | smart }}</a>
</h2>
<p class="govuk-body">{{ item.data.description | markdown("inline") }}</p>
</section>
Expand Down
13 changes: 5 additions & 8 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ const getComponentContent = (componentName) => {
module.exports = function (eleventyConfig) {
// Plugins
eleventyConfig.addPlugin(govukEleventyPlugin, {
brandColour: '#28a',
fontFamily: 'system-ui, sans-serif',
icons: {
mask: 'https://raw.githubusercontent.com/x-govuk/logo/main/images/x-govuk-mask-icon.svg?raw=true',
shortcut:
Expand All @@ -31,13 +29,12 @@ module.exports = function (eleventyConfig) {
url: 'https://x-govuk.github.io/#projects',
name: 'X-GOVUK projects'
},
url: process.env.GITHUB_ACTIONS
? 'https://x-govuk.github.io/govuk-prototype-components/'
: '/',
url:
process.env.GITHUB_ACTIONS &&
'https://x-govuk.github.io/govuk-prototype-components/',
stylesheets: ['/styles/application.css'],
header: {
organisationLogo: 'x-govuk',
organisationName: 'X-GOVUK',
logotype: 'x-govuk',
productName: 'Prototype Components',
search: {
indexPath: '/search.json',
Expand Down Expand Up @@ -135,6 +132,6 @@ module.exports = function (eleventyConfig) {
layouts: '_layouts',
includes: '_components'
},
pathPrefix: process.env.GITHUB_ACTIONS ? '/govuk-prototype-components' : '/'
pathPrefix: process.env.GITHUB_ACTIONS && '/govuk-prototype-components'
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@11ty/eleventy": "^2.0.1",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@x-govuk/govuk-eleventy-plugin": "^5.0.3",
"@x-govuk/govuk-eleventy-plugin": "x-govuk/govuk-eleventy-plugin",
"@x-govuk/govuk-prototype-components": "file:./",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
Expand Down