From 5abe4982de4521527378f6d5b287e92ed5224658 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 2 Jun 2021 16:29:02 -0600 Subject: [PATCH] Get Gatsby to parse the docs This isn't having Gatsby do anything with the docs yet, it's just getting it to load the docs without complaining. - Use the `gatsby-source-filesystem` and `gatsby-plugin-mdx` plugins to load the docs. + It turns out that various JS files in the docs import a bunch of third-party modules, so add those in `package.json`. - Adjust the docs to use an "@src" alias instead of a bunch of "../" sequences, to avoid the docs needing to know where they are subtree'd in at. This alias is configured in `gatsby-node.js`. - Copy some JS-imported resources from getambassador.io.git: + Some images (`src/assets/icons/*.svg`) + Some CSS (`src/components/Layout/vars.less`) - Add a trivial MVP of the JS-imported component, rather than figuring out what all of the etambassador.io.git 's dependencies are in order to copy it. Signed-off-by: Luke Shumaker --- install/old-version-tabs.js | 6 +++--- quick-start/qs-tabs.js | 8 ++++---- quick-start/telepresence-quickstart-landing.less | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/install/old-version-tabs.js b/install/old-version-tabs.js index ce9536791..2b1377243 100644 --- a/install/old-version-tabs.js +++ b/install/old-version-tabs.js @@ -5,9 +5,9 @@ import AppBar from '@material-ui/core/AppBar'; import Tabs from '@material-ui/core/Tabs'; import Tab from '@material-ui/core/Tab'; import Box from '@material-ui/core/Box'; -import CodeBlock from '../../../../../src/components/CodeBlock'; -import LinuxIcon from '../../../../../src/assets/icons/linux.inline.svg'; -import AppleIcon from '../../../../../src/assets/icons/apple.inline.svg'; +import CodeBlock from '@src/components/CodeBlock'; +import LinuxIcon from '@src/assets/icons/linux.inline.svg'; +import AppleIcon from '@src/assets/icons/apple.inline.svg'; function TabPanel(props) { const { children, value, index, ...other } = props; diff --git a/quick-start/qs-tabs.js b/quick-start/qs-tabs.js index 5be598972..a5fe1c105 100644 --- a/quick-start/qs-tabs.js +++ b/quick-start/qs-tabs.js @@ -6,10 +6,10 @@ import Tabs from '@material-ui/core/Tabs'; import Tab from '@material-ui/core/Tab'; import Box from '@material-ui/core/Box'; import HubspotForm from 'react-hubspot-form'; -import CodeBlock from '../../../../../src/components/CodeBlock'; -import LinuxIcon from '../../../../../src/assets/icons/linux.inline.svg'; -import AppleIcon from '../../../../../src/assets/icons/apple.inline.svg'; -import WindowsIcon from '../../../../../src/assets/icons/windows.inline.svg'; +import CodeBlock from '@src/components/CodeBlock'; +import LinuxIcon from '@src/assets/icons/linux.inline.svg'; +import AppleIcon from '@src/assets/icons/apple.inline.svg'; +import WindowsIcon from '@src/assets/icons/windows.inline.svg'; function TabPanel(props) { const { children, value, index, ...other } = props; diff --git a/quick-start/telepresence-quickstart-landing.less b/quick-start/telepresence-quickstart-landing.less index 5458895c1..eb9f34894 100644 --- a/quick-start/telepresence-quickstart-landing.less +++ b/quick-start/telepresence-quickstart-landing.less @@ -1,4 +1,4 @@ -@import '../../../../../src/components/Layout/vars.less'; +@import '~@src/components/Layout/vars.less'; .doc-body .telepresence-quickstart-landing { font-family: @InterFont;