Fix up build ssr and ci for docs
This commit is contained in:
parent
142d846223
commit
ce252bb2f9
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
|
@ -79,7 +79,9 @@ jobs:
|
||||||
working-directory: packages/website
|
working-directory: packages/website
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install dependencies
|
- name: Install dependencies from monorepo level
|
||||||
run: yarn
|
run: cd ../../ && yarn
|
||||||
|
- name: Build rescript in squiggle-lang
|
||||||
|
run: cd ../squiggle-lang && yarn build
|
||||||
- name: Build website assets
|
- name: Build website assets
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
|
presets: [
|
||||||
|
require.resolve('@docusaurus/core/lib/babel/preset'),
|
||||||
|
["@babel/preset-react", {"runtime": "automatic"}]
|
||||||
|
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
sidebar_position: 7
|
sidebar_position: 7
|
||||||
---
|
---
|
||||||
|
|
||||||
import { SquiggleEditor } from '@quri/squiggle-components'
|
import { SquiggleEditor } from '../src/components/SquiggleEditor'
|
||||||
|
|
||||||
# Squiggle Functions Reference
|
# Squiggle Functions Reference
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
sidebar_position: 2
|
sidebar_position: 2
|
||||||
---
|
---
|
||||||
|
|
||||||
import { SquiggleEditor } from '@quri/squiggle-components'
|
import { SquiggleEditor } from '../src/components/SquiggleEditor'
|
||||||
|
|
||||||
# Squiggle Language
|
# Squiggle Language
|
||||||
|
|
||||||
|
|
13
packages/website/src/components/SquiggleEditor.jsx
Normal file
13
packages/website/src/components/SquiggleEditor.jsx
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import BrowserOnly from '@docusaurus/BrowserOnly';
|
||||||
|
|
||||||
|
export function SquiggleEditor(props) {
|
||||||
|
return (
|
||||||
|
<BrowserOnly fallback={<div>Loading...</div>}>
|
||||||
|
{() => {
|
||||||
|
const LibComponent =
|
||||||
|
require('@quri/squiggle-components').SquiggleEditor;
|
||||||
|
return <LibComponent {...props} />;
|
||||||
|
}}
|
||||||
|
</BrowserOnly>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user