Skip to content

Commit 98872e4

Browse files
docs: link static plugin implementation as plugin API example (#642)
* docs: link static plugin implementation as plugin API example The static file plugin is now open source. Link its implementation from the Static Files overview (source of truth for behavior) and from the Plugin API page (real-world example of the modern plugin API). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * docs: hyphenate "open-source" compound modifier Review feedback on #642: "open source implementation" uses a compound modifier before a noun, which takes a hyphen. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent eb49a16 commit 98872e4

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

reference/components/plugin-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ Function signature for the `'all'` event handler passed to `scope.handleEntry()`
381381

382382
## Example: Static File Server Plugin
383383

384-
A simplified form of the built-in `static` plugin demonstrating key Plugin API patterns:
384+
A simplified form of the built-in `static` plugin demonstrating key Plugin API patterns. For a complete, production example of this API in action, read the plugin's open-source implementation in [`server/static.ts`](https://github.com/HarperFast/harper/blob/main/server/static.ts).
385385

386386
```js
387387
export function handleApplication(scope) {

reference/static-files/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ The `static` built-in plugin serves static files from your Harper application ov
1919

2020
`static` does **not** need to be installed — it is built into Harper and only needs to be declared in your `config.yaml`.
2121

22+
The plugin is open source: its implementation in [`server/static.ts`](https://github.com/HarperFast/harper/blob/main/server/static.ts) is the source of truth for the behavior described on this page.
23+
2224
## Basic Usage
2325

2426
Configure `static` with the `files` option pointing to the files you want to serve:

0 commit comments

Comments
 (0)