Skip to content

Commit

Permalink
chore: Update Netlify to publish site + demo (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber authored Feb 19, 2021
1 parent ca6ae75 commit 8719ddc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 30 deletions.
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[build]
base = "/"
command = "yarn workspace infima build && yarn workspace infima-website build && cp -R packages/core/demo website/build/demo"
publish = "/website/build"

73 changes: 43 additions & 30 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,88 @@
* LICENSE file in the root directory of this source tree.
*/

// See Netlify env variables here: https://docs.netlify.com/configure-builds/environment-variables/#build-metadata
const isNetlify = process.env.NETLIFY === "true";
const isNetlifyDeployPreview =
isNetlify && process.env.CONTEXT === "deploy-preview";

module.exports = {
title: 'Infima',
tagline: 'A modern styling framework for content-driven websites 🔥',
organizationName: 'facebookincubator',
projectName: 'infima',
baseUrl: '/infima/',
url: 'https://facebookincubator.github.io',
favicon: 'img/logo.png',
title: "Infima",
tagline: "A modern styling framework for content-driven websites 🔥",
organizationName: "facebookincubator",
projectName: "infima",
baseUrl: isNetlify
? "/"
: // for GH pages: https://facebookincubator.github.io/infima/
"/infima/",
url: "https://facebookincubator.github.io",
favicon: "img/logo.png",
themeConfig: {
navbar: {
title: 'Infima',
title: "Infima",
logo: {
alt: 'Infima Logo',
src: 'img/logo.png',
alt: "Infima Logo",
src: "img/logo.png",
},
items: [
{
to: 'docs/getting-started/introduction',
label: 'Docs',
position: 'left',
to: "docs/getting-started/introduction",
label: "Docs",
position: "left",
},
],
isNetlifyDeployPreview && {
to: "pathname:///demo",
label: "Demo",
position: "left",
},
].filter(Boolean),
},
footer: {
style: 'dark',
style: "dark",
links: [
{
title: 'Docs',
title: "Docs",
items: [
{
label: 'Introduction',
to: 'docs/getting-started/introduction',
label: "Introduction",
to: "docs/getting-started/introduction",
},
],
},
{
title: 'Community',
title: "Community",
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/infima',
label: "Stack Overflow",
href: "https://stackoverflow.com/questions/tagged/infima",
},
],
},
{
title: 'Social',
title: "Social",
items: [
{
label: 'GitHub',
href: 'https://github.com/facebookincubator/infima',
label: "GitHub",
href: "https://github.com/facebookincubator/infima",
},
],
},
],
logo: {
alt: 'Facebook Open Source Logo',
src: 'https://docusaurus.io/img/oss_logo.png',
href: 'https://opensource.facebook.com',
alt: "Facebook Open Source Logo",
src: "https://docusaurus.io/img/oss_logo.png",
href: "https://opensource.facebook.com",
},
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
"@docusaurus/preset-classic",
{
docs: {
path: 'docs',
sidebarPath: require.resolve('./sidebars.js'),
path: "docs",
sidebarPath: require.resolve("./sidebars.js"),
},
},
],
Expand Down

0 comments on commit 8719ddc

Please sign in to comment.