npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@goobits/docs-engine

v2.0.3

Published

Battery-included documentation system for SvelteKit with markdown rendering, screenshots, and search

Readme

@goobits/docs-engine

Documentation system for SvelteKit with markdown rendering, symbol references, and automated tooling.

Key Features

  • Enhanced Code Blocks - Syntax highlighting, line numbers, diff syntax, copy-to-clipboard
  • Symbol References - Link to TypeScript types/functions with {@Symbol} syntax
  • Image Optimization - Auto-generate WebP/AVIF, lazy loading, lightbox modal
  • Math Rendering - LaTeX equations with KaTeX (inline $...$ and display $$...$$)
  • API Documentation - Auto-generate API docs from TypeScript with JSDoc
  • Link Validation - CLI tool to check internal and external links
  • Automated Screenshots - Web and CLI screenshot generation
  • MDsveX Plugins - Callouts, mermaid, tabs, filetree, TOC, and more

Quick Start

# Installation
pnpm add @goobits/docs-engine

# CLI tools (optional)
pnpm add -D @goobits/docs-engine-cli

1. Configure MDSveX

Add plugins to your svelte.config.js:

import { mdsvex } from 'mdsvex';
import remarkMath from 'remark-math';
import {
  filetreePlugin,
  calloutsPlugin,
  mermaidPlugin,
  tabsPlugin,
  codeHighlightPlugin,
  katexPlugin,
  remarkTableOfContents,
  linksPlugin,
  screenshotPlugin,
} from '@goobits/docs-engine/plugins';

export default {
  extensions: ['.svelte', '.md'],
  preprocess: [
    mdsvex({
      remarkPlugins: [
        filetreePlugin(),
        calloutsPlugin(),
        mermaidPlugin(),
        tabsPlugin(),
        remarkTableOfContents(),
        linksPlugin(),
        referencePlugin(),      // Symbol references
        screenshotPlugin(),
        remarkMath,             // Parse math syntax
        katexPlugin(),          // Render math with KaTeX
        codeHighlightPlugin({   // Enhanced code blocks
          theme: 'dracula',
          showLineNumbers: false
        }),
      ],
    }),
  ],
};

2. Add Hydrators to Layout

In your layout component:

<script>
  import {
    CodeTabsHydrator,
    FileTreeHydrator,
    MermaidHydrator,
    ScreenshotHydrator,
  } from '@goobits/docs-engine/components';
</script>

<CodeTabsHydrator theme="dracula" />
<FileTreeHydrator allowCopy={true} />
<MermaidHydrator />
<ScreenshotHydrator />

<slot />

3. Import Styles

@import '@goobits/docs-engine/styles';

CLI Tools

Link Checking

Validate all links in your documentation:

# Check internal links only
pnpm docs-engine check-links

# Check external links too
pnpm docs-engine check-links --external

# Quiet mode (errors only)
pnpm docs-engine check-links --quiet

# JSON output for CI
pnpm docs-engine check-links --json

# Configure via .linkcheckerrc.json

Validates internal links (files and anchors), external links with HTTP requests, and provides color-coded output with configurable concurrency.

See CLI documentation for details.

Documentation

Complete Documentation Index - Full documentation with learning paths

Getting Started

Plugin Guides

JavaScript API

import { parseFrontmatter, extractTitle } from '@goobits/docs-engine/utils';
import { buildNavigation } from '@goobits/docs-engine/utils';
import { loadSymbolMap, resolveSymbol } from '@goobits/docs-engine/utils';

// Parse frontmatter from markdown
const { frontmatter, content } = parseFrontmatter(markdown);

// Build navigation from markdown files
const navigation = buildNavigation(files);

// Resolve symbol references
const symbolMap = loadSymbolMap();
const symbol = resolveSymbol('RequestState', symbolMap);

Example: Symbol References

1. Generate symbol map (in your project):

# Create scripts/docs/generate-symbol-map.ts
pnpm docs:symbols

2. Use in markdown:

# API Documentation

The {@RequestState} type tracks request context.

:::reference RequestState
:::

3. Rendered output:

Links to GitHub source with hover tooltips showing type signatures.

See docs/guides/examples.md for more examples.

Architecture

The symbol reference system separates reusable package functionality from consumer-specific implementation:

Package (this package):

  • Remark/rehype plugins for transforming {@Symbol} syntax
  • Symbol resolution and rendering logic
  • Type definitions and utilities

Consumer (your project):

  • Symbol generation scripts (scan TypeScript files)
  • Build pipeline integration
  • Pre-commit hooks and CI validation

See Architecture Guide for integration guide and design decisions.

License

MIT - see LICENSE for details