This project targets Deno 2.x (aligned with the CI workflow).
Start the project:
deno task start
This will watch the project directory and restart as necessary.
To make sure the Vite build succeeds before pushing:
deno task build
If you want to inspect the production output locally, run:
deno task preview
This launches the prerendered build on port 8000.
This site uses Algolia search.
- Create or choose an Algolia index.
- Generate a search-only API key.
- Set runtime credentials.
- Start the app with
deno task start.
Runtime environment variables:
ALGOLIA_APP_ID=...
ALGOLIA_SEARCH_API_KEY=...
ALGOLIA_INDEX_NAME=...
When all three variables are present, a search box is rendered in the header. If they are missing, the UI stays hidden.
This repository includes a deploy-time index sync flow:
- Script:
scripts/sync_algolia_index.ts - Workflow:
.github/workflows/algolia-index.yml
What it does:
- Reads local markdown posts.
- Converts each post into an Algolia record.
- Clears the target index.
- Uploads all records in batches.
Required GitHub secrets/variables:
Secrets:
ALGOLIA_APP_ID
ALGOLIA_ADMIN_API_KEY
ALGOLIA_INDEX_NAME
Variables:
SITE_URL=https://9renpoto.win
Run locally:
ALGOLIA_APP_ID=... \
ALGOLIA_ADMIN_API_KEY=... \
ALGOLIA_INDEX_NAME=... \
SITE_URL=https://9renpoto.win \
deno task algolia:syncDry-run (no write):
ALGOLIA_DRY_RUN=1 deno task algolia:syncAfter indexing, set runtime env vars for search UI:
ALGOLIA_APP_ID=<ALGOLIA_APP_ID>
ALGOLIA_SEARCH_API_KEY=<search-only API key>
ALGOLIA_INDEX_NAME=<same index name>