This guide walks you through publishing with Next.js.
Install the latest version of the Dendron CLI
Install yarn (optional)
- NOTE: we use yarn to manage all our js commands. npm works as well if you'd rather use it instead. All code examples will use
npm install -g yarn
Run the following commands at the root of your Dendron workspace
echo .next >> .gitignore
- Clone the Next.js repository and install dependencies
npx dendron publish init
- Build and preview
dendron publish dev
- Run this command inside the root of your workspace
- This command builds the static HTML which you'll upload to actually publish your site, and adds the static website to the
npx dendron publish export
Congrats, you did it! At this point, you have a folder of static HTML which you can host and deploy anywhere. You can checkout our cookbook for examples of deploying to popular destinations like GitHub Pages.