From 26eca2b8c5a8d6c58fa4fdb83d252f2e906a424b Mon Sep 17 00:00:00 2001 From: Charles Lowell Date: Wed, 11 Oct 2023 10:24:34 -0500 Subject: [PATCH] Update the v2 site to promote v3 Now that the V3 site is live at https://frontside.com/effection we need to point to it from various places. This updates the legacy site links to point to the new v3 places. Also, because this is now the "prod" version of this site, we don't need to maintain a separate "prod" config. --- website/docusaurus.config.js | 18 +++- website/docusaurus.config.local.js | 16 ++- website/docusaurus.config.prod.js | 124 ------------------------ website/netlify.toml | 13 --- website/package.json | 2 +- website/src/theme/Navbar/logo-select.js | 2 +- 6 files changed, 27 insertions(+), 148 deletions(-) delete mode 100644 website/docusaurus.config.prod.js delete mode 100644 website/netlify.toml diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index f72230353..390ef8524 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -2,12 +2,20 @@ module.exports = { title: 'Effection', tagline: 'Structured Concurrency for JavaScript', url: 'https://frontside.com', - baseUrl: '/effection/', + baseUrl: '/effection/V2/', onBrokenLinks: 'throw', favicon: 'images/favicon-effection.png', organizationName: 'thefrontside', projectName: 'effection', themeConfig: { + announcementBar: { + id: 'effection_v3_announce', + content: + '📣 These docs are for Effection V2. Check out the latest release here', + backgroundColor: '#fafbfc', + textColor: '#091E42', + isCloseable: false, + }, colorMode: { disableSwitch: true, respectPrefersColorScheme: true, @@ -28,7 +36,7 @@ module.exports = { position: "right", }, { - href: 'https://frontside.com/effection/api/index.html', + href: 'https://frontside.com/effection/V2/api/index.html', label: 'API Reference', position: 'right', }, @@ -61,15 +69,15 @@ module.exports = { items: [ { label: "Interactors", - href: "https://frontside.com/effection", + href: "https://frontside.com/interactors", }, { label: "Bigtest", href: "https://frontside.com/bigtest", }, { - label: "Effection", - to: "/", + label: "Effection v3", + to: "/effection/", }, ], }, diff --git a/website/docusaurus.config.local.js b/website/docusaurus.config.local.js index ea4376960..5a44e0e16 100644 --- a/website/docusaurus.config.local.js +++ b/website/docusaurus.config.local.js @@ -8,6 +8,14 @@ module.exports = { organizationName: 'thefrontside', projectName: 'effection', themeConfig: { + announcementBar: { + id: 'effection_v3_announce', + content: + '📣 These docs are for Effection V2. Check out the latest release here', + backgroundColor: '#fafbfc', + textColor: '#091E42', + isCloseable: false, + }, colorMode: { disableSwitch: true, respectPrefersColorScheme: true, @@ -28,7 +36,7 @@ module.exports = { position: "right", }, { - href: 'https://frontside.com/effection/api/index.html', + href: 'https://frontside.com/effection/V2/api/index.html', label: 'API Reference', position: 'right', }, @@ -61,15 +69,15 @@ module.exports = { items: [ { label: "Interactors", - href: "https://frontside.com/effection", + href: "https://frontside.com/interactors", }, { label: "Bigtest", href: "https://frontside.com/bigtest", }, { - label: "Effection", - to: "/", + label: "Effection v3", + to: "/effection/", }, ], }, diff --git a/website/docusaurus.config.prod.js b/website/docusaurus.config.prod.js deleted file mode 100644 index e45253d85..000000000 --- a/website/docusaurus.config.prod.js +++ /dev/null @@ -1,124 +0,0 @@ -module.exports = { - title: 'Effection', - tagline: 'Structured Concurrency for JavaScript', - url: 'https://frontside.com', - baseUrl: '/effection/V2/', - onBrokenLinks: 'throw', - favicon: 'images/favicon-effection.png', - organizationName: 'thefrontside', - projectName: 'effection', - themeConfig: { - colorMode: { - disableSwitch: true, - respectPrefersColorScheme: true, - }, - prism: { - theme: require('prism-react-renderer/themes/nightOwl'), - }, - navbar: { - title: 'Effection', - logo: { - alt: 'Effection', - src: 'images/effection-logo.svg' - }, - items: [ - { - to: '/docs', - label: 'Guides', - position: "right", - }, - { - href: 'https://frontside.com/effection/api/index.html', - label: 'API Reference', - position: 'right', - }, - { - href: 'https://github.com/thefrontside/effection', - label: 'GitHub', - position: 'right', - }, - { - href: 'https://discord.gg/r6AvtnU', - label: 'Discord', - position: 'right', - } - ], - }, - footer: { - style: 'light', - links: [ - { - title: 'About', - items: [ - { - label: "Maintained by Frontside", - href: "https://frontside.com/", - }, - ] - }, - { - title: "OSS Projects", - items: [ - { - label: "Interactors", - href: "https://frontside.com/effection", - }, - { - label: "Bigtest", - href: "https://frontside.com/bigtest", - }, - { - label: "Effection", - to: "/", - }, - ], - }, - { - title: 'Community', - items: [ - { - label: 'Discord', - href: 'https://discord.gg/r6AvtnU', - }, - { - label: 'GitHub', - href: 'https://github.com/thefrontside/effection', - } - ], - } - ], - copyright: `Copyright © ${new Date().getFullYear()} The Frontside Software, Inc.`, - }, - image: 'images/meta-effection.png' - }, - presets: [ - [ - '@docusaurus/preset-classic', - { - docs: { - sidebarPath: require.resolve('./sidebars.js'), - }, - theme: { - customCss: require.resolve('./src/css/custom.css'), - }, - }, - ], - ], - stylesheets: ["https://use.typekit.net/ugs0ewy.css"], - plugins: [ - [ - require.resolve("./plugins/docusaurus-plugin-vanilla-extract"), - { - /* options */ - }, - ], - ], - scripts: [ - { - src: "https://plausible.io/js/plausible.js", - async: true, - defer: true, - "data-domain": "frontside.com/effection", - }, - ], -}; diff --git a/website/netlify.toml b/website/netlify.toml deleted file mode 100644 index a4bc1a5d6..000000000 --- a/website/netlify.toml +++ /dev/null @@ -1,13 +0,0 @@ -[build] - command = "yarn build" - publish = "public/" - -[dev] - command = "yarn start" - publish = "public/" - targetPort = 3000 - framework = "#custom" - -[[redirects]] - from = "/*" - to = "/effection/:splat" diff --git a/website/package.json b/website/package.json index 4245f0a79..5d2b6e197 100644 --- a/website/package.json +++ b/website/package.json @@ -6,7 +6,7 @@ "start": "docusaurus start --no-open", "build": "docusaurus build --out-dir public/effection", "build:local": "docusaurus build --config ./docusaurus.config.local.js --out-dir build/local/site", - "build:prod": "docusaurus build --config ./docusaurus.config.prod.js --out-dir build/prod/site", + "build:prod": "docusaurus build --config ./docusaurus.config.js --out-dir build/prod/site", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "serve": "docusaurus serve --dir public" diff --git a/website/src/theme/Navbar/logo-select.js b/website/src/theme/Navbar/logo-select.js index 4f3f4e589..c203ee51f 100644 --- a/website/src/theme/Navbar/logo-select.js +++ b/website/src/theme/Navbar/logo-select.js @@ -32,7 +32,7 @@ const items = [ { title: 'Effection', description: 'Structured Concurrency for JavaScript', - url: 'https://frontside.com/effection', + url: 'https://frontside.com/effection/V2/', version: 'v2', img: '/images/icon-effection.svg', },