You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/styles/page-template/index.md
+59-45Lines changed: 59 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,17 @@ To change the components that are included in the page template by default, set
81
81
{% endraw %}
82
82
```
83
83
84
-
### Options
84
+
### Update the `<html>` element
85
+
86
+
#### `htmlClasses` (Variable)
87
+
88
+
Add a class to the `<html>` element.
89
+
90
+
#### `htmlLang` (Variable)
91
+
92
+
Set the language of the whole document. If your `<title>` and `<main>` element are in a different language to the rest of the page, use `htmlLang` to set the language of the rest of the page.
93
+
94
+
### Update the `<head>` element
85
95
86
96
#### `assetPath` (Variable)
87
97
@@ -91,70 +101,74 @@ Specify a path to the <a href="https://frontend.design-system.service.gov.uk/imp
91
101
92
102
Set the domain for assets where an absolute URL is required, for example the Open Graph image.
93
103
94
-
#### `beforeContent` (Block)
104
+
#### `head` (Block)
95
105
96
-
Add content that needs to appear outside `<main>` element.
97
-
For example: The [Back link component](/components/back-link/), [Breadcrumbs component](/components/breadcrumbs/),
For example: `<meta name="description" content="My page description">`
99
108
100
-
#### `bodyAttributes` (Variable)
109
+
#### `headIcons` (Block)
101
110
102
-
Add attributes to the `<body>` element. Add each attribute and its value in the `bodyAttributes` object.
111
+
Override the default icons used for GOV.UK branded pages.
112
+
For example: `<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">`
103
113
104
-
#### `bodyClasses` (Variable)
114
+
#### `opengraphImageUrl` (Variable)
105
115
106
-
Add a class to the `<body>` element.
116
+
Set the URL for the Open Graph image meta tag. The URL must be absolute, including the protocol and domain name. If you're using the refreshed GOV.UK brand, you may need to update this path to point to the updated assets.
107
117
108
-
#### `bodyEnd` (Block)
118
+
#### `pageTitle` (Block)
109
119
110
-
Add content just before the closing `<body>` element.
120
+
Override the default page title (`<title>` element).
111
121
112
-
#### `bodyStart` (Block)
122
+
#### `pageTitleLang` (Variable)
113
123
114
-
Add content after the opening `<body>` element.
115
-
For example: The [Cookie banner component](/components/cookie-banner/).
124
+
Set the language of the `<title>` element if it's different to `htmlLang`.
116
125
117
-
#### `containerClasses` (Variable)
126
+
#### `themeColor` (Variable)
118
127
119
-
Add a class to the container. This is useful if you want to make the page wrapper a fixed width.
128
+
Set the [toolbar colour on some devices](https://developer.chrome.com/blog/support-for-theme-color-in-chrome-39-for-android).
120
129
121
-
#### `content` (Block)
130
+
###Update the `<body>` element
122
131
123
-
Add content that needs to appear centered in the `<main>` element.
132
+
#### `bodyAttributes` (Variable)
124
133
125
-
#### `cspNonce` (Variable)
134
+
Add attributes to the `<body>` element. Add each attribute and its value in the `bodyAttributes` object.
126
135
127
-
Add a `nonce` attribute to the script for your Content Security Policy (CSP). Provide a nonce that hostile actors cannot guess, as otherwise they can easily find a way around your CSP. However, you should use this attribute only if you’re not able to [include the hash for the inline scripts in your service’s CSP](https://frontend.design-system.service.gov.uk/import-javascript/#if-our-inline-javascript-snippet-is-blocked-by-a-content-security-policy).
136
+
#### `bodyClasses` (Variable)
128
137
129
-
#### `footer` (Block)
138
+
Add a class to the `<body>` element.
130
139
131
-
Override the default [Footer component](/components/footer/).
140
+
#### `bodyEnd` (Block)
132
141
133
-
#### `govukRebrand` (Variable)
142
+
Add content just before the closing `<body>` element.
134
143
135
-
Enables rebranded styles. If you’ve overridden any blocks that are affected by this, you may have to make manual changes. See the [v5.10.0 release notes](https://github.com/alphagov/govuk-frontend/releases/tag/v5.10.0) for more information.
144
+
#### `bodyStart` (Block)
136
145
137
-
#### `head` (Block)
146
+
Add content after the opening `<body>` element.
147
+
For example: The [Cookie banner component](/components/cookie-banner/).
138
148
139
-
Add additional items inside the `<head>` element.
140
-
For example: `<meta name="description" content="My page description">`
149
+
### Update the page's header
141
150
142
151
#### `header` (Block)
143
152
144
153
Override the default [Header component](/components/header/).
145
154
146
-
#### `headIcons` (Block)
155
+
###Update the page's container
147
156
148
-
Override the default icons used for GOV.UK branded pages.
149
-
For example: `<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">`
157
+
#### `containerClasses` (Variable)
150
158
151
-
#### `htmlClasses` (Variable)
159
+
Add a class to the container. This is useful if you want to make the page wrapper a fixed width.
152
160
153
-
Add a class to the `<html>` element.
161
+
#### `beforeContent` (Block)
154
162
155
-
#### `htmlLang` (Variable)
163
+
Add content that needs to appear outside `<main>` element.
164
+
For example: The [Back link component](/components/back-link/), [Breadcrumbs component](/components/breadcrumbs/),
Set the language of the whole document. If your `<title>` and `<main>` element are in a different language to the rest of the page, use `htmlLang` to set the language of the rest of the page.
167
+
### Update the page's main content
168
+
169
+
#### `content` (Block)
170
+
171
+
Add content that needs to appear centered in the `<main>` element.
158
172
159
173
#### `main` (Block)
160
174
@@ -168,26 +182,26 @@ Add a class to the `<main>` element.
168
182
169
183
Set the language of the `<main>` element if it's different to `htmlLang`
170
184
171
-
#### `opengraphImageUrl` (Variable)
185
+
###Update the page's footer
172
186
173
-
Set the URL for the Open Graph image meta tag. The URL must be absolute, including the protocol and domain name. If you're using the refreshed GOV.UK brand, you may need to update this path to point to the updated assets.
187
+
#### `footer` (Block)
174
188
175
-
#### `pageTitle` (Block)
189
+
Override the default [Footer component](/components/footer/).
176
190
177
-
Override the default page title (`<title>` element).
191
+
### Other options
178
192
179
-
#### `pageTitleLang` (Variable)
193
+
#### `cspNonce` (Variable)
180
194
181
-
Set the language of the `<title>` element if it's different to `htmlLang`.
195
+
Add a `nonce` attribute to the script for your Content Security Policy (CSP). Provide a nonce that hostile actors cannot guess, as otherwise they can easily find a way around your CSP. However, you should use this attribute only if you’re not able to [include the hash for the inline scripts in your service’s CSP](https://frontend.design-system.service.gov.uk/import-javascript/#if-our-inline-javascript-snippet-is-blocked-by-a-content-security-policy).
182
196
183
-
#### `skipLink` (Block)
197
+
#### `govukRebrand` (Variable)
184
198
185
-
Override the default [Skip link component](/components/skip-link/).
199
+
Enables rebranded styles. If you’ve overridden any blocks that are affected by this, you may have to make manual changes. See the [v5.10.0 release notes](https://github.com/alphagov/govuk-frontend/releases/tag/v5.10.0) for more information.
186
200
187
-
#### `themeColor` (Variable)
201
+
#### `skipLink` (Block)
188
202
189
-
Set the [toolbar colour on some devices](https://developer.chrome.com/blog/support-for-theme-color-in-chrome-39-for-android).
203
+
Override the default [Skip link component](/components/skip-link/).
190
204
191
-
####Exploded view of the page template block areas
205
+
### Exploded view of the page template block areas
0 commit comments