Simple and lean Nextra blog static template you can build upon. Output directory set to export
and build command to npm install && npm run build
.
Inside of your Nextra project you'll see the following folders and files:
/
βββ pages/
β βββ posts/
β β βββ post.mdx
β βββ _app.tsx
β βββ index.tsx
β βββ _document.tsx
βββ public/
β βββ favicon.svg
βββ styles/
βββ package.json
All commands are run from the root of the project from a terminal:
Command | Action |
---|---|
pnpm install |
Installs dependencies |
pnpm run dev |
Starts local dev server at localhost:3000 |
pnpm run build |
Build your production site to ./out/ |
pnpm run start |
Preview your build locally, before deploying |
You can configure this site deployment using Fleek CLI and running:
> fleek sites init
WARN! Fleek CLI is in beta phase, use it under your own responsibility
? Choose one of the existing sites or create a new one. βΊ
β― Create a new site
It will prompt you for a name
, dist
directory location & build command
name
: How you want to name the sitedist
: The output directory where the site is located, for this template it's./out
build command
: Command to build your site, this will be used to deploy the latest version either by CLI or Github Actions
After configuiring your fleek.json
file, you can deployt the site by running
fleek sites deploy
After running it you will get an output like this:
WARN! Fleek CLI is in beta, use it at your own discretion
> Success! Deployed!
> Site IPFS CID: QmP1nDyoHqSrRabwUSrxRV3DJqiKH7b9t1tpLcr1NTkm1M
> You can visit through the gateway:
> https://ipfs.io/ipfs/QmP1nDyoHqSrRabwUSrxRV3DJqiKH7b9t1tpLcr1NTkm1M
- Continuous Integration (CI):
fleek sites ci
Documentation. - Adding custom domains:
fleek domains create
Documentation.
This template has been configured to produce a static output.
// next.config.js
module.exports = {
...withNextra(),
output: 'export',
...
};
You can find more information about static exports in Next Documentation.