Merge branch 'master' of github.com:gatsbyjs/gatsby-starter-blog
This commit is contained in:
commit
b43e467777
2 changed files with 12 additions and 1 deletions
5
.prettierrc
Normal file
5
.prettierrc
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,13 @@ class Template extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
const { location, children } = this.props
|
const { location, children } = this.props
|
||||||
let header
|
let header
|
||||||
if (location.pathname === '/') {
|
|
||||||
|
let rootPath = `/`
|
||||||
|
if (typeof __PREFIX_PATHS__ !== `undefined` && __PREFIX_PATHS__) {
|
||||||
|
rootPath = __PATH_PREFIX__ + `/`
|
||||||
|
}
|
||||||
|
|
||||||
|
if (location.pathname === rootPath) {
|
||||||
header = (
|
header = (
|
||||||
<h1
|
<h1
|
||||||
style={{
|
style={{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue