mix skua.gen.seo (Skua v0.10.0)

Copy Markdown View Source

Generate editable, public-facing discovery files and wire them to be served:

mix skua.gen.seo

Creates:

  • priv/static/robots.txt — public crawl rules. The conventional scoped/authenticated prefixes a Skua app generates (/users, /dashboard, /dev) are Disallowed by default, so private surfaces stay out of crawlers. Includes a commented Sitemap: line to fill in later. A stock phx.new robots.txt is replaced; a robots.txt this task already wrote (it carries a marker comment) is left untouched so your edits survive re-runs.
  • priv/static/llms.txt — an llms.txt template (H1 name, summary, link sections) describing your public content, for LLMs and agents. Never overwritten once it exists — it's yours to edit.

And wires lib/<app>_web.ex's static_paths/0 to include llms.txt (and robots.txt if somehow absent) so both serve at /llms.txt and /robots.txt.

Why static files

Both are served by Plug.Static, which sits above the router — so they never pass through your :browser/auth pipelines and can't leak scoped or authenticated routes. That's the default: public-only. Point them at real content by editing the two files; nothing else is required.

Idempotent: re-running adds nothing already present, preserves your llms.txt and any marker-bearing robots.txt, and re-applies the static_paths/0 edit only if needed.