Skip to content

Instantly share code, notes, and snippets.

View xbojch's full-sized avatar
🇺🇦
Stand with Ukraine

Bojan Bedrač xbojch

🇺🇦
Stand with Ukraine
View GitHub Profile
@xbojch
xbojch / cloudSettings
Created September 17, 2021 12:56
Visual Studio Code Settings Sync Gist
// Empty
@xbojch
xbojch / layout.js-full
Created September 24, 2020 16:39
Full layout.js
import React from "react"
import {Link} from "gatsby"
import CookieConsent from "react-cookie-consent";
import {rhythm, scale} from "../utils/typography"
import logo from '../../content/assets/improvebadcode.svg';
class Layout extends React.Component {
render() {
const {location, title, children} = this.props;
@xbojch
xbojch / gatsby-config.js-full
Created September 24, 2020 16:36
Full Gatsby config
module.exports = {
siteMetadata: {
title: `Improve bad code`,
titleTemplate: ``,
url: `https://www.improvebadcode.com/`,
twitterUsername: ``,
image: `content/assets/profile-pic.jpg`,
author: `Bojan Bedrač`,
description: `Personal blog about improving software development skills and becoming a better developer.`,
siteUrl: `https://www.improvebadcode.com/`,
@xbojch
xbojch / CookieConsent.jsx
Created August 15, 2020 22:01
Cookie consent component
import CookieConsent from 'react-cookie-consent';
<CookieConsent
location="bottom"
buttonText="Accept"
declineButtonText="Decline"
cookieName="gatsby-gdpr-google-analytics"
>
This site uses cookies ...
</CookieConsent>
@xbojch
xbojch / gatsby-config.js
Last active August 15, 2020 21:43
configure gatsby-plugin-gdpr-cookies plugin
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-gdpr-cookies`,
options: {
googleAnalytics: {
trackingId: 'YOUR_GOOGLE_ANALYTICS_TRACKING_ID',
// Setting this parameter is optional
anonymize: true
},