mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
embed any file's content from GitHub
This commit is contained in:
parent
f5bc1ae68a
commit
2b570b4726
@ -377,3 +377,14 @@ Resulting in:
|
|||||||
|
|
||||||
<repo name="aquarius" readme="true"></repo>
|
<repo name="aquarius" readme="true"></repo>
|
||||||
|
|
||||||
|
### Embedding File Contents from GitHub
|
||||||
|
|
||||||
|
You can embed any file contents like so, note that the language needs to be defined manually to get proper syntax highlighting:
|
||||||
|
|
||||||
|
```text
|
||||||
|
GITHUB-EMBED https://github.com/oceanprotocol/squid-js/blob/develop/src/keeper/Web3Provider.ts js GITHUB-EMBED
|
||||||
|
```
|
||||||
|
|
||||||
|
Resulting in:
|
||||||
|
|
||||||
|
GITHUB-EMBED https://github.com/oceanprotocol/squid-js/blob/develop/src/keeper/Web3Provider.ts js GITHUB-EMBED
|
||||||
|
@ -73,6 +73,17 @@ module.exports = {
|
|||||||
showCaptions: true
|
showCaptions: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
resolve: 'gatsby-remark-github',
|
||||||
|
options: {
|
||||||
|
marker: 'GITHUB-EMBED',
|
||||||
|
insertEllipsisComments: true,
|
||||||
|
ellipsisPhrase: '...',
|
||||||
|
useCache: true,
|
||||||
|
cacheKey: 'gatsby-remark-github-v1',
|
||||||
|
token: process.env.GITHUB_TOKEN
|
||||||
|
}
|
||||||
|
},
|
||||||
'gatsby-remark-smartypants',
|
'gatsby-remark-smartypants',
|
||||||
'gatsby-remark-embed-video',
|
'gatsby-remark-embed-video',
|
||||||
'gatsby-remark-responsive-iframe',
|
'gatsby-remark-responsive-iframe',
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
"gatsby-remark-component": "^1.1.3",
|
"gatsby-remark-component": "^1.1.3",
|
||||||
"gatsby-remark-copy-linked-files": "^2.0.6",
|
"gatsby-remark-copy-linked-files": "^2.0.6",
|
||||||
"gatsby-remark-embed-video": "^1.4.0",
|
"gatsby-remark-embed-video": "^1.4.0",
|
||||||
|
"gatsby-remark-github": "^1.0.1",
|
||||||
"gatsby-remark-images": "^2.0.6",
|
"gatsby-remark-images": "^2.0.6",
|
||||||
"gatsby-remark-prismjs": "^3.0.3",
|
"gatsby-remark-prismjs": "^3.0.3",
|
||||||
"gatsby-remark-responsive-iframe": "^2.0.6",
|
"gatsby-remark-responsive-iframe": "^2.0.6",
|
||||||
|
@ -18,7 +18,7 @@ const HeaderSection = ({ title }) => (
|
|||||||
)
|
)
|
||||||
|
|
||||||
HeaderSection.propTypes = {
|
HeaderSection.propTypes = {
|
||||||
title: PropTypes.array
|
title: PropTypes.PropTypes.oneOfType([PropTypes.array, PropTypes.string])
|
||||||
}
|
}
|
||||||
|
|
||||||
export default HeaderSection
|
export default HeaderSection
|
||||||
|
@ -174,7 +174,7 @@ const Repository = ({ name, links, readme }) => (
|
|||||||
Repository.propTypes = {
|
Repository.propTypes = {
|
||||||
name: PropTypes.string.isRequired,
|
name: PropTypes.string.isRequired,
|
||||||
links: PropTypes.array,
|
links: PropTypes.array,
|
||||||
readme: PropTypes.bool
|
readme: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Repository
|
export default Repository
|
||||||
|
Loading…
Reference in New Issue
Block a user