biagiojs

AI agents

biagiojs ships first-class material for LLMs and coding agents: a curated index, a full operational guide in the npm package, and documentation structured for retrieval.

Quick links

ResourceURL
llms.txt (site index)/llms.txt
AI-GUIDE.md (full reference)GitHub
Documentation/docs/

Point your agent at https://biagio.danilosprovieri.com/llms.txt for a compact map of every guide. For implementation detail, read AI-GUIDE.md in the biagiojs npm package (also on GitHub).

Mental model

biagiojs is SSG-first + islands, business-aware. Components declare business weights (conversion, seo, interaction, 0–1) and costs (cpu, network). The build decides:

  • HTML source order (what hits the wire first)
  • hydration plan (eager / lazy / static)
  • preload by value/KB
  • SEO, consent, i18n

Golden rule: static is the desired default. Pages without islands ship zero JavaScript in production.

Agent workflow

npx create-biagiojs my-site
cd my-site && npm install
  1. Set site.baseUrl to the real production URL (canonical, sitemap, OG depend on it).
  2. Prefer pages/*.page.biagio for declarative pages.
  3. Use weight tables from Business weights — do not invent random numbers.
  4. Run npx biagio build . and read the render order + hydration log.
  5. Run npx biagio doctor . before deploy.

Weight reference (do not guess)

Component typeconversionseointeraction
Hero / main CTA0.8–1.00.7–1.00.5–0.9
Product card0.6–0.90.5–0.80.3–0.6
Navigation0.1–0.30.2–0.50.4–0.7
Footer / legal0.05–0.10.3–0.50.01–0.05
Chat widget0.03–0.10.10.1–0.3

Low conversion + high network cost → stays static (no JS).

Files agents should read first

  1. Getting started — config and first page
  2. Syntax (.biagio) — weights and hydration attributes
  3. Automatic SEOpage meta, sitemap, hreflang, llms.txt
  4. Consent — never load trackers without gating
  5. AI-GUIDE.md — exhaustive reference

SEO for agents

  • site.baseUrl must be the live domain.
  • page.hideBreadcrumb: true when you render your own breadcrumb in the layout (JSON-LD breadcrumbs still work).
  • robots.txt and sitemap.xml are generated at build; submit https://yoursite.com/sitemap.xml in Google Search Console.
  • Add /llms.txt at the site root for LLM discovery (copy from this docs site's public/llms.txt pattern).

Common mistakes

  • Hydrating everything — defeats the framework; use weights.
  • Skipping baseUrl — breaks canonical and sitemap.
  • Loading analytics without data-cvw-consent or island consent=.
  • Using fonts.googleapis.com in production instead of site.fonts self-host.