Nextjs Template Quickstart
Prerequisites
Run
- Navigate to the nextjs-template
cd {path-to-template}/nextjs-template
- Install all packages
- NOTE: if you are building nextjs-template inside dendron monorepo, then you can skip this step
yarn
- To run nextjs using sample data, run the following
curl -LO https://artifacts-prod-artifactb7980f61-19orqnnuurvwy.s3.us-west-2.amazonaws.com/artifacts/dendron-site.zip
unzip dendron-site.zip
- Run the nextj sapp
yarn dev
- Navigate to your browser. For example http://localhost:3000/notes/6322a2de-34fd-4c93-bcbe-d71c30e5f2b6 to go to a particular note
- Build your notes for static hosting
yarn export
- Preview your statically hosted notes
cd out
python -m SimpleHTTPServer 8000
# open localhost:8000 to see your notes
Run with your own data
- Navigate to your workspace root
- Run the following command.
dendron exportPod --podId dendron.nextjs --config "dest={path/to/nextjs-template}"
Your notes/html files will be copied over to {path-to-template}/nextjs-template/data/notes/
Backlinks