Common

Setup Dendron CLI

npm init -y 
npm install @dendronhq/dendron-cli@latest

Setup Notes

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

Build Notes

  • Run this command inside the root of your workspace
npx dendron publish build

Preview Notes

  • Run this command inside the root of your workspace
  • This command launches a development server which previews how your published website will look like. Visit http://localhost:3000 to accesss your site.
  • Enter CTRL-C on the terminal to exit the preview
npx dendron publish dev

Export Notes

  • 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

Manual Install

You can see the manual steps for running Next.js here

Upgrade Dendron Next.js Template

rm .next && dendron publish init

Reinstall Dendron Next.js Template

rm -rf .next && npx dendron publish init


Backlinks