🍭 My blog kremalicious.com built with Gatsby. Neat. https://kremalicious.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
dependabot[bot] e3ec3ac16c
Bump http-cache-semantics from 4.1.0 to 4.1.1 (#765)
5 days ago
.github env vars 2 months ago
.jest add prettier-plugin-sort-imports 1 week ago
_aws fixes 4 years ago
content remove react-helmet 3 months ago
gatsby add prettier-plugin-sort-imports 1 week ago
scripts add prettier-plugin-sort-imports 1 week ago
src fix mastodon icon 1 week ago
static remove gatsby-plugin-offline 3 months ago
.editorconfig add prettier-plugin-sort-imports 1 week ago
.env.sample switch tracking 3 months ago
.eslintrc Bump eslint-plugin-testing-library from 3.10.2 to 4.6.0 (#520) 2 years ago
.gitignore refactor (#733) 3 months ago
.markdownlint.json post tweaks 3 years ago
.nvmrc Gatsby v5 (#731) 3 months ago
.prettierrc add prettier-plugin-sort-imports 1 week ago
.stylelintrc package updates, stylelint updates 1 year ago
LICENSE cleanup 5 years ago
README.md add prettier-plugin-sort-imports 1 week ago
config.ts add mastodon 2 weeks ago
gatsby-browser.tsx add prettier-plugin-sort-imports 1 week ago
gatsby-config.ts fix syntax highlighting styles 1 week ago
gatsby-node.ts add prettier-plugin-sort-imports 1 week ago
gatsby-ssr.tsx add prettier-plugin-sort-imports 1 week ago
package-lock.json Bump http-cache-semantics from 4.1.0 to 4.1.1 (#765) 5 days ago
package.json Bump @typescript-eslint/parser from 5.49.0 to 5.50.0 (#762) 5 days ago
tsconfig.json refactor (#733) 3 months ago

README.md

🍭 My blog built with Gatsby + TypeScript. Neat.

kremalicious.com



🎉 Features

The whole blog is a React-based Single Page App built with Gatsby v2.

🎆 EXIF extraction

Automatically extracts EXIF & IPTC metadata from my photos on build time. For minimal overhead, fast-exif & node-iptc parse every JPG file upon Gatsby file node creation and add the extracted data as node fields.

This way, EXIF data is only extracted at build time and can be simply queried with GraphQL at run time.

In the end looks like this, including location display with pigeon-maps:

screen shot 2018-10-14 at 20 27 39

If you want to know how this works, have a look at the respective component under

💰 Cryptocurrency donation via Web3/MetaMask

Lets visitors say thanks with Bitcoin or Ether. Uses web3.js for sending Ether transactions via MetaMask, Brave or Mist. Component listens to account & network changes and adapts accordingly.

As a fallback, QR codes are generated with react-qr-svg from the addresses defined in config.js.

screen shot 2018-10-14 at 22 03 57

If you want to know how this works, have a look at the respective components under

A global search is provided with gatsby-plugin-lunr. That plugin creates a Lunr search index file of all posts on build time which is then queried against when the search field is used.

screen shot 2018-11-18 at 19 44 30

If you want to know how this works, have a look at the respective components under

Under each post a list of related posts is displayed which are based on the tags of the currently viewed post. Also allows loading more related posts in place.

screen shot 2018-10-11 at 21 03 03

If you want to know how this works, have a look at the respective component under

📝 GitHub changelog rendering

Adds ability to show contents of a changelog, rendered from a CHANGELOG.md on GitHub from the given repository. The use case is to enhance release posts about projects hosted on GitHub. Makes use of the GitHub GraphQL API via gatsby-source-graphql.

Adding this to a post's YAML frontmatter:

changelog: gatsby-plugin-matomo

will render this at the end of the post:

screen shot 2018-11-21 at 23 03 38

See it live on Matomo plugin for Gatsby.

If you want to know how this works, have a look at the respective component under

🌗 Theme Switcher

Includes a theme switcher which allows user to toggle between a light and a dark theme. Switching between them also happens automatically based on user's system preferences utilizing use-dark-mode.

If you want to know how, have a look at the respective components:

🏆 SEO component

Includes a SEO component which automatically switches all required meta tags for search engines, Twitter Cards, and Facebook OpenGraph tags based on the browsed route/page.

If you want to know how this works, have a look at the respective component under

gatsby-redirect-from

💎 Importing SVG assets

All SVG assets under src/images/ will be converted to React components with the help of gatsby-plugin-svgr. Makes use of SVGR so SVG assets can be imported like so:

import { ReactComponent as Logo } from './components/svg/Logo'

;<Logo />

🍬 Typekit component

Includes a component for adding the Typekit snippet.

If you want to know how this works, have a look at the respective component under

Development

git clone git@github.com:kremalicious/blog.git
cd blog/

# GATSBY_GITHUB_TOKEN is required for some parts
cp .env.sample .env
vi .env

npm i
npm start

🔮 Linting

ESlint, Prettier, and Stylelint are setup for all linting purposes:

npm run lint

To automatically format all code files:

npm run format
npm run format:css

👩‍🔬 Testing

Test suite is setup with Jest and react-testing-library.

To run all tests, including all linting tests:

npm test

All test files live beside the respective component. Testing setup, fixtures, and mocks can be found in ./jest.config.js and ./jest folder.

🎈 Add a new post

npm run new "Hello World"
npm run new "Hello World" 2017-12-27

Create a new photo post with date, title & description pre-filled from EXIF/IPTC data of a given image file:

npm run new photo /path/to/photo.jpg

🚚 Deployment

Every branch or Pull Request is automatically deployed by Vercel with their GitHub integration. A link to a preview deployment will appear under each Pull Request. Because of Vercel's maximum cache size of 500MB, Vercel is not used for the production deployment.

S3 Deployment

The latest deployment of the main branch is automatically deployed to S3 from the GitHub Action as the production deployment, aliased to kremalicious.com. The deploy command simply calls the scripts/deploy-s3.sh script, syncing the contents of the public/ folder to S3:

npm run deploy

🏛 Licenses

The MIT License (MIT)

EXCEPT FOR:

Posts

Creative Commons License

All post content under ./content/posts is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Photos & images

All photos & image assets are plain ol' copyright.

Copyright (c) 20082018 Matthias Kretschmann

Don't care if you fork & play with it, but you're not allowed to publish anything from it as a whole without my written permission. Also please be aware, the combination of typography, colors & layout makes up my brand identity. So please don't just clone everything, but rather do a remix!