From 96f7ef5d58e20cbb55d6efa6f3d8d0624c78f983 Mon Sep 17 00:00:00 2001 From: Tirth Bodawala Date: Fri, 31 Aug 2018 12:30:46 +0530 Subject: [PATCH 1/3] Add support for Web App Manifest in siteConfig --- docs/api-site-config.md | 2 ++ lib/core/Head.js | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docs/api-site-config.md b/docs/api-site-config.md index 17ede83f2078..62a965113ab6 100644 --- a/docs/api-site-config.md +++ b/docs/api-site-config.md @@ -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` - Local path to your Web App Manifest (e.g., `/manifest.json`). This will add manifest.json to head link with rel as "manifest". + `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. diff --git a/lib/core/Head.js b/lib/core/Head.js index 8f8c5f5d51b8..2ba3192cfacb 100644 --- a/lib/core/Head.js +++ b/lib/core/Head.js @@ -66,6 +66,9 @@ class Head extends React.Component { {this.props.redirect && ( )} + {this.props.config.manifest && ( + + )} Date: Sun, 2 Sep 2018 10:24:06 -0700 Subject: [PATCH 2/3] Update api-site-config.md --- docs/api-site-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-site-config.md b/docs/api-site-config.md index 62a965113ab6..2de77a4ed79a 100644 --- a/docs/api-site-config.md +++ b/docs/api-site-config.md @@ -147,7 +147,7 @@ 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` - Local path to your Web App Manifest (e.g., `/manifest.json`). This will add manifest.json to head link with rel as "manifest". +`manifest` - Path to your web app manifest (e.g., `/manifest.json`). This will add a `` tag to `` with `rel` as `"manifest"` with `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. From fb8287b9b14b87c42a0036349b17650c7b9d1f45 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Sun, 2 Sep 2018 10:24:42 -0700 Subject: [PATCH 3/3] Update api-site-config.md --- docs/api-site-config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-site-config.md b/docs/api-site-config.md index 2de77a4ed79a..58fa5fee8cf0 100644 --- a/docs/api-site-config.md +++ b/docs/api-site-config.md @@ -147,7 +147,7 @@ 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 `` tag to `` with `rel` as `"manifest"` with `content` as the provided path. +`manifest` - Path to your web app manifest (e.g., `/manifest.json`). This will add a `` tag to `` 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.