mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
add past versions linking to swaggerhub
This commit is contained in:
parent
dfe712516b
commit
c5c143f2ae
@ -173,6 +173,7 @@ exports.createPages = ({ graphql, actions }) => {
|
||||
component: apiSwaggerTemplate,
|
||||
context: {
|
||||
slug: slugAquarius,
|
||||
name: swaggerComponents[0],
|
||||
api: specAquarius
|
||||
}
|
||||
})
|
||||
@ -185,6 +186,7 @@ exports.createPages = ({ graphql, actions }) => {
|
||||
component: apiSwaggerTemplate,
|
||||
context: {
|
||||
slug: slugBrizo,
|
||||
name: swaggerComponents[1],
|
||||
api: specBrizo
|
||||
}
|
||||
})
|
||||
|
@ -50,9 +50,17 @@
|
||||
}
|
||||
|
||||
.version {
|
||||
color: $brand-grey-light;
|
||||
font-size: $font-size-base;
|
||||
font-family: $font-family-monospace;
|
||||
color: $brand-grey-light;
|
||||
|
||||
a {
|
||||
font-size: $font-size-mini;
|
||||
font-family: $font-family-base;
|
||||
font-weight: $font-weight-base;
|
||||
display: inline-block;
|
||||
margin-left: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.pathName {
|
||||
|
@ -69,7 +69,7 @@ export default class ApiSwaggerTemplate extends Component {
|
||||
|
||||
render() {
|
||||
const { location, pageContext } = this.props
|
||||
const { api } = pageContext
|
||||
const { api, name } = pageContext
|
||||
const { host, basePath, info, paths } = api
|
||||
const { title, description, version, license, contact } = info
|
||||
|
||||
@ -106,7 +106,12 @@ export default class ApiSwaggerTemplate extends Component {
|
||||
description={description}
|
||||
prepend={
|
||||
<span className={stylesDoc.version}>
|
||||
{version}
|
||||
<span>v{version}</span>
|
||||
<a
|
||||
href={`https://app.swaggerhub.com/apis/Ocean-Protocol/${name}`}
|
||||
>
|
||||
past versions
|
||||
</a>
|
||||
</span>
|
||||
}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user