Overview
nextein is a static site generator based in Next.js. It is a wrapper around Next.js that allows you to write static sites using markdown and React. It requires NodeJS v10.x+ to run nextein commands.
Features
- Allows you to write static sites using markdown and React.
- Supports dynamic routes and static generator functions.
- Provides a fetcher method to retrieve posts and data from markdown files.
- Allows you to customize the rendering of markdown elements using custom renderers.
- Generates unique identifiers for each post and provides frontmatter object with post meta information.
Installation
To install the nextein theme, follow these steps:
Create a project:
mkdir my-site cd my-site npm init -yInstall Dependencies:
npm i nextein next react react-domAdd a next.config.js config file.
Create pages/index.js.
Create a markdown post entry under posts folder (e.g., posts/my-first-post.md).
Add npm scripts to run dev mode to your package.json:
"scripts": { "dev": "nextein dev" }Run the development server:
npm run devOpen http://localhost:3000 in your browser.
Add another npm script to your package.json to export the site:
"scripts": { "build": "nextein build" }
Summary
nextein is a static site generator based on Next.js that allows you to build static sites using markdown and React. It provides features like dynamic routes, custom renderers, and a convenient fetcher method to retrieve posts and data from markdown files. With nextein, you can create powerful and customizable static sites efficiently.