Skip to content

Commit

Permalink
Merge pull request #5 from clean-commit/0.4.0
Browse files Browse the repository at this point in the history
0.4.0
  • Loading branch information
mrkaluzny committed Dec 31, 2020
2 parents 786d56d + 103cde1 commit ab96b66
Show file tree
Hide file tree
Showing 24 changed files with 499 additions and 289 deletions.
1 change: 1 addition & 0 deletions font-preload-cache.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"timestamp":1609420980313,"hash":"ac50634ff82262e6dd980c51fe15d13d","assets":{"/dev-404-page":{"/fonts/Wotfard/wotfard-regular-webfont.woff2":true},"/":{"/fonts/Wotfard/wotfard-regular-webfont.woff2":true},"/404.html":{"/fonts/Wotfard/wotfard-regular-webfont.woff2":true},"/404":{"/fonts/Wotfard/wotfard-regular-webfont.woff2":true}}}
1 change: 1 addition & 0 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@/styles/main.scss'
18 changes: 9 additions & 9 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ const tailwind = require('tailwindcss')

module.exports = {
siteMetadata: {
baseTitle: 'Henlo.',
title: 'Gatsby Starter',
separator: '|',
baseTitle: 'Henlo.',
lang: 'en',
siteUrl: `localhost:8000`,
title: 'Gatsby Starter',
image: '',
themeColor: '#fff',
keyword: 'gatsby-starter, blazing fast static site',
Expand All @@ -15,6 +16,10 @@ module.exports = {
plugins: [
'gatsby-plugin-sharp',
'gatsby-transformer-sharp',
'gatsby-plugin-preload-fonts',
{
resolve: 'gatsby-plugin-brotli',
},
{
resolve: 'gatsby-transformer-remark',
options: {
Expand All @@ -34,13 +39,6 @@ module.exports = {
],
},
},
{
resolve: 'gatsby-source-filesystem',
options: {
path: `${__dirname}/src/img`,
name: 'images',
},
},
{
// keep as first gatsby-source-filesystem plugin for gatsby image support
resolve: 'gatsby-source-filesystem',
Expand Down Expand Up @@ -72,6 +70,8 @@ module.exports = {
printRejected: true,
develop: false, // Enable while using `gatsby develop`
tailwind: true, // Enable tailwindcss support
whitelistPatterns: [],
whitelistPatternsChildren: [],
},
},
{
Expand Down
Empty file added gatsby-ssr.js
Empty file.
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"name": "gatsby-starter",
"description": "Clean starter for gatsby website, with image optimization and GDPR cookies",
"version": "0.3.2",
"version": "0.4.0",
"author": "Wojciech Kałużny",
"browserslist": [
"defaults"
],
"dependencies": {
"classnames": "^2.2.6",
"gatsby": "^2.23.1",
"gatsby-image": "^2.0.23",
"gatsby-plugin-advanced-sitemap": "^1.4.5",
"gatsby-plugin-brotli": "^2.0.0",
"gatsby-plugin-gdpr-cookies": "^1.0.3",
"gatsby-plugin-netlify": "^2.0.6",
"gatsby-plugin-netlify-cms": "^4.1.6",
"gatsby-plugin-preload-fonts": "^1.6.1",
"gatsby-plugin-purgecss": "^4.0.0",
"gatsby-plugin-react-helmet": "^3.0.4",
"gatsby-plugin-root-import": "^2.0.5",
Expand All @@ -33,7 +38,6 @@
"react": "^16.8.4",
"react-dom": "^16.8.4",
"react-github-btn": "^1.2.0",
"react-google-maps": "^9.4.5",
"react-helmet": "^5.2.0",
"react-markdown": "^4.2.2",
"react-slick": "^0.25.2",
Expand All @@ -55,7 +59,8 @@
"build:prod": "netlify build",
"deploy:prod": "netlify build && netlify deploy --prod",
"format": "prettier --trailing-comma es5 --no-semi --single-quote --write \"{gatsby-*.js,src/**/*.js}\"",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"preload-fonts": "gatsby-preload-fonts"
},
"devDependencies": {
"prettier": "^1.15.3",
Expand Down
8 changes: 3 additions & 5 deletions src/cms/cms.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ window.CMS_MANUAL_INIT = true
CMS.init({
config: {
load_config_file: false,
display_url: 'http://localhost:8000',
backend: {
name: 'git-gateway',
branch: 'master',
},
media_folder: '/static/img',
public_folder: '/img',
collections: [
pages,
posts
],
collections: [pages, posts],
},
})
})
86 changes: 44 additions & 42 deletions src/cms/collections/posts.js
Original file line number Diff line number Diff line change
@@ -1,62 +1,64 @@
import seo from '@/cms/partials/seo'

const posts = {
name: "blog",
label: "Articles",
description: "Articles content",
folder: "content/blog",
slug: "{{slug}}",
const collection = {
name: 'blog',
label: 'Articles',
editor: {
preview: false,
},
description: 'Articles content',
folder: 'content/blog',
slug: '{{slug}}',
create: true,
fields: [
{
label: "Type",
name: "type",
widget: "hidden",
default: "article"
label: 'Type',
name: 'type',
widget: 'hidden',
default: 'article',
},
{
label: "Layout",
name: "layout",
widget: "hidden",
default: "Article"
label: 'Layout',
name: 'layout',
widget: 'hidden',
default: 'Article',
},
{
label: "Title",
name: "title",
widget: "string",
default: ""
label: 'Title',
name: 'title',
widget: 'string',
default: '',
},
{
label: "Featured Image",
name: "thumbnail",
widget: "image",
default: "",
required: false
label: 'Featured Image',
name: 'thumbnail',
widget: 'image',
default: '',
required: false,
},
{
label: "Date",
name: "date",
widget: "datetime",
default: "",
required: false
label: 'Date',
name: 'date',
widget: 'datetime',
default: '',
required: false,
},
{
label: "Excerpt",
name: "excerpt",
widget: "markdown",
default: "",
required: false
label: 'Excerpt',
name: 'excerpt',
widget: 'markdown',
default: '',
required: false,
},
{
label: "Body",
name: "body",
widget: "markdown",
default: "",
required: false
label: 'Body',
name: 'body',
widget: 'markdown',
default: '',
required: false,
},
seo
]
seo,
],
}


export default posts
export default collection
25 changes: 12 additions & 13 deletions src/cms/pages/home.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import seo from '@/cms/partials/seo'

const homePage = {
const page = {
file: 'content/pages/home.md',
label: "Home",
label: 'Home',
name: 'Home',
fields: [
{
Expand All @@ -18,10 +18,10 @@ const homePage = {
default: 'page',
},
{
label: "Title",
name: "title",
widget: "string",
default: "",
label: 'Title',
name: 'title',
widget: 'string',
default: '',
required: false,
},
{
Expand All @@ -45,14 +45,13 @@ const homePage = {
name: 'url',
widget: 'string',
required: false,
}
]
}
},
],
},
],
},
seo
]
seo,
],
}


export default homePage
export default page
7 changes: 4 additions & 3 deletions src/cms/partials/seo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const seo = {
const partial = {
label: 'SEO Settings',
name: 'seo',
widget: 'object',
Expand All @@ -20,9 +20,10 @@ const seo = {
label: 'Image',
name: 'image',
widget: 'image',
required: false,
required: true,
default: '/img/clean-commit-default.jpg',
},
],
}

export default seo
export default partial
28 changes: 12 additions & 16 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import React from 'react'
import { Link } from 'gatsby'
import ReactSVG from 'react-svg'

const Footer = class extends React.Component {
render() {
return (
<footer className='footer py-5 absolute bottom-0 w-full'>
<div className='container text-center'>
<a href="https://cleancommit.io" className="text-grey text-center text-sm font-regular">
Created by cleancommit.io
</a>
</div>
</footer>
)
}
export default function Footer() {
return (
<footer className='footer py-5 absolute bottom-0 w-full'>
<div className='container text-center'>
<a
href='https://cleancommit.io'
className='text-grey text-center text-sm font-regular'>
Created by cleancommit.io
</a>
</div>
</footer>
)
}

export default Footer

0 comments on commit ab96b66

Please sign in to comment.