/gatsby-starter-oasis

๐ŸŽ FullPackage! || Lightweight page-based starter with highlight-based UI and Github typography

Primary LanguageJavaScriptMIT LicenseMIT

Gatsby-Starter-Oasis

License Netlify Status


Oasis is a lightweight page-based starter with a highlight-based UI

Project by je0ngyun

๐Ÿ–ฅ Demo

gatsby-starter-oasis.netlify.app

โœจ Features

  • Code highlight
  • highlight-based UI
  • Based on GitHub typography
  • Scroll gauge bar
  • Utterances Comment
  • Dark mode support
  • Page-based post classification
  • Provides a page creation tool
  • Provides a dedicated page for project introduction
  • Detailed category sidebar support in PC
  • Post search support in PC
  • Stylesheet built using SASS
  • Responsive web design
  • Lighthouse 98+ performance
  • Google Analytics
  • RSS Feed
  • Sitemap, Robots.txt
  • SEO

๐Ÿš„ Getting Started

1. Install this starter

# Create a gatsby site using this starter
npx gatsby new my-blog https://github.com/je0ngyun/gatsby-starter-oasis

# or
npm install -g gatsby-cli
gatsby new my-blog https://github.com/je0ngyun/gatsby-starter-oasis

2. Enter your blog's information

You can fix meta data of blog in user-meta-config.js file.
You can change the favicon and profile image of blog in assets directory.

3. Running in Development

cd my-blog/
npm run develop

4. Add your content

You can write

  • posts/index.md file - markdown post on the main screen.
  • posts/projects/ directory - posts on the projects page.
  • posts/develop/ directory - posts on the develop page.

If you want to know how the addresses of each post are generated, please read Guide.

5. Deploy to Netlify

Deploy to Netlify

After clicking that button, youโ€™ll authenticate with GitHub and choose a repository name. Netlify will then automatically create a repository in your GitHub account with a copy of the files from the template.

It's okay to use gh-page instead of netlify

๐Ÿ“‚ Some Folder Structure

.
โ”œโ”€โ”€ assets
โ”‚   โ”œโ”€โ”€ favicon.png // your favicon
โ”‚   โ””โ”€โ”€ profile.png // your profile image
โ”œโ”€โ”€ page-gen-template // templates referenced by the page creation tool
โ”‚   โ”œโ”€โ”€ template.js
โ”‚   โ””โ”€โ”€ template.scss
โ”œโ”€โ”€ posts
โ”‚   โ”œโ”€โ”€ index.md // markdown post on the main screen
โ”‚   โ”œโ”€โ”€ develop // posts on the develop page
โ”‚   โ”‚   โ”œโ”€โ”€ devops // detailed category
โ”‚   โ”‚   โ”œโ”€โ”€ docs   // ...
โ”‚   โ”‚   โ””โ”€โ”€ nodejs // ...
โ”‚   โ””โ”€โ”€ projects // posts on the projects page
โ”‚       โ””โ”€โ”€ project-list // ...
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ components
โ”‚   โ”œโ”€โ”€ hooks
โ”‚   โ”œโ”€โ”€ pages // routing except post
โ”‚   โ”œโ”€โ”€ styles // you can customize color
โ”‚   โ”‚   โ”œโ”€โ”€ dark-mode.scss
โ”‚   โ”‚   โ”œโ”€โ”€ light-mode.scss
โ”‚   โ”‚   โ”œโ”€โ”€ markdown.scss
โ”‚   โ”‚   โ”œโ”€โ”€ utils.scss
โ”‚   โ”‚   โ””โ”€โ”€ variables.scss
โ”‚   โ”œโ”€โ”€ templates
โ”‚   โ””โ”€โ”€ utils
โ”‚       โ””โ”€โ”€ typography.js // base typography
โ”œโ”€โ”€ gatsby-browser.js // import typeface here
โ”œโ”€โ”€ gatsby-config.js // gatsby config
โ”œโ”€โ”€ gatsby-node.js
โ””โ”€โ”€ user-meta-config.js // you can set all meta config

๐Ÿช„ Guide

Supported frontmatter

  1. General post
---
title: 'Welcome Oasis'
date: '2021-02-19 16:00:30'
tags: 'Gatsby,Starter,Blog' // separated by commas
---
  1. Project post
---
title: "Gatsby-Starter-Oasis"
date: "2022-02-19 16:00:30"
tags: "lightweight, page-based gatsby starter" // one line summary
tech: "Gatsby,React,Sass" // separated by commas
period: "2022.01 ~ 2022.02"
desc: "desc1;desc2;desc3" // project description, separated by semicolon
---

Post address and sidebar category

./posts/
โ”œโ”€โ”€ develop
โ”‚   โ”œโ”€โ”€ my-post.md // 1
โ”‚   โ”œโ”€โ”€ devops
โ”‚   โ”‚   โ””โ”€โ”€ devops-category-post.md // 2
โ”‚   โ”œโ”€โ”€ docs
โ”‚   โ”‚   โ”œโ”€โ”€ page-creation-guide.md
โ”‚   โ”‚   โ”œโ”€โ”€ quick-start.md
โ”‚   โ”‚   โ””โ”€โ”€ test
โ”‚   โ”‚       โ””โ”€โ”€ quick-start2.md // 3
โ”‚   โ””โ”€โ”€ nodejs
โ”‚       โ””โ”€โ”€ nodejs-category-post.md

In the above structure, the categories of the sidebar of the develop page show devops, docs, and nodejs.

Post 1 is created with the address ${your-site}/develop/my-post and it does not belong to any category in the sidebar.

Post 2 is created with the address ${your-site}/develop/devops/devops-category-post.

In the case of post 3, it is created with the address of ${your-site}/develop/docs/test/quick-start2. It belongs to the docs category in the sidebar.

How to create a page?

npm run page

CLI

Add the following to user-meta-config

const pageMetadata = {
  //menu - Please enter a menu link to add to the navbar.
  //If you do not want to add a link to the navbar, you can leave it blank.
  menu: [
    { path: '/', linkname: 'Home' },
    { path: '/projects', linkname: 'Projects' },
    { path: '/develop', linkname: 'Develop' },
    { path: '/life', linkname: 'Life' }, // add!!
  ],
  //directorys - Enter the directory to be mapped with the page.
  //That directory is automatically linked to the gatsby filesystem.
  directorys: ['develop', 'projects', 'life'], // add life!!
}

URL of RSS, Sitemap and Robots.txt

  • RSS Feed -> ${user-site}/rss.xml
  • Sitemap -> ${user-site}/sitemap/sitemap-index.xml
  • Robots.txt -> ${user-site}/robots.txt

๐Ÿ› Bug reporting

gatsby-starter-oasis/issues

๐Ÿงพ License

LICENSE