fix: external link and redirecting url for Google healthcare

This commit is contained in:
Alireza 2021-07-05 20:47:30 -04:00
parent c3ca60533a
commit 9f03df77b0

View File

@ -77,13 +77,23 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
'@docusaurus/plugin-client-redirects', '@docusaurus/plugin-client-redirects',
{ {
fromExtensions: ['html'], fromExtensions: ['html'],
createRedirects: function(path) { redirects: [
// redirect to /docs from /docs/introduction, {
// as introduction has been made the home doc // we need this for https://cloud.google.com/healthcare/docs/how-tos/dicom-viewers
if (allDocHomesPaths.includes(path)) { to: "/deployment/recipes/google-cloud-healthcare",
return [`${path}/introduction`]; from: ['/connecting-to-image-archives/google-cloud-healthcare', '/connecting-to-image-archives/google-cloud-healthcare.html']
} }
}, ]
// createRedirects: function(path) {
// // redirect to /docs from /docs/introduction,
// // as introduction has been made the home doc
// // if (allDocHomesPaths.includes(path)) {
// // return [`${path}/introduction`];
// // }
// if (path.includes("/connecting-to-image-archives/google-cloud-healthcare")) {
// return ["/deployment/recipes/google-cloud-healthcare"]
// }
// },
// redirects: [ // redirects: [
// { // {
// from: ['/'], // from: ['/'],
@ -113,67 +123,67 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
steps: 2, // the max number of images generated between min and max (inclusive) steps: 2, // the max number of images generated between min and max (inclusive)
}, },
], ],
[ // [
'@docusaurus/plugin-pwa', // '@docusaurus/plugin-pwa',
{ // {
debug: isDeployPreview, // debug: isDeployPreview,
offlineModeActivationStrategies: [ // offlineModeActivationStrategies: [
'appInstalled', // 'appInstalled',
'standalone', // 'standalone',
'queryString', // 'queryString',
], // ],
// swRegister: false, // // swRegister: false,
// swCustom: path.resolve(__dirname, 'src/sw.js'), // // swCustom: path.resolve(__dirname, 'src/sw.js'),
pwaHead: [ // pwaHead: [
{ // {
tagName: 'link', // tagName: 'link',
rel: 'icon', // rel: 'icon',
href: 'img/docusaurus.png', // href: 'img/docusaurus.png',
}, // },
{ // {
tagName: 'link', // tagName: 'link',
rel: 'manifest', // rel: 'manifest',
href: `${baseUrl}manifest.json`, // href: `${baseUrl}manifest.json`,
}, // },
{ // {
tagName: 'meta', // tagName: 'meta',
name: 'theme-color', // name: 'theme-color',
content: 'rgb(37, 194, 160)', // content: 'rgb(37, 194, 160)',
}, // },
{ // {
tagName: 'meta', // tagName: 'meta',
name: 'apple-mobile-web-app-capable', // name: 'apple-mobile-web-app-capable',
content: 'yes', // content: 'yes',
}, // },
{ // {
tagName: 'meta', // tagName: 'meta',
name: 'apple-mobile-web-app-status-bar-style', // name: 'apple-mobile-web-app-status-bar-style',
content: '#000', // content: '#000',
}, // },
{ // {
tagName: 'link', // tagName: 'link',
rel: 'apple-touch-icon', // rel: 'apple-touch-icon',
href: 'img/docusaurus.png', // href: 'img/docusaurus.png',
}, // },
{ // {
tagName: 'link', // tagName: 'link',
rel: 'mask-icon', // rel: 'mask-icon',
href: 'img/docusaurus.svg', // href: 'img/docusaurus.svg',
color: 'rgb(62, 204, 94)', // color: 'rgb(62, 204, 94)',
}, // },
{ // {
tagName: 'meta', // tagName: 'meta',
name: 'msapplication-TileImage', // name: 'msapplication-TileImage',
content: 'img/docusaurus.png', // content: 'img/docusaurus.png',
}, // },
{ // {
tagName: 'meta', // tagName: 'meta',
name: 'msapplication-TileColor', // name: 'msapplication-TileColor',
content: '#000', // content: '#000',
}, // },
], // ],
}, // },
], // ],
], ],
presets: [ presets: [
[ [
@ -265,8 +275,8 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
srcDark: 'img/ohif-logo.svg', srcDark: 'img/ohif-logo.svg',
}, },
items: [ items: [
{ href: 'https://ohif.org/get-started', label: 'Get Started', target: '_self', position: 'left' }, { to: 'https://ohif.org/get-started', label: 'Get Started', target: '_self', position: 'left' },
{ href: 'https://ohif.org/examples', label: 'Examples', target: '_self', position: 'left' }, { to: 'https://ohif.org/examples', label: 'Examples', target: '_self', position: 'left' },
{ {
position: 'left', position: 'left',
to: '/', to: '/',
@ -274,7 +284,7 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
docId: 'Introduction', docId: 'Introduction',
label: 'Docs', label: 'Docs',
}, },
{ href: 'https://ohif.org/community', label: 'Community', target: '_self', position: 'left' }, { to: 'https://ohif.org/community', label: 'Community', target: '_self', position: 'left' },
{ to: 'next/help', activeBaseRegex: '(^/help$)|(/next/help)', label: 'Help', position: 'right' }, { to: 'next/help', activeBaseRegex: '(^/help$)|(/next/help)', label: 'Help', position: 'right' },
// { to: 'https://react.ohif.org/', label: 'UI Component Library', position: 'left' }, // { to: 'https://react.ohif.org/', label: 'UI Component Library', position: 'left' },
// {to: 'showcase', label: 'Showcase', position: 'left'}, // {to: 'showcase', label: 'Showcase', position: 'left'},
@ -295,7 +305,7 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
], ],
}, },
{ {
href: 'https://github.com/OHIF/Viewers', to: 'https://github.com/OHIF/Viewers',
position: 'right', position: 'right',
className: 'header-github-link', className: 'header-github-link',
'aria-label': 'GitHub Repository' 'aria-label': 'GitHub Repository'
@ -340,7 +350,7 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
}, },
{ {
label: 'Discussion board', label: 'Discussion board',
href: 'https://community.ohif.org/', to: 'https://community.ohif.org/',
}, },
{ {
label: 'Help', label: 'Help',
@ -353,15 +363,15 @@ const isI18nStaging = process.env.I18N_STAGING === 'true';
items: [ items: [
{ {
label: 'Donate', label: 'Donate',
href: 'https://google.com/', to: 'https://google.com/',
}, },
{ {
label: 'GitHub', label: 'GitHub',
href: 'https://github.com/OHIF/Viewers', to: 'https://github.com/OHIF/Viewers',
}, },
{ {
label: 'Twitter', label: 'Twitter',
href: 'https://twitter.com/OHIFviewer', to: 'https://twitter.com/OHIFviewer',
}, },
// { // {
// html: ` // html: `