Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Local development

You never need to run the site locally to publish. But for template changes, CSS work, or previewing a long article, it’s one command away.

Setup (once)

git clone git@github.com:Webrowse/adarshrust-blog.git
cd adarshrust-blog
npm install

Requires Node 20+ (the deploy uses Node 24).

Preview with live reload

npm run serve

Serves at http://localhost:8080 and rebuilds on every file save — edit a Markdown file and the browser refreshes itself.

Because future-dated articles are excluded at build time, a scheduled post won’t show locally either. To preview one, temporarily set its date to today (and remember to set it back before committing, or commit it — it just publishes early).

One-off build

npm run build

Writes the complete site to _site/. That folder is exactly what gets deployed; you can open pages from it directly or serve it with any static file server.

Typical local workflows

  • Previewing a draft: run npm run serve, write in your editor, watch the rendered article. Commit when happy.
  • Styling: all CSS is in static/css/ (tokens.css holds the colors and fonts; components.css most of the look). Plain CSS, no build step.
  • Template changes: layouts are Nunjucks files in _includes/. The dev server reloads them like everything else.

_site/ and node_modules/ are gitignored — never commit them.