Localhost

This goes over hosting a Dendron published site on your local machine.

Prerequisites

Follow instructions from Publishing Quickstart and have publishing setup locally

Steps

  1. Build the metadata for your notes

    Build Notes

    Run the following command to prepare your notes for publishing.

    npx dendron publish build
    

  2. Build the HTML for your notes
    cd .next && npm run build
    
  3. Run the local server
    npm run start
    

This will start a local server on localhost:3000. Unlike the dev server which you get when you run npx dendron publish dev, this is a production server that optimizes all your pages and makes sure to serve everything in seconds.

NOTE: when you want to sync your latest changes, you'll need to run the above steps again. If you host using localhost, we recommend setting up a cron job to pull, build and restart your local server so that your notes are always up to date!


Backlinks