diff --git a/.editorconfig b/.editorconfig index ab597856..85216e5f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,5 @@ indent_style = space insert_final_newline = true trim_trailing_whitespace = true -[*.json] +[*.{json,yml,yaml}] indent_size = 2 diff --git a/content/concepts/architecture.md b/content/concepts/architecture.md new file mode 100644 index 00000000..c143375d --- /dev/null +++ b/content/concepts/architecture.md @@ -0,0 +1,4 @@ +--- +title: Architecture +sidebar: concepts +--- diff --git a/content/concepts/ecosystem.md b/content/concepts/ecosystem.md new file mode 100644 index 00000000..b4bf543d --- /dev/null +++ b/content/concepts/ecosystem.md @@ -0,0 +1,4 @@ +--- +title: Ecosystem +sidebar: concepts +--- diff --git a/content/concepts/introduction.md b/content/concepts/introduction.md index cda8255c..00e90997 100644 --- a/content/concepts/introduction.md +++ b/content/concepts/introduction.md @@ -1,5 +1,6 @@ --- title: Introduction +sidebar: concepts --- What is Ocean Protocol? diff --git a/content/concepts/security.md b/content/concepts/security.md new file mode 100644 index 00000000..d5bebeb6 --- /dev/null +++ b/content/concepts/security.md @@ -0,0 +1,4 @@ +--- +title: Security +sidebar: concepts +--- diff --git a/content/concepts/terminology.md b/content/concepts/terminology.md index b0382e7a..5d23a14c 100644 --- a/content/concepts/terminology.md +++ b/content/concepts/terminology.md @@ -1,5 +1,6 @@ --- title: Terminology +sidebar: concepts --- There is terminology specific to Ocean Protocol. @@ -43,4 +44,3 @@ A set of software libraries to interact with Ocean network participants, includi ## Pleuston An example marketplace frontend implemented using React and Squid-JavaScript. - diff --git a/content/concepts/vulnerabilities.md b/content/concepts/vulnerabilities.md new file mode 100644 index 00000000..ae29d92b --- /dev/null +++ b/content/concepts/vulnerabilities.md @@ -0,0 +1,4 @@ +--- +title: Reporting vulnerabilities +sidebar: concepts +--- diff --git a/gatsby-config.js b/gatsby-config.js index db72f0e4..6b220479 100755 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -34,6 +34,7 @@ module.exports = { ] } }, + 'gatsby-transformer-yaml', { resolve: 'gatsby-plugin-sass', options: { diff --git a/package.json b/package.json index c9dc0390..b2a79ab2 100755 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "gatsby-source-filesystem": "^2.0.7", "gatsby-transformer-remark": "^2.1.11", "gatsby-transformer-sharp": "^2.1.8", + "gatsby-transformer-yaml": "^2.1.4", "intersection-observer": "^0.5.1", "node-sass": "^4.10.0", "prismjs": "^1.15.0", diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx new file mode 100644 index 00000000..e5ea074c --- /dev/null +++ b/src/components/Sidebar.jsx @@ -0,0 +1,134 @@ +import React, { Component } from 'react' +import PropTypes from 'prop-types' +import { Link } from 'gatsby' +import styles from './Sidebar.module.scss' + +function groupExpanded(items, pathname) { + var breakException = {} + + try { + items.forEach(item => { + if (item.link === pathname) { + throw breakException + } + }) + } catch (e) { + if (e !== breakException) { + throw e + } else { + return true + } + } + return false +} + +const SidebarLink = ({ link, title, linkClasses }) => { + if (link) { + if (link.match(/^\s?http(s?)/gi)) { + return ( + + {title} + + ) + } else { + return ( + + {title} + + ) + } + } else { + return <>{this.props.title}> + } +} + +const SidebarList = ({ items, location }) => ( +