This repository hosts code snippets for TagoIO, combining both Analysis and Payload Parser snippets in a single project and website. The site is built with Astro and styled with a shadcn-inspired Tailwind theme.
- Analysis JSON: https://snippets.tago.io/analysis/{runtime}.json (e.g., deno-rt2025.json)
- Analysis files: https://snippets.tago.io/analysis/{runtime}/{filename}
- Payload Parser JSON: https://snippets.tago.io/payload-parser/{runtime}.json (javascript)
- Payload Parser files: https://snippets.tago.io/payload-parser/{runtime}/{filename}
The JSON files contain metadata only. The code is served as individual files from their runtime directories.
- snippets/
- analysis/
- node-legacy/
- node-rt2025/
- deno-rt2025/
- python-legacy/
- python-rt2025/
- payload-parser/
- javascript/
- analysis/
- scripts/
- prepare-snippets.mjs (build pre-step that generates JSON and exposes files)
- src/ (Astro site)
- public/ (static files; JSON and code are generated into here)
- dist/ (Astro build output)
Each runtime folder contains code files with metadata embedded in comments.
Each per-runtime JSON produced in public/{category}/
has the following shape:
{
"runtime": "deno-rt2025",
"schema_version": 1,
"generated_at": "2025-08-08T00:00:00.000Z",
"snippets": [
{
"id": "hello-world",
"title": "Hello World",
"description": "Basic hello world example",
"language": "typescript",
"tags": ["basic", "deno"],
"filename": "hello-world.ts",
"file_path": "deno-rt2025/hello-world.ts"
}
]
}
- Requirements: Node.js 18+ (or 22 LTS)
- Install deps:
npm install
- Dev server:
npm run dev
- Build site:
npm run build
The build will:
- Collect snippet metadata and write JSON + code files to
public/analysis/
andpublic/payload-parser/
- Also write backward-compatible Analysis JSON/files to
public/{runtime}.json
andpublic/{runtime}/
- Build the Astro site into
dist/
A GitHub Actions workflow builds the Astro site (including JSON and files) and deploys dist/
to GitHub Pages on each push to main
. The site includes friendly pages, while JSON and code files are served directly from the built output. Legacy Analysis endpoints remain functional.