diff --git a/data/sidebars/references.yml b/data/sidebars/references.yml index f24ff904..d3111688 100644 --- a/data/sidebars/references.yml +++ b/data/sidebars/references.yml @@ -47,3 +47,8 @@ items: - title: API Reference link: https://github.com/oceanprotocol/provider-py + +- group: Ocean Subgraph + items: + - title: Readme References + link: /read-the-docs/ocean-subgraph/ diff --git a/gatsby-node.js b/gatsby-node.js index 8472f73a..3cb3300e 100755 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -73,6 +73,7 @@ exports.createPages = ({ graphql, actions }) => { title app module + version } } } @@ -133,7 +134,10 @@ exports.createPages = ({ graphql, actions }) => { // API: ocean.js const lastRelease = result.data.oceanJs.repository.releases.edges.filter( - ({ node }) => !node.isPrerelease && !node.isDraft + ({ node }) => + !node.isPrerelease && + !node.isDraft && + node.releaseAssets.edges.length > 0 )[0].node.releaseAssets.edges[0].node await createTypeDocPage( @@ -159,10 +163,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() }) @@ -184,39 +190,7 @@ const createTypeDocPage = async (createPage, name, downloadUrl) => { component: typedocTemplate, context: { slug, - typedoc: await typedoc.json(), - // We define the classes here so the data object passed as page context - // is as small as possible. - // Caveat: no live update during development when these values are changed. - // - // TODO: defining these classes for inclusion - // needs to be handled somewhere else to keep - // it generic for all TypeDoc specs - classes: [ - 'ocean/Ocean', - 'ocean/Account', - 'ocean/Assets', - 'ocean/Compute', - 'ocean/Versions', - 'ocean/DID', - 'ddo/DDO', - 'metadatacache/MetadataCache', - 'metadatacache/OnChainMetaDataCache', - 'provider/Provider', - 'datatokens/Datatokens', - 'datatokens/Network', - 'datatokens/Web3Provider', - 'balancer/OceanPool', - 'balancer/Pool', - 'balancer/PoolFactory', - 'exchange/FixedRateExchange', - 'models/Config', - 'utils/ConfigHelper', - 'utils/GasUtils', - 'ocean/utils/OceanUtils', - 'ocean/utils/WebServiceConnector', - 'utils/Logger' - ] + typedoc: await typedoc.json() } }) } catch (error) { diff --git a/src/templates/ContentWrapperTemplate.jsx b/src/templates/ContentWrapperTemplate.jsx new file mode 100644 index 00000000..c26c5bb8 --- /dev/null +++ b/src/templates/ContentWrapperTemplate.jsx @@ -0,0 +1,80 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' +import { Helmet } from 'react-helmet' +import Layout from '../components/Layout' +import Content from '../components/Content' +import HeaderSection from '../components/HeaderSection' +import Sidebar from '../components/Sidebar' +import DocHeader from '../components/DocHeader' +import Seo from '../components/Seo' + +import stylesDoc from './Doc.module.scss' + +export default class ContentWrapperTemplate extends Component { + static propTypes = { + data: PropTypes.object.isRequired, + location: PropTypes.object.isRequired, + slug: PropTypes.string.isRequired, + toc: PropTypes.object.isRequired, + info: PropTypes.object.isRequired, + children: PropTypes.any + } + + sectionTitle = this.props.data.allSectionsYaml.edges.map(({ node }) => { + if (node.title.toLowerCase().includes('references')) { + return node.title + } + }) + + render() { + const { location } = this.props + const { title, description, version } = this.props.info + + return ( + <> + + + + + + + + + + +
+ +
+ + v{version} + + } + /> + + {this.props.children} +
+
+
+
+ + ) + } +} diff --git a/src/templates/Markdown/MarkdownList.jsx b/src/templates/Markdown/MarkdownList.jsx index df974c9c..bc4ef530 100644 --- a/src/templates/Markdown/MarkdownList.jsx +++ b/src/templates/Markdown/MarkdownList.jsx @@ -84,11 +84,6 @@ export default function MarkdownList({ location, pageContext }) { -
- - This documentation is a work in progess. Please feel free to report - any issues. -