Skip to content

🎁 FullPackage! || Lightweight page-based starter with highlight-based UI and Github typography

License

Notifications You must be signed in to change notification settings

je0ngyun/gatsby-starter-oasis

Repository files navigation

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

About

🎁 FullPackage! || Lightweight page-based starter with highlight-based UI and Github typography

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published