All Projects → eggheadio → gatsby-theme-egghead-blog

eggheadio / gatsby-theme-egghead-blog

Licence: MIT license
This is a theme version of our gatsby-starter-egghead-blog.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to gatsby-theme-egghead-blog

Mdx Deck
♠️ React MDX-based presentation decks
Stars: ✭ 10,487 (+58161.11%)
Mutual labels:  gatsby, mdx, gatsby-theme
gatsby-themes
A collection of open source, well designed, highly customizable and 100% free Gatsby themes for blazing fast sites. We are working on the next version of the Flex theme. See https://github.com/reflexjs/reflexjs
Stars: ✭ 296 (+1544.44%)
Mutual labels:  gatsby, mdx, gatsby-theme
gatsby-theme-deck-n-blog
Create a deck (with mdx-deck) and a blog post from the same MDX
Stars: ✭ 17 (-5.56%)
Mutual labels:  gatsby, mdx, gatsby-theme
Gatsby Theme Catalyst
An opinionated set of integrated themes and starters as a boilerplate to accelerate development with GatsbyJS
Stars: ✭ 144 (+700%)
Mutual labels:  gatsby, mdx
Gatsby Theme Chronoblog
⏳ Chronoblog is a Gatsbyjs theme specifically designed to create a personal website. The main idea of ​​Chronoblog is to allow you not only to write a personal blog but also to keep a record of everything important that you have done.
Stars: ✭ 101 (+461.11%)
Mutual labels:  gatsby, mdx
Mdx Embed
Embed 3rd party media content in MDX - no import required 🧽
Stars: ✭ 119 (+561.11%)
Mutual labels:  gatsby, mdx
Gatsby Starter Portfolio Cara
Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Especially designers and/or photographers will love this theme! Built with MDX and Theme UI.
Stars: ✭ 1,101 (+6016.67%)
Mutual labels:  gatsby, mdx
Gatsby Mdx Blog Starter Project
Gatsby MDX Blog Starter Project
Stars: ✭ 248 (+1277.78%)
Mutual labels:  gatsby, mdx
Remark Codesandbox
🎩 Create CodeSandbox directly from code blocks
Stars: ✭ 204 (+1033.33%)
Mutual labels:  gatsby, mdx
Gatsby Theme Terminal
A zero component Gatsby theme for developers 🔋
Stars: ✭ 251 (+1294.44%)
Mutual labels:  gatsby, mdx
joeprevite.com
my digital garden 🌱
Stars: ✭ 31 (+72.22%)
Mutual labels:  gatsby, mdx
Gatsby Starter Portfolio Minimal
A Gatsby Starter to create a clean one-page portfolio with Markdown content.
Stars: ✭ 100 (+455.56%)
Mutual labels:  gatsby, mdx
Gatsby Mdx Netlify Cms Starter
Gatsby-MDX with Netlify CMS. Support React components in your CMS editor!
Stars: ✭ 84 (+366.67%)
Mutual labels:  gatsby, mdx
Gatsby Starter Typescript Rebass Netlifycms
My default Gatsby setup. Includes rich MDX support.
Stars: ✭ 79 (+338.89%)
Mutual labels:  gatsby, mdx
gatsby-theme-jam-example
An example submission for the Gatsby Theme Jam.
Stars: ✭ 89 (+394.44%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-dox
Documentation made easy with Gatsby. 🎉
Stars: ✭ 29 (+61.11%)
Mutual labels:  gatsby, gatsby-theme
Cloudflare Docs
Cloudflare’s developer docs.
Stars: ✭ 219 (+1116.67%)
Mutual labels:  gatsby, mdx
gatsby-theme-portfolio-minimal
A Gatsby Theme to create modern one-page portfolios with a clean yet expressive design.
Stars: ✭ 51 (+183.33%)
Mutual labels:  gatsby, gatsby-theme
Gatsby Starter Minimal Blog
Typography driven, feature-rich blogging theme with minimal aesthetics. Includes tags/categories support and extensive features for code blocks such as live preview, line numbers, and line highlighting.
Stars: ✭ 752 (+4077.78%)
Mutual labels:  gatsby, mdx
Gatsby Plugin Mdx
gatsby v1 mdx plugin, for gatsby v2 see https://github.com/ChristopherBiscardi/gatsby-mdx
Stars: ✭ 50 (+177.78%)
Mutual labels:  gatsby, mdx

egghead.io creator MDX Blog Theme Project

This is based on Robin Wieruch's https://github.com/rwieruch/gatsby-mdx-blog-starter-project

Lots of nice pieces are also borrowed from Jason Lengstorf https://github.com/jlengstorf/lengstorf.com

A project in Gatsby.js themes with MDX.

Features

  • MDX: JavaScript/React in Markdown
  • Prism.js: Syntax Highlighting
  • Pagination
  • Emotion
  • Typography.js
  • Self-hosted fonts (Inter UI)
  • Social media share buttons
  • Site & Theme config files
  • ConvertKit subscribe form (Formik and Yup)
  • Placeholder illustrations by Katerina Limpitsouni from undraw.co

Getting Started

This guide will take you through how to set up a blog with this theme.

Step 1: Installation

# make your site folder
mkdir your-site && cd your-site

# init a new package.json
yarn init

# add dependencies
yarn add -D react react-dom gatsby @eggheadio/gatsby-theme-egghead-blog

touch gatsby-config.js
// add the theme to your gatsby config
module.exports = {
  plugins: [`@eggheadio/gatsby-theme-egghead-blog`],
}

We will walk through the siteMetadata this theme expects and how to change the default path to your blog posts.

Step 2: Folder Structure

This is the default folder structure that we recommend:

your-site/
├── README.md
├── config
│   └── website.js
├── content
│   └── posts
│       ├── demo01
│       │   ├── HelloWorld.js
│       │   ├── banner.png
│       │   └── index.mdx
│       ├── demo02
│       └── frontmatter-placeholder
│           ├── images
│           │   └── banner.jpg
│           └── index.md
├── gatsby-config.js
├── node_modules
├── package.json

Step 3: Adding Frontmatter Placeholder

Frontmatter is the block in a markdown file denoted by surrounding hyphens: ---.

We need to supply MDX placeholder frontmatter so that our queries wont break. Inside of your content/blog folder, you can add a folder called frontmatter-placeholder.

# navigate to where you blog posts live
cd content/blog
# make a placeholder folder
mkdir frontmatter-placeholder && cd frontmatter-placeholder
# add an index file and an images directory.
touch index.md
mkdir images

Add this content to the index.md file:

---
slug: invisible-post
date: 2019-01-01
title: 'this post is a ghost'
description: 'this post has all of the right fields'
categories: ['test']
keywords: ['test']
banner: './images/banner.jpg'
published: false
redirects:
  - '/invisible-post-423123'
---

This exists to populate GraphQL fields and avoid null errors. It should contain all of the available frontmatter.

Then add this image (or any other image) to the images folder inside of content/blog/frontmatter-placeholder/images.

Step 4: Configuring siteMetadata

In order for this theme to function properly, these fields need to be inside of siteMetadata in you gatsby-config.js.

const config = require('./config/website')
const pathPrefix = config.pathPrefix === '/' ? '' : config.pathPrefix
module.exports = {
  pathPrefix: config.pathPrefix,
  siteMetadata: {
    siteUrl: config.siteUrl + pathPrefix,
    title: config.siteTitle,
    description: config.siteDescription,
    keywords: ['Video Blogger'],
    canonicalUrl: config.siteUrl,
    twitterUrl: config.twitterUrl,
    twitterHandle: config.twitterHandle,
    fbAppID: config.fbAppID,
    githubUrl: config.githubUrl,
    githubHandle: config.githubHandle,
    image: config.siteLogo,
    author: {
      name: config.author,
      minibio: `
        <strong>egghead</strong> is the premier place on the internet for
        experienced developers to enhance their skills and stay current
        in the fast-faced field of web development.
      `,
    },
    organization: {
      name: config.organization,
      url: config.siteUrl,
      logo: config.siteLogo,
    },
  },
  plugins: [
    {
      resolve: `gatsby-theme-egghead-blog`,
      options: {},
    },
  ],
}

Override theme components (Component Shadowing)

Only the components that are exported from the theme are available to be overridden.

To override a theme component you will need to add @eggheadio/gatsby-theme-egghead-blog/. You may override anything in the gatsby-theme-egghead-blog/src directory.

For example, if you would like to override the default Header component. You would a file like this.

// @egghead/gatsby-theme-egghead-blog/components/Header/index.js
import React from 'react'

class Header extends React.Component {
  render() {
    return <div>hello egghead</div>
  }
}

export default Header

Now "hello egghead" will be rendered anywhere the old Header component was render.

If you shadowing a component that references other theme components (and you still need them), You will need to import them. To import them, you start with @eggheadio/gatsby-theme-egghead-blog/ and fill in the relative path of the component that you need.

e.g.

import { withTheme } from '@eggheadio/gatsby-theme-egghead-blog/components/Theming'
import { rhythm } from 'eggheadio/gatsby-theme-egghead-blog/lib/typography’
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].