1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 18:00:06 +01:00
🍭 My blog kremalicious.com built with Astro. Neat. https://kremalicious.com
Go to file
2018-11-18 23:11:36 +01:00
_aws fixes 2018-09-27 22:25:00 +02:00
content image fixes and post fixes 2018-11-17 17:14:09 +01:00
gatsby add edit on github action 2018-11-18 23:11:36 +01:00
scripts deploy quiet 2018-11-08 17:58:49 +01:00
src add edit on github action 2018-11-18 23:11:36 +01:00
static tweaks 2018-10-17 19:02:28 +02:00
.codeclimate.yml footer refactor 2018-08-29 01:40:43 +02:00
.editorconfig start refactor 2018-07-21 13:33:05 +02:00
.eslintignore build & lint updates 2018-09-30 03:11:08 +02:00
.eslintrc build & lint updates 2018-09-30 03:11:08 +02:00
.gitignore package updates, add gatsby-redirect-from 2018-08-30 01:54:01 +02:00
.markdownlint.json post fixes 2018-09-29 03:02:05 +02:00
.prettierignore post metadata cleanup 2018-07-21 13:33:06 +02:00
.prettierrc cleanup 2018-09-12 23:48:59 +02:00
.stylelintrc lint fixes 2018-07-21 22:44:50 +02:00
.travis.yml revert Travis change 2018-10-23 23:37:41 +02:00
assets sheet.psd cleanup apple-touch-icon, add Safari 9 pinned tab icon 2015-08-09 00:52:46 +02:00
config.js add edit on github action 2018-11-18 23:11:36 +01:00
gatsby-browser.js add markdownlint 2018-09-24 01:09:50 +02:00
gatsby-config.js new search results presentation 2018-11-18 19:37:43 +01:00
gatsby-node.js gatsby-node splitup 2018-10-14 02:25:24 +02:00
LICENSE cleanup 2018-08-29 00:17:24 +02:00
package.json image fixes and post fixes 2018-11-17 17:14:09 +01:00
README.md docs updates 2018-11-18 19:58:40 +01:00

🍭 My blog built with Gatsby. Neat.

kremalicious.com

Table of Contents


🎉 Features

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

🎆 EXIF extraction

Automatically extracts EXIF metadata from my photos on build time. For minimal overhead, fast-exif parses every JPG file upon Gatsby file node creation and adds the extracted EXIF 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

🐝 Coinhive

Includes a component for mining Monero with JavaScript via Coinhive.

screen shot 2018-10-11 at 21 09 49

Functionality is opt-in on a post basis. Simply add this to any post's frontmatter to activate it for this post:

coinhive: true

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

🏆 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

📈 Matomo (formerly Piwik) analytics tracking

Site sends usage statistics to my own Matomo installation. To make this work in Gatsby, I created and open sourced a plugin which is in use on this site.

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

You need to have the following tools installed on your development machine before moving on:

Then install dependencies and start everything up:

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

🎈 Add a new post

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

🚚 Deployment

Automatic deployments are triggered upon successful tests & builds on Travis:

  • push to master initiates a live deployment
  • any Pull Request, and subsequent pushes to it, initiates a beta deployment

The deploy command simply calls the scripts/deploy.sh script, syncing the contents of the public/ folder to S3:

npm run deploy

The deploymeng script can be used locally too, the branch checks are only happening for Travis builds, allowing to deploy any branch from local machine.

🏛 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!