Plugins
Add, replace and remove the features of your site.
Your site starts with a set of default plugins. Add more with .plugins():
import { blogPlugin } from "@fumapress/blog";
export default createPress(content).plugins(blogPlugin({ source: "blog" }));SEO
Sitemap, robots.txt, RSS and Open Graph images.
AI
llms.txt, AI chat and MCP.
API Docs
OpenAPI, AsyncAPI and GraphQL.
Blog
Posts, an index and tag pages.
Changelog
Your Tegami release notes.
Feedback
A form on pages and selected text.
Link Validation
Find broken links at build time.
Writing Plugins
Add anything else.
Default Plugins
recommendedPreset() has these plugins. The key is its option:
| Feature | Key |
|---|---|
| Sitemap | sitemap |
| robots.txt | robots |
| RSS | rss |
| Open Graph images | ogImage |
| llms.txt | llms |
| Search with FlexSearch | search |
There is no image plugin, since Astro Images handles images.
Options of a Default Plugin
recommendedPreset() takes the options of each default plugin. Pass it to preset in .config():
import { createPress, recommendedPreset } from "@fumapress/astro/config";
createPress(content).config({
preset: recommendedPreset({ rss: { limit: 50 } }),
});Replacing a Default Plugin
Set the default plugin to false, then list your own. This site uses Orama for search:
import { createPress, recommendedPreset } from "@fumapress/astro/config";
import { oramaSearchPlugin } from "@fumapress/astro/plugins/orama-search";
export const app = createPress(content).plugins(oramaSearchPlugin());
export default app.config({
preset: recommendedPreset({ search: false }),
});Removing Default Plugins
Set a default plugin to false to remove it, or pass an empty list to remove them all:
createPress(content).config({
preset: recommendedPreset({ rss: false }),
});Conditional Plugins and Plugin Order
Falsy values are skipped, so a plugin can be conditional:
const blog = process.env.ENABLE_BLOG && blogPlugin({ source: "blog" });
createPress(content).plugins(blog);The order matters in two places. Middleware is nested in list order, so your first plugin wraps the others. Navbar links also use the list order, after your ui.layoutProps links.
Last updated on