Skip to content

Commit 7f9980e

Browse files
author
Nate Borrebach
committed
Update development docs with meta tag information
1 parent 16313f1 commit 7f9980e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/development.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,38 @@ redirect_from:
271271
| timeRequired | short description of how much time is required for method activity | text | methods |
272272
| category | a method's category name; do not capitalize | text | methods |
273273

274+
## Meta tags
275+
276+
Pages define metadata via HTML `meta` tags implemented in the [_includes/meta.html](https://github.com/18F/guides/blob/main/_includes/meta.html) file. A subset of tags that are defined based on the page configuration are documented below.
277+
278+
### OpenGraph meta tags
279+
280+
#### Page data
281+
282+
| property | content |
283+
|---|---|
284+
| `og:description` | The description set in the page's [front matter](#top-level). |
285+
| `og:title` | "[\<page title\>](#page-titles) \| 18F \<guide title\>" |
286+
| `og:type` | "article" |
287+
| `og:url` | The page URL. |
288+
289+
#### Image tags
290+
291+
OpenGraph image tags can be configured optionally at a guide level in the [_data/meta_images.yaml](https://github.com/18F/guides/blob/main/_data/meta_images.html) file. If no configuration exists for a guide, by default no `og:image` or `og:image:alt` tags will be rendered.
292+
293+
| property | content |
294+
|---|---|
295+
| `og:image` | The URL of the image at the configured asset path set in the `path` value for the guide, if any. |
296+
| `og:image:alt` | The alt text set in the `alt` value for the guide, or "" if `alt` is unspecified. |
297+
298+
### Twitter meta tags
299+
300+
| name | content |
301+
|---|---|
302+
| `twitter:card` | "summary" |
303+
| `twitter:description` | The description set in the page's [front matter](#top-level). |
304+
| `twitter:site` | The Twitter handle configured in the [_data/site.yaml](https://github.com/18F/guides/blob/main/_data/site.yaml) file. |
305+
274306
## Managing dependencies
275307

276308
This project uses Github's Dependabot to keep the NPM dependencies up to date.

0 commit comments

Comments
 (0)