Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- proper Gatsby v3 update - migration from sass to tailwindcss - fonts from fontsource - layout & style improve - removed client-side analytics - ...
- Loading branch information
1 parent
54698b1
commit e28c226
Showing
47 changed files
with
1,604 additions
and
1,897 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
package.json | ||
package-lock.json | ||
public | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"semi": false, | ||
"singleQuote": false, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
[![Netlify Status](https://api.netlify.com/api/v1/badges/c8d5fbfe-53af-4bed-b2c4-f3d533d4e35e/deploy-status)](https://app.netlify.com/sites/tender-wescoff-25bea4/deploys) | ||
|
||
:rocket: continiously building... | ||
:rocket: continiously building... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,6 @@ | ||
exports.onRouteUpdate = ({ location }) => { | ||
runAnalytics(location) | ||
} | ||
import './src/styles/global.css' | ||
|
||
function runAnalytics(location) { | ||
if (window.location.hostname !== 'vandevoorde.me') { | ||
return | ||
} | ||
|
||
if (window.goatcounter == null) { | ||
window.setTimeout(runAnalytics, 500) | ||
return | ||
} | ||
|
||
window.goatcounter.vars = {no_onload: true} | ||
window.counter = 'https://vandevoorde.goatcounter.com/count' | ||
|
||
window.goatcounter.count({ | ||
page: location.pathname + location.search + location.hash, | ||
}); | ||
} | ||
import '@fontsource/fira-sans/300.css' | ||
import '@fontsource/fira-sans/400.css' | ||
import '@fontsource/fira-sans/400-italic.css' | ||
import '@fontsource/fira-sans/700.css' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,75 @@ | ||
module.exports = { | ||
siteMetadata: { | ||
title: `Charles Vandevoorde`, | ||
description: `Personal website of Charles Vandevoorde`, | ||
author: `Charles Vandevoorde`, | ||
siteUrl: `https://vandevoorde.me` | ||
title: 'Charles Vandevoorde', | ||
description: 'Personal website of Charles Vandevoorde', | ||
author: 'Charles Vandevoorde', | ||
siteUrl: 'https://vandevoorde.me', | ||
}, | ||
plugins: [ | ||
`gatsby-plugin-react-helmet`, | ||
'gatsby-plugin-react-helmet', | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
resolve: 'gatsby-source-filesystem', | ||
options: { | ||
name: `images`, | ||
path: `${__dirname}/src/images`, | ||
}, | ||
}, | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
options: { | ||
name: `blogpost`, | ||
name: 'blogpost', | ||
path: `${__dirname}/src/pages/blog`, | ||
}, | ||
}, | ||
'gatsby-transformer-remark', | ||
{ | ||
resolve: `gatsby-source-filesystem`, | ||
resolve: 'gatsby-plugin-feed', | ||
options: { | ||
name: `assets`, | ||
path: `${__dirname}/src/assets`, | ||
query: ` | ||
{ | ||
site { | ||
siteMetadata { | ||
title | ||
description | ||
siteUrl | ||
site_url: siteUrl | ||
} | ||
} | ||
} | ||
`, | ||
feeds: [ | ||
{ | ||
serialize: ({ query: { site, allMarkdownRemark } }) => { | ||
return allMarkdownRemark.nodes.map((node) => { | ||
return Object.assign({}, node.frontmatter, { | ||
description: node.frontmatter.description, | ||
date: node.frontmatter.date, | ||
url: site.siteMetadata.siteUrl + node.fields.slug, | ||
guid: site.siteMetadata.siteUrl + node.fields.slug, | ||
custom_elements: [{ 'content:encoded': node.html }], | ||
}) | ||
}) | ||
}, | ||
query: ` | ||
{ | ||
allMarkdownRemark(sort: {order: DESC, fields: frontmatter___date}, filter: {frontmatter: {draft: {ne: true}}}) { | ||
nodes { | ||
excerpt | ||
html | ||
frontmatter { | ||
title | ||
date | ||
description | ||
} | ||
fields { | ||
slug | ||
} | ||
} | ||
} | ||
} | ||
`, | ||
output: '/rss.xml', | ||
}, | ||
], | ||
}, | ||
}, | ||
`gatsby-transformer-sharp`, | ||
`gatsby-plugin-sharp`, | ||
`gatsby-plugin-sass`, | ||
`gatsby-background-image`, | ||
`gatsby-transformer-remark`, | ||
`gatsby-plugin-sitemap`, | ||
'gatsby-plugin-image', | ||
'gatsby-transformer-sharp', | ||
'gatsby-plugin-sharp', | ||
'gatsby-plugin-sitemap', | ||
'gatsby-plugin-postcss', | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
const { createFilePath } = require(`gatsby-source-filesystem`) | ||
const path = require("path") | ||
const path = require('path') | ||
|
||
exports.onCreateNode = ({ node, getNode, actions }) => { | ||
if (node.internal.type === 'MarkdownRemark') { | ||
createMarkdownNode(node, getNode, actions) | ||
} | ||
if (node.internal.type === 'MarkdownRemark') { | ||
createMarkdownNode(node, getNode, actions) | ||
} | ||
} | ||
|
||
exports.createPages = async ({ graphql, actions }) => { | ||
await createBlogPages(graphql, actions) | ||
await createBlogPages(graphql, actions) | ||
} | ||
|
||
function createMarkdownNode(node, getNode, actions) { | ||
const slug = createFilePath({ node, getNode, basePath: 'src/blog' }) | ||
actions.createNodeField({ | ||
node, | ||
name: 'slug', | ||
value: `/blog${slug}`, | ||
}) | ||
const slug = createFilePath({ node, getNode, basePath: 'src/blog' }) | ||
actions.createNodeField({ | ||
node, | ||
name: 'slug', | ||
value: `/blog${slug}`, | ||
}) | ||
} | ||
|
||
async function createBlogPages(graphql, actions) { | ||
const result = await graphql(` | ||
query { | ||
allMarkdownRemark { | ||
edges { | ||
node { | ||
fields { | ||
slug | ||
} | ||
} | ||
} | ||
const result = await graphql(` | ||
query { | ||
allMarkdownRemark { | ||
edges { | ||
node { | ||
fields { | ||
slug | ||
} | ||
} | ||
} | ||
`) | ||
result.data.allMarkdownRemark.edges.forEach(({ node }) => { | ||
actions.createPage({ | ||
path: node.fields.slug, | ||
component: path.resolve('./src/templates/blogpost.js'), | ||
context: { | ||
slug: node.fields.slug, | ||
} | ||
}) | ||
} | ||
} | ||
`) | ||
result.data.allMarkdownRemark.edges.forEach(({ node }) => { | ||
actions.createPage({ | ||
path: node.fields.slug, | ||
component: path.resolve('./src/templates/blogpost.js'), | ||
context: { | ||
slug: node.fields.slug, | ||
}, | ||
}) | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
/** | ||
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file. | ||
* | ||
* See: https://www.gatsbyjs.org/docs/ssr-apis/ | ||
*/ | ||
|
||
// You can delete this file if you're not using it | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react' | ||
import { useStaticQuery, graphql, Link } from 'gatsby' | ||
|
||
const BaseLayout = ({ children, className }) => { | ||
const data = useStaticQuery(graphql` | ||
query SiteTitleQuery { | ||
site { | ||
siteMetadata { | ||
title | ||
} | ||
} | ||
} | ||
`) | ||
|
||
return ( | ||
<div | ||
className='grid grid-cols-3 gap-4 mx-2 my-8 md:mx-8 md:my-12' | ||
style={{ gridTemplateColumns: '1fr minmax(min-content, 60rem) 1fr' }} | ||
> | ||
<div className='relative col-start-2 2xl:col-start-1 2xl:row-start-1 2xl:col-span-1 2xl:h-32'> | ||
<Link | ||
to='/' | ||
className='2xl:absolute 2xl:bottom-1/3 2xl:right-0 text-3xl 2xl:text-4xl font-semibold' | ||
> | ||
{data.site.siteMetadata.title} | ||
</Link> | ||
</div> | ||
|
||
<div className='relative col-start-2 2xl:col-start-2 2xl:row-start-1 2xl:col-span-1 2xl:h-32'> | ||
<div className='2xl:absolute 2xl:bottom-1/3 space-x-6 text-xl font-mono'> | ||
<Link to='/about' className=''> | ||
about/ | ||
</Link> | ||
<Link to='/blog' className=''> | ||
blog/ | ||
</Link> | ||
</div> | ||
</div> | ||
|
||
<main | ||
className={`col-start-2 2xl:col-start-2 2xl:row-start-2 2xl:col-span-1 ${className}`} | ||
> | ||
{children} | ||
</main> | ||
</div> | ||
) | ||
} | ||
|
||
export default BaseLayout |
Oops, something went wrong.