All Projects → PaulieScanlon → gatsby-theme-gatstats

PaulieScanlon / gatsby-theme-gatstats

Licence: other
A Gatsby theme and dashboard for your tech blog... or a dashblog if you prefer 🤷‍♂️

Programming Languages

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

Projects that are alternatives of or similar to gatsby-theme-gatstats

gatsby-theme-deck-n-blog
Create a deck (with mdx-deck) and a blog post from the same MDX
Stars: ✭ 17 (-50%)
Mutual labels:  gatsbyjs, gatsby-theme
livestream-gatsby-themes
Source code to demonstrate how to build Gatsby themes, child themes, and sites using themes.
Stars: ✭ 24 (-29.41%)
Mutual labels:  gatsbyjs, gatsby-theme
gatsby-attila-theme-ghost
A Gatsby theme plugin for creating blogs from headless Ghost CMS.
Stars: ✭ 16 (-52.94%)
Mutual labels:  gatsbyjs, gatsby-theme
Mdx Deck
♠️ React MDX-based presentation decks
Stars: ✭ 10,487 (+30744.12%)
Mutual labels:  gatsbyjs, gatsby-theme
gatsbyjs-starter-tailwindplay
GatsbyJS Tailwind Starter - TailwindPlay
Stars: ✭ 69 (+102.94%)
Mutual labels:  gatsbyjs
gatsby-react-boilerplate
Gatsbyjs boilerplate
Stars: ✭ 59 (+73.53%)
Mutual labels:  gatsbyjs
Gatsby Starter Portfolio Emma
Minimalistic portfolio with full-width grid, page transitions, support for additional MDX pages, and a focus on large images. Especially designers and/or photographers will love this theme! Built with MDX and Theme UI.
Stars: ✭ 253 (+644.12%)
Mutual labels:  gatsbyjs
Gatsby Theme Terminal
A zero component Gatsby theme for developers 🔋
Stars: ✭ 251 (+638.24%)
Mutual labels:  gatsbyjs
shopnote
shopnote is a JAMstack application that helps in creating notes with shopping items. This application is built to showcase the JAMstack concept using Fauna, Netlify Serverless Functions and GatsbyJS.
Stars: ✭ 15 (-55.88%)
Mutual labels:  gatsbyjs
gatsby-transformer-remark-frontmatter
Allows querying frontmatter fields as markdown with gatsby
Stars: ✭ 13 (-61.76%)
Mutual labels:  gatsbyjs
gatsby-starter-material-ui
A gatsby starter with Material UI
Stars: ✭ 28 (-17.65%)
Mutual labels:  gatsbyjs
hiooyui.github.io
www.a4z.cn
Stars: ✭ 18 (-47.06%)
Mutual labels:  gatsbyjs
gatsby-advanced-starter
gatsby-advanced-starter for creating blog
Stars: ✭ 15 (-55.88%)
Mutual labels:  gatsbyjs
gatsby-plugin-matomo
🥂 Gatsby plugin to add Matomo (formerly Piwik) onto a site.
Stars: ✭ 56 (+64.71%)
Mutual labels:  gatsbyjs
gatsby-theme-auth0
🔐 A Gatsby Theme for adding Auth0 to your application.
Stars: ✭ 45 (+32.35%)
Mutual labels:  gatsby-theme
Gatsby Theme Antv
⚛️ Polished Gatsby theme for documentation site
Stars: ✭ 249 (+632.35%)
Mutual labels:  gatsbyjs
osf-website
🌍 Website for Open Source Festival
Stars: ✭ 17 (-50%)
Mutual labels:  gatsbyjs
react-use-hubspot-form
Embed HubSpot forms into your React components using hooks! Works with Create React App, Gatsby and other platforms.
Stars: ✭ 41 (+20.59%)
Mutual labels:  gatsbyjs
gatsby-remark-highlight-code
Adds stylish cards and syntax highlighting to code blocks in markdown files
Stars: ✭ 63 (+85.29%)
Mutual labels:  gatsbyjs
gatsby-remark-embedded-codesandbox
A Gatsby Remark plugin for embedding Codesandbox given a folder of files
Stars: ✭ 31 (-8.82%)
Mutual labels:  gatsbyjs
gatsby-theme-gatstats main image

npm (scoped)

npm

NPM

Netlify Status

GatStats is a dashboard for your tech blog.

... or a dashblog if you prefer? 🤷‍♂️

Properties sourced from frontmatter in src/posts/[name].mdx are used to create data visualizations to wow your readers.

👁️ Preview

🚀 Getting started

Install

npm install @pauliescanlon/gatsby-theme-gatstats

Setup

gatsby-config.js

Add the siteMetaData and @pauliescanlon/gatsby-theme-gatstats to your gatsby-config.js

module.exports = {
  siteMetadata: {
    title: "Your blog title",
    description: "I like tech",
    keywords: ["tech", "blog", "boop"],
    siteUrl: 'https://gatsby-theme-gatstats.netlify.com/',
    siteImage: 'name-of-open-graphy-image.jpg', // pop an image in the static folder to use it as og:image
    config: {
      headerHeight: 64,
      sideBarWidth: 240,
      twitter: 'pauliescanlon', // no need to include the @
      github: 'pauliescanlon'
    },
  },
  plugins: ['@pauliescanlon/gatsby-theme-gatstats']
}

directory structure

If you'd like to add more pages and posts add them to your src dir.

|-- src
    |-- pages
        |-- about.mdx
    |-- posts
        |-- year-post-dir
            |-- some-post-dir
                |-- some-post.mdx
                |-- some-image.jpg
                |-- some-embedding-image.jpg

frontmatter setup

For pages use the following template. The icon field is a path for any icon. This is an example is from Material Icons. The icon property is whats used to determine if an .mdx file is a page or a post. Pages appear in the side bar navigation

---
title: About
icon: 'M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'
---

# Demo About

This is about from the demo

For posts use the following template

---
title: Some Post
tags: ["Gatsbyjs", "React"]
date: 2019-11-13
status: draft // setting the status to draft hides the post from blog
featuredImage: some-image.jpg
embeddedImages:
  - some-embeddedImage.jpg
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

🖼️ Embedding Images

Embedding images into .mdx can be tricky but using MdxRenderer we can still use frontmatter to pass graphQL image data to any part of the post body

frontmatter

Add locally sourced images to frontmatter using embeddedImages then pass a reference to them to the <EmbeddedImage /> component via props.

The <EmbeddedImage /> component is part of the theme and is passed to all .mdx files using the MDXProvider so you don't have to import anything for this to work.

There's a couple of optional helper props for width and justifyContent so you get a bit more control over size and alignment.

EmbeddedImage

The <EmbeddedImage /> component accepts a width prop which can be used to control the image size. The width prop can either be a single string which will apply the the same size across all breakpoints or an array of sizes to use across the breakpoints defined in the theme.

---
embeddedImages:
  - image1.jpg
  - image2.jpg
---

Post body text

<EmbeddedImage
  src={props.embedded.image1}
  width={['100%', '75%', '50%', '25%']}
/>

More post body text

<EmbeddedImage
  src={props.embedded.image2}
  width="25%"
  justifyContent="center"
/>

👥 Component Shadowing

You know about component shadowing right? By shadowing the filePath/fileName you can replace any component in the theme with your own.

Once such component might be src/components/Code/Code.tsx this file is in charge of formatting code snippets. For the time being the only way to format the colours used in code snippets is to change the theme used by prism-react-renderer

If you need to re-style the code snippets shadow this component and change the bits you need.

ko-fi

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].