mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Feature: Add source url in markdown footer
This commit is contained in:
parent
31132a3bff
commit
787221008d
@ -68,6 +68,7 @@ exports.createPages = ({ graphql, actions }) => {
|
||||
htmlAst
|
||||
tableOfContents
|
||||
frontmatter {
|
||||
source
|
||||
title
|
||||
app
|
||||
module
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import DocContent from '../components/DocContent'
|
||||
import styles from '../components/DocFooter.module.scss'
|
||||
import Content from '../components/Content'
|
||||
|
||||
export default function MarkdownTemplate({ data }) {
|
||||
@ -13,6 +14,15 @@ export default function MarkdownTemplate({ data }) {
|
||||
) : (
|
||||
<div>No content present</div>
|
||||
)}
|
||||
<footer className={styles.footer}>
|
||||
<a
|
||||
style={{ cursor: 'pointer' }}
|
||||
href={post.frontmatter.source}
|
||||
target="_blank"
|
||||
>
|
||||
View source on Github
|
||||
</a>
|
||||
</footer>
|
||||
</Content>
|
||||
</>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user