Skip to content

Commit

Permalink
Fix lint error and algolia plugin version
Browse files Browse the repository at this point in the history
  • Loading branch information
oodamien committed May 11, 2020
1 parent af96199 commit 58eef79
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
10 changes: 2 additions & 8 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,8 @@ exports.onCreateNode = async ({ node, getNode, actions }) => {
if (!startsWith(filename, '_')) {
// Page
const slug = createFilePath({ node, getNode, basePath: `pages` })
const category = frontmatterPath
.split('/')
.slice(0, 1)
.join('')
const sourcePath = relativePath
.split('/')
.slice(2)
.join('/')
const category = frontmatterPath.split('/').slice(0, 1).join('')
const sourcePath = relativePath.split('/').slice(2).join('/')
const isRoot = frontmatterPath.split('/').length === 2
let url = `/docs/${version}/${frontmatterPath}`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"classnames": "^2.2.6",
"gatsby": "^2.20.13",
"gatsby-image": "^2.3.1",
"gatsby-plugin-algolia": "^0.6.0",
"gatsby-plugin-algolia": "^0.5.0",
"gatsby-plugin-catch-links": "^2.2.1",
"gatsby-plugin-google-analytics": "^2.2.2",
"gatsby-plugin-google-tagmanager": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion plugins/spring-remark-download/gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports.onClientEntry = () => {
const req = new XMLHttpRequest()
req.open('GET', url, true)
req.responseType = 'blob'
req.onload = function(event) {
req.onload = function (event) {
const blob = req.response
const contentType = req.getResponseHeader('content-type')
if (window.navigator.msSaveOrOpenBlob) {
Expand Down
5 changes: 4 additions & 1 deletion src/components/documentation/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ export const getMeta = function getMeta(arr, page) {
const breadcrumb = getBreadcrumb(arr, page).reverse()
return {
title:
get(breadcrumb.find(item => get(item, 'meta.title')), 'meta.title') || '',
get(
breadcrumb.find(item => get(item, 'meta.title')),
'meta.title'
) || '',
description:
get(
breadcrumb.find(item => get(item, 'meta.description')),
Expand Down
4 changes: 1 addition & 3 deletions src/templates/documentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ class DocumentationTemplate extends React.Component {
<div className='edit-on-github'>
<a
className='button icon'
href={`https://github.com/spring-io/dataflow.spring.io/blob/${branch}/content/documentation/${
this.props.data.page.fields.sourcePath
}`}
href={`https://github.com/spring-io/dataflow.spring.io/blob/${branch}/content/documentation/${this.props.data.page.fields.sourcePath}`}
>
<IconEdit />
{` `}
Expand Down

0 comments on commit 58eef79

Please sign in to comment.