Skip to content

Commit

Permalink
Add support for Web App Manifest in siteConfig (#934)
Browse files Browse the repository at this point in the history
* Add support for Web App Manifest in siteConfig

* Update api-site-config.md

* Update api-site-config.md
  • Loading branch information
tirthbodawala authored and yangshun committed Sep 2, 2018
1 parent f1daddb commit 2cbfeff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api-site-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ h1 {
* `defaultLang` defines a default language. It will be used if one is not specified at the top of the code block. You can find the [list of supported languages here](https://github.com/isagalaev/highlight.js/tree/master/src/languages).
* `themeUrl` is the custom URL of CSS theme file that you want to use with Highlight.js. If this is provided, the `theme` and `version` fields will be ignored.

`manifest` - Path to your web app manifest (e.g., `/manifest.json`). This will add a `<link>` tag to `<head>` with `rel` as `"manifest"` and `content` as the provided path.

`markdownPlugins` - An array of plugins to be loaded by Remarkable, the markdown parser and renderer used by Docusaurus. The plugin will receive a reference to the Remarkable instance, allowing custom parsing and rendering rules to be defined.

`ogImage` - Local path to an Open Graph image (e.g., `img/myImage.png`). This image will show up when your site is shared on Facebook and other websites/apps where the Open Graph protocol is supported.
Expand Down
3 changes: 3 additions & 0 deletions lib/core/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ class Head extends React.Component {
{this.props.redirect && (
<meta httpEquiv="refresh" content={`0; URL=${this.props.redirect}`} />
)}
{this.props.config.manifest && (
<link rel="manifest" content={siteUrl + this.props.config.manifest} />
)}
<link
rel="shortcut icon"
href={this.props.config.baseUrl + this.props.config.favicon}
Expand Down

0 comments on commit 2cbfeff

Please sign in to comment.