Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1 of Contact page + basic CMS setup #5

Open
wants to merge 1 commit into
base: new-setup
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONTENTFUL_ACCESS_TOKEN='paste here access token'
CONTENTFUL_SPACE_ID=123
# zrobić plik .env.development lokalnie + dać go do gitignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: new lines at end of files

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
.cache/
public
src/gatsby-types.d.ts
.env.development
20 changes: 13 additions & 7 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { GatsbyConfig } from "gatsby";

require("dotenv").config({
path: `.env.${process.env.NODE_ENV}`,
})

const config: GatsbyConfig = {
siteMetadata: {
title: `ksi-website`,
Expand All @@ -9,13 +13,15 @@ const config: GatsbyConfig = {
// If you use VSCode you can also use the GraphQL plugin
// Learn more at: https://gatsby.dev/graphql-typegen
graphqlTypegen: true,
plugins: [{
resolve: 'gatsby-source-contentful',
options: {
"accessToken": "",
"spaceId": ""
}
}, "gatsby-plugin-image", "gatsby-plugin-sharp", "gatsby-transformer-sharp", "gatsby-plugin-sass", {
plugins: [
{
resolve: `gatsby-source-contentful`,
options: {
"spaceId": process.env.CONTENTFUL_SPACE_ID,
"accessToken": process.env.CONTENTFUL_ACCESS_TOKEN
}
},
"gatsby-plugin-image", "gatsby-plugin-sharp", "gatsby-transformer-sharp", "gatsby-plugin-sass", {
resolve: 'gatsby-source-filesystem',
options: {
"name": "images",
Expand Down
Loading