Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["macros"]
],
"presets": [
[
"babel-preset-gatsby",
{
"targets": {
"browsers": [">0.25%", "not dead"]
}
}
]
]
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
63 changes: 62 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,65 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
junit.xml

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
integration-tests/gatsby-cli/execution-folder/*
*.un~
dist
bin/published.js

# Build Path of Test Fixtures
test/**/public
.gatsby-context.js
.DS_Store
public/
node_modules/
e2e-tests/gatsby-pnp/
__diff_output__/
.cache/
public
.netlify
.Rhistory

# IDE specific
.idea/
.vscode/
*.sw*

# misc
.serverless/
.eslintcache
scripts/.env
.env*
src/gatsby-types.d.ts
graphql-types.ts

# lock files
yarn.lock
package-lock.json
# ignore any lock file other than main lock file
!/yarn.lock

.parcel-cache
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.cache
package.json
package-lock.json
public
node_modules
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
5 changes: 5 additions & 0 deletions babel-plugin-macros.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
"fontawesome-svg-core": {
license: "free",
},
};
1 change: 1 addition & 0 deletions gatsby-browser.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./src/styles/global.css";
85 changes: 61 additions & 24 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,76 @@
import type { GatsbyConfig } from "gatsby";
import path from "path";

const config: GatsbyConfig = {
siteMetadata: {
title: `Gatsby MDX & Netlify Starter`,
siteUrl: `https://www.yourdomain.tld`
description: `A Gatsby starter built on mdx, netlify cms, and tailwindcss`,
siteUrl: `https://www.yourdomain.tld`,
},
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
// If you use VSCode you can also use the GraphQL plugin
// Learn more at: https://gatsby.dev/graphql-typegen
graphqlTypegen: true,
plugins: ["gatsby-plugin-netlify-cms", "gatsby-plugin-sass", {
resolve: 'gatsby-plugin-google-analytics',
options: {
"trackingId": "1234567890"
}
}, "gatsby-plugin-image", "gatsby-plugin-sitemap", {
resolve: 'gatsby-plugin-manifest',
options: {
"icon": "src/images/icon.png"
}
}, "gatsby-plugin-mdx", "gatsby-plugin-sharp", "gatsby-transformer-sharp", {
resolve: 'gatsby-source-filesystem',
options: {
"name": "images",
"path": "./src/images/"
plugins: [
"gatsby-plugin-netlify-cms",
"gatsby-plugin-sass",
{
resolve: "gatsby-plugin-google-analytics",
options: {
trackingId: "1234567890",
},
},
__key: "images"
}, {
resolve: 'gatsby-source-filesystem',
options: {
"name": "pages",
"path": "./src/pages/"
"gatsby-plugin-postcss",
"gatsby-plugin-image",
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-manifest",
options: {
icon: "src/images/icon.png",
},
},
__key: "pages"
}]
{
resolve: "gatsby-plugin-graphql-codegen",
options: {
codegen: true,
},
},
{
resolve: "gatsby-plugin-mdx",
options: {
defaultLayouts: {
pages: path.resolve("./src/components/layouts/default-layout.tsx"),
default: path.resolve("./src/components/layouts/default-layout.tsx"),
},
},
},
"gatsby-plugin-sharp",
"gatsby-transformer-sharp",
{
resolve: "gatsby-source-filesystem",
options: {
name: "images",
path: "./src/images/",
},
__key: "images",
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "pages",
path: "./src/pages/",
},
__key: "pages",
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "posts",
path: "./src/posts/",
},
__key: "posts",
},
],
};

export default config;
17 changes: 17 additions & 0 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// imports
import createPosts, { CreatePostsProps } from "./src/gatsby/create-posts";

/**
* Create Posts
*/
export const createPages = async ({
actions,
graphql,
reporter,
}: CreatePostsProps) => {
// create posts
const postActivity = reporter.activityTimer(`Create post`);
postActivity.start();
await createPosts({ actions, graphql, reporter });
postActivity.end();
};
Loading