Setup Dendron CLI
For upgrading CLI, and dendron workspace configurations, make sure to do the following to have the latest and greatest updates in your published site.
Run the following command to setup publishing for your vault. This will pull in the nextjs-template which will be used to generated a static website from your notes.
NOTE: if you are having trouble doing this using powershell, we recommend following these steps using WSL instead
npx dendron publish init # you should see the following output 🌱 checking if .next directory exists. 🌱 .next directory does not exist 🌱 Initializing NextJS template. 🌱 Successfully cloned. 🌱 All dependencies installed.
Run the following command to prepare your notes for publishing.
npx dendron publish build
Run the following to see a local preview of what your site will look like. By default, Dendron will publish all the notes in your given vault.
- This command launches a development server which previews how your published website will look like. Visit
http://localhost:3000to access your site.
CTRL-Con the terminal to exit the preview
npx 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 # generated html files are inside of `.next/out`
You can see the manual steps for running Next.js here
Upgrade Dendron Next.js Template
rm .next && npx dendron publish init
Reinstall Dendron Next.js Template
rm -rf .next && npx dendron publish init