blog
blog copied to clipboard
:rocket: An awesome blog system based on Next.js
Next.js Blog Starter
A great blog system based on Next.js.
:sparkles: Features
Visual Features
- Great landing page.
- Typing effect for landing page title.
- Great fluid of post card.
- Great tags cloud page: separate page for posts under each tag.
- Great GitHub information card.
- Social share buttons.
- Full-featured
MDX
support:- Optimized vertical rhythm for headings and paragraphs.
- Custom almost all
Markdown
built-in components. -
GFM
syntax support. -
Katex
math support. - Admonition container support.
- Emoji short code support.
- Image preview card support.
- Pretty code blocks support:
- Syntax highlight using
PrismJS
. - macOS style code box.
- Line number support.
- Lines highlight support.
- Custom code title support.
- Quick code copy support.
- Syntax highlight using
- Out of box support for live code editor.
- Automatically generated sidebar navigation, table of contents, previous and next post navigation links.
- Nice animation for page transitions and dynamic routing.
- Motion almost everything.
- Disqus comments system.
- Customized 404 not found page.
- Dark mode support.
- ...and more.
Development Features
- Lightning fast
HMR
. - Dynamic route generation for
Markdown
posts. - Optimized build using
Rust
compiler. -
TypeScript
static type checking. -
ESLint
,StyleLint
andPrettier
style checking. - Out of box support for
tailwind.css
. - Fully customizable styles through
tailwind.css
. - Mobile-first approach in development.
- Out of box support for
Vercel
deployment. - Separate components for everything.
- Complete
React
components testing usingJest
andTesting Library
. - E2E visual testing using
Cypress
forChrome
andFirefox
. - Optimization for
SEO
: meta heading, sitemap androbots.txt
support. - Progressive web app (
PWA
): offline support and webapp manifest support. - ...and more.
:bookmark_tabs: Post Template
Yaml
Front + Markdown
Body:
---
layout: post
title: 'React Redux Basic Notes'
subtitle: 'Daily I learned'
author: 'sabertaz'
date: 2022-02-03
tags:
- Redux
- React
- JavaScript
- Frontend Development
- Web Development
---
# React Redux Basic Notes
## Introduction
<... more contents>
:rocket: Quick start
Installation
git clone --depth=1 https://github.com/sabertazimi/blog
cd blog
npm install
Development
# http://localhost:3000
npm start
Open the source code and start editing!
Your site is now running at http://localhost:3000
!
:stars: Deployment
Build for /
path:
# Deploy to Vercel.
npm run build
:open_file_folder: Fold Structure
A quick look at the top-level files and directories you'll see in a Next.js project.
.
├── node_modules
├── __mocks__
├── components
├── config
├── contents
├── cypress
├── hooks
├── layouts
├── lib
├── pages
├── public
├── styles
├── types
├── .gitignore
├── .tokeignore
├── .eslintrc.json
├── .prettierrc.json
├── .stylelintrc.json
├── .versionrc.json
├── codecov.yml
├── cypress.json
├── jest.config.js
├── jest.setup.js
├── next-env.d.ts
├── next.config.js
├── package.json
├── postcss.config.js
├── sitemap.config.js
├── tailwind.config.js
├── tsconfig.json
├── LICENSE
└── README.md
-
/node_modules
: This directory contains all of the modules of code. -
/__mocks__
: Mock API for 3rd-party libraries for Jest testing. -
components
: React components building block. -
config
: Blog site configuration (color/metadata/etc.). -
contents
: Blog posts (.md
/.mdx
). -
cypress
: Cypress E2E testing files. -
hooks
: Hooks for shared logic. -
layouts
: Layouts components. -
lib
: Data fetching helper functions. -
pages
: Pages components (SSG). -
public
: Static assets. -
styles
: CSS stylesheets files. -
types
: TypeScript shared type definition. -
.gitignore
: This file tells git which files it should not track. -
.tokeignore
: Code Lines configuration file. -
.eslintrc.json
: ESLint configuration file. -
.prettierrc.json
: Prettier configuration file. -
.stylelintrc.json
: StyleLint configuration file. -
.versionrc.json
: Standard Version configuration file. -
codecov.yml
: Codecov CI configuration file. -
cypress.json
: Cypress E2E testing configuration file. -
jest.config.js
: Jest configuration file. -
jest.setup.js
: Jest basic setup script (after environment setup). -
next-env.d.ts
:Next.js
internal type definition. -
next.config.js
:Next.js
configuration file. -
package.json
: A manifest file for Node.js projects. -
postcss.config.js
: PostCSS configuration file. -
sitemap.config.js
:next-sitemap
configuration file. -
tailwind.config.js
: Tailwind.css configuration file. -
tsconfig.json
: TypeScript configuration file. -
LICENSE
: This Next.js starter is licensed under theMIT
license. -
README.md
: A text file containing useful reference information.
:construction: Caveats
import
and export
statements cannot be used inside an MDX file.
If you need to use components in your MDX files,
they should be provided to /components/MDX/index.ts
.
See reason here and explanation here.