Preview Your Site
DEPRECATION NOTICE: This is documentation related to legacy publishing. For the latest guidance, reference the current publishing documentation.
CLI
The following describes how to prepare your notes for publication using Dendron CLI.
Pre-requisites
- node version 12 or higher, see installation guide here
Requirements
- pre-requisite:
- node version 12 or higher, see installation guide here Node
Setup
In order to publish, run the following commands inside your workspace.
npm init -y
npm install @dendronhq/dendron-cli@latest
npm install @dendronhq/dendron-11ty-legacy@latest
Local Preview
After you have your dependencies installed, build your site using the following command inside your workspace root.
npx dendron buildSite --stage dev --serve
This will both compile your site locally and make it available at localhost:8080
for instant preview. When building your site locally, the pages will be build to {wsRoot}/build/site
.
- NOTE: Dendron currently doesn't support live reload so you'll need to
CTRL-C
and re-runbuildSite
in order to see the latest changes
Build for deployment
When you are ready to publish to GitHub, make sure to change the stage to prod
.
npx dendron buildSite --stage prod
This will build your site to the path specified by siteRootDir in dendron.yml
. By default, this is located at {wsRoot}/docs
.
Get ready to publish
When you are ready, you can go to publishing your site for instructions on announcing your site to the world.
Backlinks