Gatsby-starter-minimal-blog - Typography driven, feature-rich blogging theme with minimal aesthetics.

Overview

LekoArts

Gatsby Starter: Minimal Blog

Minimal Blog is released under the 0BSD license. GitHub Sponsors Website Follow @lekoarts_de

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. Using the Gatsby Theme @lekoarts/gatsby-theme-minimal-blog.

Demo Website

Also be sure to check out other Free & Open Source Gatsby Themes and my Personal Website.

✨ Features

  • MDX
  • Fully customizable through the usage of Gatsby Themes (and Theme UI)
  • Light Mode / Dark Mode
  • Typography driven, minimal style
  • Tags/Categories support
  • Code highlighting with prism-react-renderer and react-live support. Also allows adding line numbers, line highlighting, language tabs, and file titles.
  • RSS Feed for blog posts
  • SEO (Sitemap, OpenGraph tags, Twitter tags)
  • WebApp Manifest

πŸš€ Getting Started

Deploy to Gatsby Cloud

1. Create a Gatsby site.

Use git to clone the site and navigate into it:

git clone https://github.com/LekoArts/gatsby-starter-minimal-blog project-name
cd project-name

2. Install dependencies.

If you use npm 7 or above use the --legacy-peer-deps flag. If you use npm 6 you can use npm install.

npm install --legacy-peer-deps

3. Open the code and start customizing!

Start the site by running npm run develop.

Your site is now running at http://localhost:8000!

If you want to learn more about how you can use a Gatsby starter that is configured with a Gatsby theme, you can check out this shorter or longer tutorial. The tutorials don't exactly apply to this starter however the concepts are the same.

πŸ“ Using and modifying this starter

Important Note: Please read the guide Shadowing in Gatsby Themes to understand how to customize the underlying theme!

This starter creates a new Gatsby site that installs and configures the theme @lekoarts/gatsby-theme-minimal-blog.

Have a look at the theme's README and files to see what options are available and how you can shadow the various components including Theme UI. Generally speaking you will want to place your files into src/@lekoarts/gatsby-theme-minimal-blog/ to shadow/override files. The Theme UI config can be configured by shadowing its files in src/gatsby-plugin-theme-ui/.

Code Highlighting

Since the underlying theme ships with prism-react-renderer and react-live certain additional features were added to code blocks. You can find an overview / usage example in the example repository! If you want to change certain code styles or add additional language tabs, you need to shadow the file src/@lekoarts/gatsby-theme-minimal-blog/styles/code.js.

Language tabs:

When you add a language (such as e.g. js or javascript) to the code block, a little tab will appear at the top left corner.

```js
// code goes here
```

Code titles:

You can display a title (e.g. the file path) above the code block.

```jsx:title=your-title
// code goes here
```

Or without a specific language:

```:title=your-title
// code goes here
```

Line highlighting:

You can highlight single or multiple (or both) lines in a code block. You need to add a language.

```js {2,4-5}
const test = 3
const foo = 'bar'
const harry = 'potter'
const hermione = 'granger'
const ron = 'weasley'
```

Hide line numbers:

If you want to hide line numbers you can either globally disable them (see Theme options) or on a block-by-block basis. You can also combine that with the other attributes.

```noLineNumbers
// code goes here
```

react-live:

Add react-live to the code block (and render the component) to see a preview below it.

Alohomora!); ```">
```js react-live
const onClick = () => {
  alert("You opened me");
};
render();
```

Adding content

Adding a new blog post

New blog posts will be shown on the index page (the three most recent ones) of this theme and on the blog overview page. They can be added by creating MDX files inside content/posts. General setup:

  1. Create a new folder inside content/posts
  2. Create a new index.mdx file, and add the frontmatter
  3. Add images to the created folder (from step 1) you want to reference in your blog post
  4. Reference an image as your banner in the frontmatter
  5. Write your content below the frontmatter
  6. Add a slug to the frontmatter to use a custom slug, e.g. slug: "/my-slug" (Optional)
  7. Use defer to opt-in into Deferred Static Generation (DSG) (optional)

Frontmatter reference:

---
title: Introduction to "Defence against the Dark Arts"
date: 2019-11-07
description: Defence Against the Dark Arts (abbreviated as DADA) is a subject taught at Hogwarts School of Witchcraft and Wizardry and Ilvermorny School of Witchcraft and Wizardry.
defer: false
tags:
  - Tutorial
  - Dark Arts
banner: ./defence-against-the-dark-arts.jpg
canonicalUrl: https://random-blog-about-curses.com/curses-counter-curses-and-more
---

The fields description, banner, defer and canonicalUrl are optional! If no description is provided, an excerpt of the blog post will be used. If no banner is provided, the default siteImage (from siteMetadata) is used. If no canonicalUrl is provided, it will not be included in the header.

The date field has to be written in the format YYYY-MM-DD!

Adding a new page

Additional pages can be created by placing MDX files inside contents/pages, e.g. an "About" or "Contact" page. You'll manually need to link to those pages, for example by adding them to the navigation (in siteMetadata). General instructions:

  1. Create a new folder inside content/pages
  2. Create a new index.mdx file, and add the frontmatter
  3. Write your content below the frontmatter
  4. Optionally add files/images to the folder you want to reference from the page
  5. Use defer to opt-in into Deferred Static Generation (DSG) (optional)

Frontmatter reference:

---
title: About
slug: "/about"
defer: false
---

Changing the "Hero" text

To edit the hero text ("Hi, I'm Lupin...), create a file at src/@lekoarts/gatsby-theme-minimal-blog/texts/hero.mdx to edit the text.

Changing the "Projects" part

To edit the projects part below "Latest posts", create a file at src/@lekoarts/gatsby-theme-minimal-blog/texts/bottom.mdx to edit the contents.

Extending the footer of the post

Inside the component there's also a component that you can shadow to display elements between the end of the post and the global footer. By default it returns null. Create a file at src/@lekoarts/gatsby-theme-minimal-blog/components/post-footer.jsx to edit this section. The component receives the complete post prop that also receives.

Changing your fonts

By default, the underlying theme and thus this starter uses "IBM Plex Sans" as its font. It's used throughout the site and set as a font-family on the html element.

If you want to change your default font or add any additional fonts, you'll need to change two things:

  1. The configuration for gatsby-omni-font-loader => Responsible for loading the font CSS files
  2. The Theme UI config and its fonts key (see Theme UI Typography Docs) => Responsible for setting the font-family in the example

After adjusting the configuration for gatsby-omni-font-loader you'll need to shadow the theme's Theme UI config and overwrite the fonts key. For the sake of this explanation it's assumed that you replaced "IBM Plex Sans" with "Roboto Mono".

Create a file at src/gatsby-plugin-theme-ui/index.js with the following contents:

import { merge } from "theme-ui";
import originalTheme from "@lekoarts/gatsby-theme-minimal-blog/src/gatsby-plugin-theme-ui/index";

const theme = merge(originalTheme, {
  fonts: {
    body: `"Roboto Mono", monospace`,
  },
});

export default theme;

As defined in the Theme Specification body is the default body font family.

Another example: You didn't replace "IBM Plex Sans" but added "Roboto Mono" additionally since you want to use it for your headings.

Then you'd not overwrite body but add a heading key:

import { merge } from "theme-ui";
import originalTheme from "@lekoarts/gatsby-theme-minimal-blog/src/gatsby-plugin-theme-ui/index";

const theme = merge(originalTheme, {
  fonts: {
    heading: `"Roboto Mono", monospace`,
  },
});

export default theme;

Change your static folder

The static folder contains the icons, social media images and robots.txt. Don't forget to change these files, too! You can use Real Favicon Generator to generate the image files inside static.

πŸ€” Questions or problems?

If you have general questions or need help with Gatsby, please go to one of the support platforms mentioned in Gatsby's documentation. If you have a specific question about this project, you can head to the GitHub Discussions of the repository.

πŸŽ“ Learning Gatsby

Looking for more guidance? Full documentation for Gatsby lives on Gatsby's website.

Themes

To learn more about Gatsby themes specifically, I recommend checking out the theme docs.

General

🌟 Supporting me

Thanks for using this project! I'm always interested in seeing what people do with my projects, so don't hesitate to tag me on Twitter and share the project with me.

Please star this project, share it on Social Media or consider supporting me on Patreon or GitHub Sponsor!

You might also like...

A minimal e-commerce store using Gatsby, SANITY, Stripe, Use-Shopping-Cart and Netlify

πŸͺ Gatsby Starter Stripemart Like a supermarket but for Stripe. No ongoing monthly costs. Perfect for artists, creators and independent builders doing

Nov 14, 2022

Bookworm is a minimal NextJs Tailwind blog starter template.

Bookworm is a minimal NextJs Tailwind blog starter template.

Bookworm Light Nextjs Blog Template πŸ‘‰πŸ»View Live Preview Download Download this template from Github Installation After downloading the template, you

Dec 23, 2022

A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

A table component for your Mantine data-rich applications, supporting asynchronous data loading, column sorting, custom cell data rendering, row context menus, dark theme, and more.

Mantine DataTable A "dark-theme aware" table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagina

Jan 4, 2023

'event-driven' library aims to simplify building backends in an event driven style

'event-driven' library aims to simplify building backends in an event driven style

'event-driven' library aims to simplify building backends in an event driven style(event driven architecture). For message broker, light weight Redis Stream is used and for event store, the well known NoSQL database, MongoDB, is used.

Jan 4, 2023

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.

Gatsby Starter Portfolio: Cara Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Using the Gatsby Theme @lekoarts/gat

Dec 24, 2021

Logseq-craft-theme - Craft Theme for Logseq

Logseq-craft-theme - Craft Theme for Logseq

Craft for Logseq Almost all creativity requires purposeful play. A Craft insprir

Oct 26, 2022

Blogkit - A unified blogging engine built with Next.js

Blogkit - A unified blogging engine built with Next.js

Blogkit (beta) Blogkit is a unified blog engine inspired by Sairin. Get started with starter templates Template Description blogkit-notion-starter Not

Jun 9, 2022

Markdown Blogging, Without Setup or Signup

You write. We do the rest. πŸ“ Memos.pub Memos.pub publishes Markdown files instantly without any setup. If you have a public GitHub repo with Markdown

Dec 11, 2022
Owner
Priya Chakraborty
Currently pursuing Btech in Electrical Engineering from SIT
Priya Chakraborty
Gatsby-blog-cosmicjs - πŸš€βš‘οΈ Blazing fast blog built with Gatsby and the Cosmic Headless CMS πŸ”₯

Gatsby + Cosmic This repo contains an example blog website that is built with Gatsby, and Cosmic. See live demo hosted on Netlify Uses the Cosmic Gats

Priya Chakraborty 0 Jan 29, 2022
A Gatsby-based starter theme with e-commerce styled components

This beautiful theme from the Matter Design Team gives you the styling and scaffolding for your next e-commerce site. You can customize to your heart'

null 48 Jan 3, 2023
My XFCE dotties - The GTK theme as well as the kvantume theme used here are forks of the Matcha GTK/kvantum theme

DOTFILES OF MY XFCE SETUP The GTK theme as well as the kvantume theme used here

Mehedi Rahman Mahi 201 Dec 31, 2022
πŸŒ— 1 line of code to apply auto dark / light theme and support custom theme for your website. Super fast and lightweight theme library.

themes.js A super lightweight and fast Theme library with auto system color scheme detection in JavaScript. Features Auto detect Dark / Light mode by

SerKo 4 Nov 29, 2022
Theme Redone is a custom WordPress theme starter/framework with its own Gutenberg blocks solution and a CLI that speeds up the block creation process.

Theme Redone The Framework for Developing Custom WordPress Themes with its own Gutenberg Blocks creation solution. Theme Redone is a custom WordPress

null 103 Dec 30, 2022
simple-remix-blog is a blog template built using Remix and TailwindCSS. Create your own blog in just a few minutes!

simple-remix-blog is a blog template built using remix.run and TailwindCSS. It supports markdown and MDX for the blog posts. You can clone it and star

José Miguel Álvarez Vañó 8 Dec 8, 2022
LogTure - A minimal designed, fully customizable, and extensible modern personal blogging framework, built with Nextjs.

LogTure - A minimal designed, fully customizable, and extensible modern personal blogging framework, built with Nextjs.

Sam Zhang 14 Aug 26, 2022
A fast, feature rich and simple framework for building dynamic browser applications.

hyperdom A simple, fast, feature rich framework for building dynamic browser applications. Hyperdom supports a simple event-update-render cycle, promi

Featurist 163 Nov 11, 2022
A simple yet feature-rich counter that allows you to count the views of your Github README files and profile page

View Counter Purpose This is a simple yet feature-rich counter that allows you to count the views of your github README files and profile page. Featur

Toby Hagan 4 Nov 10, 2022
Exposes theming options available in Joy UI by providing color palette and typography controls.

Joy Theme Creator Note: Joy UI is currently in alpha - some things may not be finished or working as expected. This project exposes the theming option

Oliver Benns 10 Dec 28, 2022