more plugins

This commit is contained in:
Matthias Kretschmann 2018-11-09 22:59:22 +01:00
parent 679ad1b4f1
commit 582c06335d
Signed by: m
GPG Key ID: 606EEEF3C479A91F
6 changed files with 31 additions and 46 deletions

View File

@ -1,4 +1,4 @@
[![banner](https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png)](https://oceanprotocol.com)
[![banner](https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png)](https://docs.oceanprotocol.com)
<h1 align="center">docs</h1>

View File

@ -1,13 +1,15 @@
const title = 'Ocean Protocol Documentation'
const description =
'Learn everything about how to develop with Ocean Prototocol'
const siteUrl = process.env.SITE_URL || 'https://docs.oceanprotocol.com'
const config = {
title: 'Ocean Protocol Documentation',
description: 'Learn everything about how to develop with Ocean Prototocol',
siteUrl: process.env.SITE_URL || 'https://docs.oceanprotocol.com',
analyticsId: 'UA-60614729-11'
}
module.exports = {
siteMetadata: {
title,
description,
siteUrl
title: config.title,
description: config.description,
siteUrl: config.siteUrl
},
plugins: [
{
@ -55,8 +57,7 @@ module.exports = {
},
'gatsby-remark-smartypants',
'gatsby-remark-prismjs',
'gatsby-remark-autolink-headers',
'gatsby-remark-relative-linker'
'gatsby-remark-autolink-headers'
]
}
},
@ -82,11 +83,13 @@ module.exports = {
},
'gatsby-plugin-catch-links',
'gatsby-plugin-react-helmet',
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-plugin-manifest',
options: {
name: title,
name: config.title,
short_name: 'Docs',
description: config.description,
start_url: '/',
background_color: '#e2e2e2',
theme_color: '#141414',
@ -94,6 +97,16 @@ module.exports = {
icon: 'src/images/profile.png'
}
},
'gatsby-plugin-offline'
'gatsby-plugin-offline',
{
resolve: 'gatsby-plugin-google-analytics',
options: {
trackingId: config.analyticsId,
head: false,
anonymize: true,
respectDNT: true,
cookieDomain: 'oceanprotocol.com'
}
}
]
}

View File

@ -8,11 +8,13 @@
"gatsby": "^2.0.44",
"gatsby-image": "^2.0.20",
"gatsby-plugin-catch-links": "^2.0.8",
"gatsby-plugin-google-analytics": "^2.0.7",
"gatsby-plugin-manifest": "^2.0.8",
"gatsby-plugin-offline": "^2.0.13",
"gatsby-plugin-react-helmet": "^3.0.1",
"gatsby-plugin-sass": "^2.0.4",
"gatsby-plugin-sharp": "^2.0.12",
"gatsby-plugin-sitemap": "^2.0.2",
"gatsby-plugin-svgr": "^2.0.0-alpha",
"gatsby-remark-autolink-headers": "^2.0.11",
"gatsby-remark-images": "^2.0.6",

View File

@ -1,33 +0,0 @@
//
// https://stackoverflow.com/a/48864225/733677
//
// const visit = require('unist-util-visit')
// module.exports = ({ markdownAST }) => {
// visit(markdownAST, 'link', node => {
// if (node.url && node.url.endsWith('.md') && node.url.startsWith('./')) {
// node.url = node.url.replace(
// /(.*)\.(\w{2}).md(#.*)?$/gi,
// (match, base, hash) => {
// return `/`
// }
// )
// }
// if (
// node.url &&
// node.url.endsWith('.md') &&
// node.url.startsWith('../')
// ) {
// node.url = node.url.replace(
// /(.*)\.(\w{2}).md(#.*)?$/gi,
// (match, base, hash) => {
// return `/`
// }
// )
// }
// })
// return markdownAST
// }

4
static/robots.txt Normal file
View File

@ -0,0 +1,4 @@
User-agent: *
Disallow: */test
sitemap: https://docs.oceanprotocol.com/sitemap.xml