Skip to content

Commit

Permalink
Use completely isolated docusaurus configs
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboyd committed Oct 4, 2023
1 parent 9434158 commit db37427
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/v2-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ jobs:
- run: |
cd website
yarn install
yarn build
rm -rf docusaurus.config.js # ensure we don't pick up legacy config
yarn build:local
rm -rf .docusaurus
yarn build:prod
- uses: mxschmitt/action-tmate@v3
release:
runs-on: ubuntu-latest
Expand Down
126 changes: 122 additions & 4 deletions website/docusaurus.config.local.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,124 @@
const base = require('./docusaurus.config');

module.exports = {
...base,
title: 'Effection',
tagline: 'Structured Concurrency for JavaScript',
url: 'https://frontside.com',
baseUrl: '/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",
},
],
};
128 changes: 123 additions & 5 deletions website/docusaurus.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,124 @@
const base = require('./docusaurus.config');

module.exports = {
...base,
baseUrl: 'effection/v2/',
}
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",
},
],
};
2 changes: 2 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"scripts": {
"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",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"serve": "docusaurus serve --dir public"
Expand Down

2 comments on commit db37427

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on db37427 Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

Module not found "file:///src/www/main.ts".

@deno-deploy
Copy link

@deno-deploy deno-deploy bot commented on db37427 Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed to deploy:

Module not found "file:///src/www/main.ts".

Please sign in to comment.