mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
remove dev-ocean
This commit is contained in:
parent
459e80b9ce
commit
76c1857046
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,4 +0,0 @@
|
|||||||
[submodule "external/dev-ocean"]
|
|
||||||
path = external/dev-ocean
|
|
||||||
url = https://github.com/oceanprotocol/dev-ocean
|
|
||||||
branch = master
|
|
@ -17,8 +17,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
githubContentPath:
|
githubContentPath:
|
||||||
'https://github.com/oceanprotocol/docs/blob/master/content',
|
'https://github.com/oceanprotocol/docs/blob/master/content',
|
||||||
githubDevOceanPath:
|
|
||||||
'https://github.com/oceanprotocol/dev-ocean/blob/master/doc',
|
|
||||||
redirects: [
|
redirects: [
|
||||||
{
|
{
|
||||||
from: '/concepts/',
|
from: '/concepts/',
|
||||||
|
1
external/dev-ocean
vendored
1
external/dev-ocean
vendored
@ -1 +0,0 @@
|
|||||||
Subproject commit ba98510529e00ff9411a7df8a8c478dc3b58b635
|
|
@ -44,13 +44,6 @@ module.exports = {
|
|||||||
path: `${__dirname}/node_modules/@oceanprotocol/art`
|
path: `${__dirname}/node_modules/@oceanprotocol/art`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
resolve: 'gatsby-source-filesystem',
|
|
||||||
options: {
|
|
||||||
name: 'dev-ocean',
|
|
||||||
path: `${__dirname}/external/dev-ocean/doc`
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-source-graphql',
|
resolve: 'gatsby-source-graphql',
|
||||||
options: {
|
options: {
|
||||||
|
@ -58,25 +58,6 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
devOceanDocs: allMarkdownRemark(
|
|
||||||
filter: { fileAbsolutePath: { regex: "/dev-ocean/doc/" } }
|
|
||||||
) {
|
|
||||||
edges {
|
|
||||||
node {
|
|
||||||
fields {
|
|
||||||
slug
|
|
||||||
section
|
|
||||||
}
|
|
||||||
frontmatter {
|
|
||||||
slug
|
|
||||||
title
|
|
||||||
description
|
|
||||||
section
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
oceanJs: github {
|
oceanJs: github {
|
||||||
repository(name: "ocean.js", owner: "oceanprotocol") {
|
repository(name: "ocean.js", owner: "oceanprotocol") {
|
||||||
name
|
name
|
||||||
@ -126,32 +107,6 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
//
|
|
||||||
// Create pages from dev-ocean contents
|
|
||||||
//
|
|
||||||
const postsDevOcean = result.data.devOceanDocs.edges
|
|
||||||
|
|
||||||
postsDevOcean
|
|
||||||
// only grab files with required frontmatter defined
|
|
||||||
.filter(
|
|
||||||
(post) =>
|
|
||||||
post.node.frontmatter &&
|
|
||||||
post.node.frontmatter.slug &&
|
|
||||||
post.node.frontmatter.title &&
|
|
||||||
post.node.frontmatter.description &&
|
|
||||||
post.node.frontmatter.section
|
|
||||||
)
|
|
||||||
.forEach((post) => {
|
|
||||||
createPage({
|
|
||||||
path: `${post.node.fields.slug}`,
|
|
||||||
component: docTemplate,
|
|
||||||
context: {
|
|
||||||
slug: post.node.fields.slug,
|
|
||||||
section: post.node.fields.section
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// API: brizo, aquarius
|
// API: brizo, aquarius
|
||||||
await createSwaggerPages(createPage)
|
await createSwaggerPages(createPage)
|
||||||
|
|
||||||
|
@ -2,24 +2,11 @@ import React from 'react'
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { ReactComponent as Pencil } from '../images/pencil.svg'
|
import { ReactComponent as Pencil } from '../images/pencil.svg'
|
||||||
import styles from './DocFooter.module.scss'
|
import styles from './DocFooter.module.scss'
|
||||||
import { social, githubContentPath, githubDevOceanPath } from '../../config'
|
import { social, githubContentPath } from '../../config'
|
||||||
|
|
||||||
export default function DocFooter({ post, url, externalName }) {
|
export default function DocFooter({ post, url, externalName }) {
|
||||||
let path
|
|
||||||
|
|
||||||
if (post) {
|
if (post) {
|
||||||
const { sourceInstanceName } = post.parent
|
url = `${githubContentPath}/${post.parent.relativePath}`
|
||||||
|
|
||||||
switch (sourceInstanceName) {
|
|
||||||
case 'dev-ocean':
|
|
||||||
path = githubDevOceanPath
|
|
||||||
externalName = sourceInstanceName
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
path = githubContentPath
|
|
||||||
}
|
|
||||||
|
|
||||||
url = `${path}/${post.parent.relativePath}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user