Coder Social home page Coder Social logo

Gatsby blog -- Zi Huijie

This is my blog template

I built my first blog using Gatsby a while ago. It has been lots of changes, since more people recognize it works for static site.

I decided to rebuild my Blog site after reading the following Post

Version 1

The Setup

  1. ESLint

For Linux/OSX can run

(
  export PKG=eslint-config-airbnb;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
  1. Install ESLint peer-dependancies as well as prettier:
npm install -D babel-eslint eslint-config-react eslint-config-prettier eslint-plugin-prettier prettier
  1. Edit .eslintrc
{
    "extends": ["airbnb", "prettier", "prettier/react"],
    "rules": {
      "react/jsx-filename-extension": [
        "error",
        { "extensions": [".js", ".jsx"] }
      ],
      "react/react-in-jsx-scope": 0,
      "react/require-default-props": 0,
      "react/forbid-prop-types": 1,
      "react/prefer-stateless-function": 1,
      "jsx-a11y/anchor-is-valid": 0,
      "arrow-body-style": 0,
      "no-shadow": 0,
      "consistent-return": 0,
      "no-console": 1,
      "no-case-declarations": 0,
      "import/prefer-default-export": 0
    },
    "settings": {
      "import/core-modules": ["react", "prop-types"]
    },
    "globals": {
      "graphql": true
    },
    "plugins": ["prettier"],
    "parser": "babel-eslint",
    "parserOptions": {
      "ecmaVersion": 2017,
      "sourceType": "module",
      "ecmaFeatures": {
        "jsx": true
      }
    },
    "env": {
      "es6": true,
      "browser": true,
      "node": true
    }
  }
  1. Edit .prettierrc
{
  "printWidth": 80,
  "singleQuote": true,
  "trailingComma": "all",
  "write": "src/**/*.js",
  "jsxBracketSameLine": true
}
  1. Edit .jshintrc
{
    "esversion": 6
  }
  1. Update header [grabient] (https://www.grabient.com/)

  2. [Gatsby firebase] (https://github.com/ryanflorence/gatsby-source-firebase)

  3. Insert equations

Version 2

Using gatsby template Lumen

Hui Jie Zi-Yep's Projects

Hui Jie Zi-Yep doesnโ€™t have any public repositories yet.

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.