Skip to content

Commit

Permalink
Merge pull request #143 from DSchau/seo
Browse files Browse the repository at this point in the history
feat: add improved seo capabilities and various other tweaks
  • Loading branch information
pieh authored Dec 12, 2018
2 parents b4c6329 + a62eb72 commit 03173bd
Show file tree
Hide file tree
Showing 18 changed files with 200 additions and 157 deletions.
File renamed without changes
Binary file added content/assets/profile-pic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// custom typefaces
import 'typeface-montserrat'
import 'typeface-merriweather'
17 changes: 13 additions & 4 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@ module.exports = {
author: 'Kyle Mathews',
description: 'A starter blog demonstrating what Gatsby can do.',
siteUrl: 'https://gatsby-starter-blog-demo.netlify.com/',
social: {
twitter: 'kylemathews'
}
},
pathPrefix: '/gatsby-starter-blog',
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/pages`,
name: 'pages',
path: `${__dirname}/content/blog`,
name: 'blog',
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/content/assets`,
name: 'assets',
},
},
{
Expand Down Expand Up @@ -54,7 +63,7 @@ module.exports = {
background_color: `#ffffff`,
theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/assets/gatsby-icon.png`,
icon: `content/assets/gatsby-icon.png`,
},
},
`gatsby-plugin-offline`,
Expand Down
97 changes: 9 additions & 88 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"dependencies": {
"gatsby": "^2.0.19",
"gatsby-image": "^2.0.22",
"gatsby-plugin-feed": "^2.0.8",
"gatsby-plugin-google-analytics": "^2.0.5",
"gatsby-plugin-manifest": "^2.0.5",
Expand Down Expand Up @@ -36,7 +37,6 @@
"devDependencies": {
"eslint": "^4.19.1",
"eslint-plugin-react": "^7.11.1",
"gh-pages": "^1.2.0",
"prettier": "^1.14.2"
},
"homepage": "https://github.com/gatsbyjs/gatsby-starter-blog#readme",
Expand All @@ -51,13 +51,12 @@
},
"scripts": {
"dev": "gatsby develop",
"lint": "./node_modules/.bin/eslint --ext .js,.jsx --ignore-pattern public .",
"lint": "eslint --ext .js,.jsx --ignore-pattern public .",
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write 'src/**/*.js' 'src/**/*.md'",
"develop": "gatsby develop",
"start": "npm run develop",
"build": "gatsby build",
"deploy": "gatsby build --prefix-paths && gh-pages -d public",
"fix-semi": "eslint --quiet --ignore-pattern node_modules --ignore-pattern public --parser babel-eslint --no-eslintrc --rule '{\"semi\": [2, \"never\"], \"no-extra-semi\": [2]}' --fix gatsby-node.js"
}
}
41 changes: 0 additions & 41 deletions src/components/Bio.js

This file was deleted.

64 changes: 64 additions & 0 deletions src/components/bio.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import React from 'react'
import { StaticQuery, graphql } from 'gatsby'
import Image from 'gatsby-image'

import { rhythm } from '../utils/typography'

function Bio() {
return (
<StaticQuery
query={bioQuery}
render={data => {
const { author, social } = data.site.siteMetadata
return (
<div
style={{
display: 'flex',
marginBottom: rhythm(2.5),
}}
>
<Image
fixed={data.avatar.childImageSharp.fixed}
alt={author}
style={{
marginRight: rhythm(1 / 2),
marginBottom: 0,
minWidth: 50,
borderRadius: '100%'
}}
/>
<p>
Written by <strong>{author}</strong> who lives and works in San
Francisco building useful things.{' '}
<a href={`https://twitter.com/${social.twitter}`}>
You should follow him on Twitter
</a>
</p>
</div>
)
}}
/>
)
}

const bioQuery = graphql`
query BioQuery {
avatar:file(absolutePath: { regex: "/profile-pic.jpg/" }) {
childImageSharp {
fixed(width: 50, height: 50) {
...GatsbyImageSharpFixed
}
}
}
site {
siteMetadata {
author
social {
twitter
}
}
}
}
`

export default Bio
File renamed without changes.
Binary file removed src/components/profile-pic.jpg
Binary file not shown.
Loading

0 comments on commit 03173bd

Please sign in to comment.