From 3c90a893904200b78601cd85d1d45ef44eb3a8a0 Mon Sep 17 00:00:00 2001 From: Heinrich Filter Date: Tue, 19 Sep 2017 09:01:18 +0200 Subject: [PATCH 1/2] Fixes #56 Make layout `pathPrefix` aware --- src/layouts/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/layouts/index.js b/src/layouts/index.js index a91dc38..fd4ae35 100644 --- a/src/layouts/index.js +++ b/src/layouts/index.js @@ -8,7 +8,13 @@ class Template extends React.Component { render() { const { location, children } = this.props let header - if (location.pathname === '/') { + + let rootPath = `/` + if (typeof __PREFIX_PATHS__ !== `undefined` && __PREFIX_PATHS__) { + rootPath = __PATH_PREFIX__ + `/` + } + + if (location.pathname === rootPath) { header = (

Date: Tue, 19 Sep 2017 09:14:04 +0200 Subject: [PATCH 2/2] Add .prettierrc --- .prettierrc | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..5149b1b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "trailingComma": "es5", + "semi": false, + "singleQuote": true +}