This guide walks you through publishing with Next.js.


  1. Install the latest version of the Dendron CLI

  2. 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 yarn
npm install -g yarn



Run the following commands at the root of your Dendron workspace

  1. Update .gitignore
    echo .next >> .gitignore
  2. Clone the Next.js repository and install dependencies
    npx dendron publish init


  1. 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 .next/out/ directory.
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.