forked from GoogleChrome/web.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pwa banner and instructions (GoogleChrome#5719)
- Loading branch information
Showing
2 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
layout: handbook | ||
title: Banners | ||
date: 2021-06-28 | ||
description: | | ||
Learn how to add banners to the site. | ||
--- | ||
|
||
This guide explains how to add a banner to the site. | ||
|
||
## Add a site-wide banner | ||
|
||
In `src/site/_date/site.js`, look for these two lines: | ||
|
||
```js | ||
isBannerEnabled: …, | ||
banner: … | ||
``` | ||
|
||
Set `isBannerEnabled` to `true`. | ||
Add a markdown string for your `banner` message. | ||
|
||
Example: | ||
|
||
```js | ||
isBannerEnabled: true, | ||
banner: | ||
'PWA Summit: a conference to help everyone succeed with PWAs is happening Oct 6 & 7. [Submit your talk now](https://pwasummit.org).', | ||
``` | ||
|
||
## Exclude a banner from a page | ||
|
||
If you set `show_banner: false` in a page's YAML frontmatter, then it will | ||
not display a site banner. |