Installation
What it is#
This page describes how to run jcode locally so you can preview changes before pushing.
Prerequisites#
- Node.js 20 or later
- npm
Setup#
Clone the repo and install dependencies:
git clone https://github.com/jaygmx/jcode
cd jcode
npm install
Output: (installs to node_modules/)
Activate git hooks:
git config core.hooksPath scripts/hooks
Output: (none — sets hook path in local git config)
Development server#
npm run dev
Output:
🚀 astro v6.x.x started in Xms
┃ Local http://localhost:4321/
┃ Network use --host to expose
Open http://localhost:4321 in your browser. Changes to content and components hot-reload automatically.
Build and preview#
npm run build
npm run preview
Output: (builds to dist/, pagefind indexes the output, preview serves at http://localhost:4321)
[!NOTE] Search (
⌘K) only works after a full build andnpm run preview. It does not work innpm run dev.
Lint scripts#
Install the Python dependencies first:
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\Activate.ps1 on Windows
pip install -r scripts/requirements.txt
Output: (installs pydantic, ruamel.yaml, pymarkdownlnt)
Then run the validators:
python scripts/validate_frontmatter.py
python scripts/lint_markdown.py
Output: (writes results to console and scripts/logs/)