This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import PropTypes from 'prop-types' | |
import { Link, graphql, StaticQuery } from 'gatsby' | |
import PreviewCompatibleImage from './PreviewCompatibleImage' | |
class BlogRoll extends React.Component { | |
render() { | |
const { data } = this.props | |
const { edges: posts } = data.allMarkdownRemark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { Link } from 'gatsby' | |
import Layout from '../../components/Layout' | |
import BlogRoll from '../../components/BlogRoll' | |
import SEO from '../../components/SEO' | |
const PaginationLink = props => { | |
if (!props.test) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash') | |
const path = require('path') | |
const { createFilePath } = require('gatsby-source-filesystem') | |
const { fmImagesToRelative } = require('gatsby-remark-relative-images') | |
const createPaginatedPages = require('gatsby-paginate') | |
// Remove trailing slashes unless it's only "/", then leave it as it is | |
const replaceTrailing = _path => (_path === `/` ? _path : _path.replace(/\/$/, ``)) | |
exports.createPages = ({ actions, graphql }) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var elements = document.body.getElementsByTagName('*'); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
items.push(elements[i]); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require(`dotenv`).config(); | |
module.exports = { | |
siteMetadata: { | |
title: `GraphCMS SWAG Store`, | |
description: `Super cool SWAG from your favourite GraphQL CMS!`, | |
siteUrl: `https://store.graphcms.com`, | |
}, | |
plugins: [ | |
`gatsby-plugin-postcss`, |