gatsby-starter-hoodie has been migrated to Gatsby 5 as of 2023-06-30. gatsby-starter-hoodie is now available for node.js 20.
gatsby-starter-hoodie is a gatsby starter created for writing tech blogs. Markdown, Code Highlighting in various programming languages, and Katex syntax are supported. Also, you can easily categorize articles into tags and series.
Start your blog with a neatly designed gatsby-starter-hoodie that supports dark mode.
This project inspired by velog.
- Markdown
- Code Highlighting
- Katex Syntax
- Dark Mode (Responsive to the settings of the OS)
- Tag Categoriazation
- Series Categorization
- Responsive Web
- SEO
- Giscus
Getting started your blog with gatsby-starter-hoodie by following steps below. It's very easy π.
Make sure you have node.js and gatsby-cli installed on your computer.
$ npx gatsby new my-hoodie-blog https://github.com/devHudi/gatsby-starter-hoodie
$ cd my-hoodie-blog
$ npm run start
Now you can access to your blog at localhost:8000.
Giscus comment widget is based on Github Discuss system. So you need your own GitHub repository. Also, if you want to publish your blog through Github Pages or Netlify, the Github Repository is a necessary.
If you don't know how to create a GitHub repository, follow the official GitHub documentation.
git remote add origin https://github.com/{YOUR_GITHUB_NAME}/{YOUR_REPOSITORY_NAME}
module.exports = {
title: "MY BLOG",
description: "Hello, This is my blog",
author: "YOUR NAME",
siteUrl: "https://myblog.com",
links: {
github: "https://github.com",
facebook: "https://www.facebook.com",
instagram: "https://www.instagram.com",
etc: "https://www.google.com/",
},
giscus: {
repo: "{YOUR_GITHUB_NAME}/{YOUR_REPOSITORY_NAME}",
repoId: "{YOUR_GITHUB_REPOSITORY_ID}",
category: "{YOUR_GITHUB_REPOSITORY_CATEGORY}",
categoryId: "{YOUR_GITHUB_REPOSITORY_CATEGORY_ID}",
mapping: "pathname",
strict: "0",
reactionsEnabled: "1",
inputPosition: "bottom",
lang: "en",
},
}
gatsby-starter-hoodie provides a configuration file called blog-config.js
. In this file, you can configure blog, biography (profile), and giscus. Configure blog-config.js
to suit your blog.
Markdown content is in contents/posts
. You can write and add your articles. Click here to see the detail writing guide.
Follow the Connecting to Netlify steps in A Step-by-Step Guide: Gatsby on Netlify. It's not difficult.
If you connect the github repository using Netlify, it is automatically distributed whenever you push it, so it is convenient.
If the repository name is in the form of {YOUR_GITHUB_NAME} .github.io
, run it below.
$ npm run deploy-gh
If the repository name is not in the form of {YOUR_GITHUB_NAME} .github.io
, run it below.
$ npm run deploy-gh-prefix-paths
In the above case, you need to change pathPrefix
in gatsby-config.js
to your repository name.
$ npm run build
You can build the gatsby website with the command above. The build output is created in the /public
directory. Deploy the /public
directory using the command for the platform you want to deploy.
You can customize your own gatsby-starter-hoodie by referring to the following file structure π.
βββ node_modules
βββ contents
βΒ Β βββ posts // your articles are here
βββ public // build outputs are here
βββ src
βββ assets
βΒ Β βββ theme // theme config is here
βββ components
βΒ Β βββ Article
β Β Β βββ Body
β Β Β βββ StyledMarkdown
β Β Β βββ index.jsx // markdown styles are here
β ...
βββ fonts // webfonts are here
βββ hooks
βββ images
βββ pages // page components are here
βββ reducers
βββ templates // post components are here
βββ utils