mirror of
https://github.com/prdlk/website.git
synced 2026-08-03 09:51:41 +00:00
docs(agents): add AGENTS.md documentation files for site agents
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<!-- Parent: ../AGENTS.md -->
|
||||
<!-- Generated: 2026-06-30 | Updated: 2026-06-30 -->
|
||||
|
||||
# utils
|
||||
|
||||
## Purpose
|
||||
Pure, framework-agnostic helper functions used across components, pages, and data helpers.
|
||||
|
||||
## Key Files
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `date.ts` | `getFormattedDate` (locale-aware, per `siteConfig.date`) and `collectionDateSort` — sorts `writing`/`projects`/`speaking`/etc. by `publishDate` descending. |
|
||||
| `generateToc.ts` | Builds a nested table-of-contents tree from Astro markdown headings (used by `TOC.astro`). |
|
||||
| `remark.ts` | Shared remark/markdown helpers. |
|
||||
| `domElement.ts` | Small DOM helpers for client-side scripts. |
|
||||
| `webmentions.ts` | Fetches and caches webmentions from webmention.io for the webmention components. |
|
||||
|
||||
## For AI Agents
|
||||
|
||||
### Working In This Directory
|
||||
- `collectionDateSort` is typed for entries with a `publishDate`; experience entries (which use `startDate`/`endDate`) are sorted in `@/data/experience.ts` instead.
|
||||
- Keep these pure and side-effect-free where possible; `webmentions.ts` is the exception (network + cache).
|
||||
|
||||
## Dependencies
|
||||
|
||||
### Internal
|
||||
- `@/site.config` (date locale), `@/types`.
|
||||
|
||||
<!-- MANUAL: -->
|
||||
Reference in New Issue
Block a user