New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@farming-labs/astro

Package Overview
Dependencies
Maintainers
1
Versions
351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farming-labs/astro

Astro adapter for @farming-labs/docs — content loading and navigation utilities

latest
npmnpm
Version
0.2.132
Version published
Weekly downloads
607
-91.59%
Maintainers
1
Weekly downloads
 
Created
Source

@farming-labs/astro

The Astro runtime adapter for @farming-labs/docs.

It loads Markdown and MDX content, builds navigation, renders page content on the server, and provides Astro handlers for docs, search, AI, agent discovery, MCP, and API references.

Package responsibilities

  • @farming-labs/docs — shared config, types, content features, and CLI
  • @farming-labs/astro — Astro content loading and server handlers
  • @farming-labs/astro-theme — Astro layout and UI components
  • @farming-labs/theme — shared preset CSS

Install

The CLI can wire the complete Astro integration:

npx @farming-labs/docs@latest init

For manual installation:

npm install @farming-labs/docs @farming-labs/astro @farming-labs/astro-theme @farming-labs/theme

Dynamic docs routes also require an Astro server adapter such as @astrojs/vercel, @astrojs/netlify, @astrojs/node, or @astrojs/cloudflare.

Server integration

Preload content with Vite and create the docs server:

// src/lib/docs.server.ts
import { createDocsServer } from "@farming-labs/astro/server";
import config from "./docs.config";

const contentFiles = import.meta.glob("/docs/**/*.{md,mdx}", {
  query: "?raw",
  import: "default",
  eager: true,
}) as Record<string, string>;

export const { load, GET, HEAD, POST, MCP } = createDocsServer({
  ...config,
  _preloadedContent: contentFiles,
});

Call load(Astro.url.pathname) from the docs page and render the result with components from @farming-labs/astro-theme. The CLI generates the pages, API routes, public forwarding, theme CSS import, and Astro adapter configuration.

Main entrypoints

EntrypointPurpose
@farming-labs/astro/serverDocs server, loaders, API/MCP handlers, and API-reference helper
@farming-labs/astro/contentContent discovery and navigation utilities
@farming-labs/astro/markdownServer-side Markdown rendering
@farming-labs/astro/api-referenceAPI-reference route handler

Learn more

License

MIT

Keywords

astro

FAQs

Package last updated on 25 Oct 2026

Related posts