1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Add ocean-subgraph readmes

This commit is contained in:
Akshay 2021-06-01 10:56:53 +02:00
parent e2b888f013
commit df86b98170
3 changed files with 9 additions and 17489 deletions

View File

@ -161,10 +161,12 @@ exports.createPages = ({ graphql, actions }) => {
const oceanPyList = filterMarkdownList(markdowns, 'ocean.py')
const aquariusList = filterMarkdownList(markdowns, 'aquarius')
const providerList = filterMarkdownList(markdowns, 'provider')
const subgraphList = filterMarkdownList(markdowns, 'ocean-subgraph')
await createReadTheDocsPage(createPage, 'ocean-py', oceanPyList)
await createReadTheDocsPage(createPage, 'aquarius', aquariusList)
await createReadTheDocsPage(createPage, 'provider', providerList)
await createReadTheDocsPage(createPage, 'ocean-subgraph', subgraphList)
resolve()
})
@ -177,8 +179,7 @@ exports.createPages = ({ graphql, actions }) => {
//
const createTypeDocPage = async (createPage, name, downloadUrl) => {
try {
const typedoc = require('./lib-0.14.9.json')
// const typedoc = await fetch(downloadUrl)
const typedoc = await fetch(downloadUrl)
const typedocTemplate = path.resolve('./src/templates/Typedoc/index.jsx')
const slug = `/references/${name}/`
@ -187,8 +188,7 @@ const createTypeDocPage = async (createPage, name, downloadUrl) => {
component: typedocTemplate,
context: {
slug,
typedoc
// typedoc: await typedoc.json()
typedoc: await typedoc.json()
}
})
} catch (error) {

File diff suppressed because it is too large Load Diff

View File

@ -116,7 +116,7 @@ const PropertyWrapper = ({ property, sourceUrl, parentAnchor }) => {
const sourceLink =
sources && sources[0]
? `${sourceUrl}${sources[0].fileName}#L${sources[0].line}`
? `${sourceUrl}src/${sources[0].fileName}#L${sources[0].line}`
: ''
return (
@ -178,7 +178,7 @@ const PropertyWrapper = ({ property, sourceUrl, parentAnchor }) => {
target="_blank"
rel="noopener noreferrer"
>
{`${sources[0].fileName}#L${sources[0].line}`}
{`src/${sources[0].fileName}#L${sources[0].line}`}
</a>
)}
</div>
@ -191,8 +191,8 @@ PropertyWrapper.propTypes = {
parentAnchor: PropTypes.string
}
const Entities = ({ entities, sourceUrl }) =>
entities.map(({ name, comment, children }) => (
const Entities = ({ entities, sourceUrl }) => {
return entities.map(({ name, comment, children }) => (
<div key={name} id={name && slugify(name)}>
<h2 className={styles.entityName}>
<code>{name}</code>
@ -215,7 +215,7 @@ const Entities = ({ entities, sourceUrl }) =>
))}
</div>
))
}
Entities.propTypes = {
entities: PropTypes.array.isRequired,
sourceUrl: PropTypes.string