Skip to content

Commit

Permalink
Merge branch 'master' into docs-configs-1
Browse files Browse the repository at this point in the history
  • Loading branch information
m-vdb committed Aug 5, 2020
2 parents c8977ad + fcabefa commit 889d3b8
Show file tree
Hide file tree
Showing 12 changed files with 409 additions and 451 deletions.
3 changes: 2 additions & 1 deletion docs/docs/api/action-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: Check out the API docs for open source chatbot framework Rasa's act
hide_table_of_contents: true
---

import useBaseUrl from '@docusaurus/useBaseUrl';
import Redoc from '@site/src/components/redoc';

<Redoc specUrl="../../spec/action-server.yml" />
<Redoc specUrl={useBaseUrl("/spec/action-server.yml")} />
3 changes: 2 additions & 1 deletion docs/docs/api/http-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: Read about Rasa's HTTP API that has endpoints for conversations, tr
hide_table_of_contents: true
---

import useBaseUrl from '@docusaurus/useBaseUrl';
import Redoc from '@site/src/components/redoc';

<Redoc specUrl="../../spec/rasa.yml" />
<Redoc specUrl={useBaseUrl("/spec/rasa.yml")} />
5 changes: 5 additions & 0 deletions docs/docs/user-guide/prototype-an-assistant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,9 @@ and your config's [pipeline](../nlu/choosing-a-pipeline.mdx) and [policies](../c

<DownloadButton />

<br/><br/>

*Your prototype was created using a Rasa Open Source alpha release. Please make sure
you're running* `rasa==2.0.0a1` *to develop your project further.*

</Prototyper>
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-live": "^2.2.2",
"react-promise": "^3.0.2",
"redoc": "^2.0.0-rc.31",
"remark": "^12.0.0",
"remark-collapse": "^0.1.2",
Expand Down
29 changes: 19 additions & 10 deletions docs/src/components/redoc.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
import React from 'react';
import usePromise from 'react-promise';
import BrowserOnly from '@docusaurus/BrowserOnly';


const Redoc = (props) => {

const Redoc = (props) => (
<BrowserOnly fallback={<div>Pre-rendering...</div>}>
{() => {
// we need to import this here instead of at the top-level
// because it causes issues in production builds
const RedocStandalone = require('redoc').RedocStandalone;
return <RedocStandalone {...props} />;
}}
</BrowserOnly>
);
const getRedocStandalone = React.useCallback(async () => {
// using import() instead of require() keeps the package tree-shakeable.
const redoc = await import('redoc');
return redoc.RedocStandalone;
}, []);

return (
<BrowserOnly fallback={<div>Loading...</div>}>
{() => {
// we need to import this here instead of at the top-level
// because it causes issues in production builds
const {value: RedocStandalone, loading} = usePromise(getRedocStandalone);
return loading ? <div>Loading...</div> : <RedocStandalone {...props} />;
}}
</BrowserOnly>
);
}

export default Redoc;
5 changes: 5 additions & 0 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11682,6 +11682,11 @@ react-loadable@^5.5.0:
dependencies:
prop-types "^15.5.0"

react-promise@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/react-promise/-/react-promise-3.0.2.tgz#1180f9e9d2e1a5362d005688c002366b4e9f2b67"
integrity sha512-Ez2aFel11b08H2HAWNnKf0GDV5ATGBmxK9UXHXxoKwCEoQey9manXDTwB2n3mhgOvMRzGH/YTHACdqQUjXf6Rw==

react-router-config@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/react-router-config/-/react-router-config-5.1.1.tgz#0f4263d1a80c6b2dc7b9c1902c9526478194a988"
Expand Down
2 changes: 2 additions & 0 deletions examples/formbot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ pipeline:
- name: EntitySynonymMapper

policies:
- name: TEDPolicy
- name: AugmentedMemoizationPolicy
- name: RulePolicy
306 changes: 0 additions & 306 deletions examples/formbot/data/nlu.md

This file was deleted.

Loading

0 comments on commit 889d3b8

Please sign in to comment.