diff --git a/LICENSE-content b/LICENSE-content
deleted file mode 100644
index 5ce29441..00000000
--- a/LICENSE-content
+++ /dev/null
@@ -1,3 +0,0 @@
-All post content under `./content/posts` is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
-
-http://creativecommons.org/licenses/by-nc-sa/4.0/.
diff --git a/LICENSE-photos b/LICENSE-photos
deleted file mode 100644
index e4e1e1d5..00000000
--- a/LICENSE-photos
+++ /dev/null
@@ -1,6 +0,0 @@
-All photos & image assets under `./content/media`, `./src/images`, and `assets sheet.psd` are plain ol' copyright.
-
-Copyright (c) 2008–2018 Matthias Kretschmann
-
-Don't care if you fork & play with it, but you're not allowed to publish
-anything from it as a whole without my written permission.
diff --git a/README.md b/README.md
index 3622c3c5..a5199bf7 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,7 @@
- [🎆 EXIF extraction](#-exif-extraction)
- [💰 Cryptocurrency donation via Web3/MetaMask](#-cryptocurrency-donation-via-web3metamask)
- [🕸 Related Posts](#-related-posts)
+ - [🔍 Search](#-search)
- [🐝 Coinhive](#-coinhive)
- [🏆 SEO component](#-seo-component)
- [📈 Matomo (formerly Piwik) analytics tracking](#-matomo-formerly-piwik-analytics-tracking)
@@ -83,6 +84,10 @@ If you want to know how this works, have a look at the respective component unde
- [`src/components/molecules/RelatedPosts.jsx`](src/components/molecules/RelatedPosts.jsx)
+### 🔍 Search
+
+[gatsby-plugin-lunr](https://github.com/humanseelabs/gatsby-plugin-lunr)
+
### 🐝 Coinhive
Includes a component for mining Monero with JavaScript via [Coinhive](https://coinhive.com).
@@ -198,20 +203,18 @@ The deploymeng script can be used locally too, the branch checks are only happen
The MIT License (MIT)
-except for:
+EXCEPT FOR:
### Posts
-
-
-
+[![Creative Commons License](https://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png)](http://creativecommons.org/licenses/by-nc-sa/4.0/)
-All post content under `./content/posts` is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
+All post content under `./content/posts` is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).
### Photos & images
-All photos & image assets under `./content/media`, `./src/images`, and `assets sheet.psd` are plain ol' copyright.
+All photos & image assets are plain ol' copyright.
Copyright (c) 2008–2018 Matthias Kretschmann
-Don't care if you fork & play with it, but you're not allowed to publish anything from it as a whole without my written permission.
+Don't care if you fork & play with it, but you're not allowed to publish anything from it as a whole without my written permission. Also please be aware, the combination of typography, colors & layout makes up my brand identity. So please don't just clone everything, but rather do a remix!
diff --git a/gatsby-config.js b/gatsby-config.js
index b6dfe13d..498c8ff4 100644
--- a/gatsby-config.js
+++ b/gatsby-config.js
@@ -100,8 +100,9 @@ module.exports = {
// Attributes for custom indexing logic. See https://lunrjs.com/docs/lunr.Builder.html for details
fields: [
{ name: 'title', store: true, attributes: { boost: 20 } },
+ { name: 'tags', attributes: { boost: 15 } },
+ { name: 'slug', store: true },
{ name: 'excerpt', attributes: { boost: 10 } },
- { name: 'tags', store: true, attributes: { boost: 5 } },
{ name: 'content' }
],
// How to resolve each field's value for a supported node type
@@ -111,7 +112,8 @@ module.exports = {
title: node => node.frontmatter.title,
excerpt: node => node.excerpt,
tags: node => node.frontmatter.tags,
- content: node => node.rawMarkdownBody
+ content: node => node.rawMarkdownBody,
+ slug: node => node.fields.slug
}
}
}
diff --git a/src/components/Search/Search.jsx b/src/components/Search/Search.jsx
index 6be43e6e..55601c16 100644
--- a/src/components/Search/Search.jsx
+++ b/src/components/Search/Search.jsx
@@ -1,4 +1,4 @@
-import React, { PureComponent, Fragment } from 'react'
+import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import { CSSTransition } from 'react-transition-group'
@@ -25,16 +25,6 @@ export default class Search extends PureComponent {
}))
}
- closeSearch = () => {
- this.setState({
- searchOpen: false,
- query: '',
- results: []
- })
- }
-
- isSearchOpen = () => this.state.searchOpen === true
-
getSearchResults(query) {
if (!query || !window.__LUNR__) return []
const lunrIndex = window.__LUNR__[this.props.lng]
@@ -55,34 +45,32 @@ export default class Search extends PureComponent {
const { searchOpen, query, results } = this.state
return (
-