Git Product home page Git Product logo

gatsby-theme-rapid's Introduction

Preview

๐Ÿš€ Quick start

  1. Create a Gatsby site.

    Use the Gatsby CLI to create a new site, specifying the blog starter.

    # create a new Gatsby site using the blog starter
    gatsby new my-blog-starter https://github.com/acdzh/gatsby-theme-rapid
  2. Modify the Site's Config. Modify the config in ./gatsby-config.js;

  3. Create Content Directory. Create a directory like this:

    content
    โ”œโ”€โ”€ blog
    โ””โ”€โ”€ static
    

    You blogs should be .md files in the blog directory, and the everything in the static directory would be copied to the root path when after building.

  4. Preview

    yarn dev --host 0.0.0.0

    Then you can see the site running at http://localhost:8000/

Writing Articles

Create new Articles

You can create a new article easily just like this:

yarn run new <article_name>

For Example:

yarn run new '/2021/this is my first article'

## or

yarn run new '/2021/this is my first article.md'

It will create the file at ./content/blog/2021/this is my first article.md.

Another way, if you add a / at the end of <article_name> like yarn run new '/2021/this is my first article/'

It will create the file at ./content/blog/2021/this is my first article/index.md.

By the way, the final effect of these two methods is equivalent.

Article prams

There are many prams of an article.

params name requied default value
title โœ” ${filename} The title of this article which will show in the post page and the list view.
date โœ” ${now.format()}
draft โŽ false This article will not be published when draft is true.
comment โŽ true Whether this article can be commented.
description โŽ ${the content of this article} It will show after the title in the list page.
author โŽ ${the author infomation from global config} The author.
from โŽ Whether this article comes from if it is Is reprinted.
slug โŽ ${title} The url slug
cover โŽ Cover image.
tags โŽ [] List of tags.
series โŽ [] List of series.
categories โŽ [] List of categories.

Use Image

just ![](./image.jpg) or ![](https://example.com/img.jpg)

Short Code

To Preview see https://blog.acdzh.com/post/shortcode_test/

Every available Short Code is at: ./src/templates/post-components.tsx

Theme

Edit ./src/style/theme.css

Deploy

yarn build

Then publish the ./public folder.

gatsby-theme-rapid's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.