From 5ff8cff5e6b091c10151709b5c745189132465f3 Mon Sep 17 00:00:00 2001 From: Derrick Mehaffy Date: Tue, 1 Jun 2021 14:09:28 -0700 Subject: [PATCH 1/3] Add temp workaround for legacy domain Adds a function that checks for node_env and if it's legacy it sets the base key to `/documentation/` else it just sets the base to the vuepress default `/` Also added a replacement for the landing meta-refresh --- docs/.vuepress/config.js | 24 +++++++++++++----------- docs/README.md | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index f504d22bb8..09a430f4b9 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -131,9 +131,9 @@ const sidebar = { ['/developer-docs/latest/development/plugins/documentation', 'API Documentation'], ['/developer-docs/latest/development/plugins/email', 'Email'], ['/developer-docs/latest/development/plugins/graphql', 'GraphQL'], -['/developer-docs/latest/development/plugins/i18n', 'Internationalization (i18n)'], + ['/developer-docs/latest/development/plugins/i18n', 'Internationalization (i18n)'], ['/developer-docs/latest/development/plugins/upload', 'Upload'], - ['/developer-docs/latest/development/plugins/users-permissions', 'Users & Permissions'] + ['/developer-docs/latest/development/plugins/users-permissions', 'Users & Permissions'], ], sidebarDepth: 1, }, @@ -327,18 +327,12 @@ const sidebar = { collapsable: false, title: 'Plugins', children: [ - [ - '/user-docs/latest/plugins/introduction-to-plugins', - 'Introduction to plugins', - ], + ['/user-docs/latest/plugins/introduction-to-plugins', 'Introduction to plugins'], [ '/user-docs/latest/plugins/installing-plugins-via-marketplace', 'Installing plugins via the Marketplace', ], - [ - '/user-docs/latest/plugins/strapi-plugins', - 'List of Strapi plugins', - ], + ['/user-docs/latest/plugins/strapi-plugins', 'List of Strapi plugins'], ], }, { @@ -370,11 +364,19 @@ const checklinksIgnoredFiles = [ './developer-docs/latest/update-migration-guides/migration-guides/migration-guide-beta.20-to-3.0.0.md', // line 93 ]; +const checkLegacy = () => { + if (process.env.NODE_ENV == 'legacy') { + return '/documentation/'; + } else { + return '/'; + } +}; + module.exports = { title: '', port: 8080, description: 'The headless CMS developers love.', - base: '/documentation/', + base: checkLegacy(), plugins: { '@vuepress/medium-zoom': {}, 'vuepress-plugin-element-tabs': {}, diff --git a/docs/README.md b/docs/README.md index 382917b014..5ae98fb000 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,5 @@ --- meta: - - http-equiv: refresh - content: 0;url=/documentation/developer-docs/latest/getting-started/introduction.html + - http-equiv: refresh + content: 0;url=https://strapi.io/resource-center --- From ccdbd8173f7769b7a0e5cd369acd5b4518ea2ed6 Mon Sep 17 00:00:00 2001 From: Derrick Mehaffy Date: Fri, 4 Jun 2021 09:32:04 -0700 Subject: [PATCH 2/3] revert resource center redirection --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 5ae98fb000..1b5243b215 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,5 @@ --- meta: - http-equiv: refresh - content: 0;url=https://strapi.io/resource-center + content: 0;url=/developer-docs/latest/getting-started/introduction.html --- From 871a0373da38f633fbbea222c0ff6338869f3b9c Mon Sep 17 00:00:00 2001 From: Derrick Mehaffy Date: Fri, 4 Jun 2021 09:37:20 -0700 Subject: [PATCH 3/3] add resource center link --- docs/.vuepress/config.js | 4 ++++ docs/README.md | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 09a430f4b9..ec94b88f0a 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -488,6 +488,10 @@ module.exports = { themeConfig: { logo: '/assets/logo.png', nav: [ + { + text: 'Resource Center', + link: 'https://strapi.io/resource-center', + }, { text: 'Documentation', items: [ diff --git a/docs/README.md b/docs/README.md index 1b5243b215..0c0b447e5a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,6 @@ --- meta: - http-equiv: refresh + # Note this file will be automatically replaced on the legacy docs: strapi.io/documentation content: 0;url=/developer-docs/latest/getting-started/introduction.html ---