Opens in a new tab
Free on WordPress.org

Code blocks and API docs, built for the block editor

One plugin for developer documentation in WordPress: syntax-highlighted code snippets, a full family of API-reference blocks, and blocks you can generate straight from an OpenAPI spec. All built for Gutenberg, with no external services.

12 blocks included Shortcodes No external requests
billing.py
from nahnu import Client

client = Client("sk_live_dummy")
resp = client.invoices.create(
    customer="cus_8f2a",
    amount=4900,
)
Endpoint block
POST /v1/invoices

Create a new invoice for a customer.

customerstringrequired
amountintegerrequired
Three pieces, one system

Everything a docs page needs, nothing it doesn't

The code block handles snippets. The API blocks handle reference pages. And when you already have a spec, OpenAPI generates both for you.

Code Block

Syntax highlighting for 20 plus languages via bundled Prism.js. Light and dark auto-switching, collapsible previews, one-click copy, optional line numbers.

class User:
    def __init__(self, name, email):
        self.name = name

API Blocks

Endpoints, parameter tables, request and response tabs, status codes, auth, error codes, events, and a live Try It console, all sharing one visual language.

GET /v1/invoices/{id}
200 OK 404

OpenAPI Ready

Point another plugin at nahnu_code_block_build_block_markup() and turn a spec's paths straight into fully-formed blocks.

openapi.yaml to build_block_markup()
Endpoint
Parameters
Response Body
No external requestsPrism.js ships with the plugin. Nothing you write is sent anywhere but your own server.
Auto light and darkFollows the visitor's OS preference, or hooks into a theme's own dark mode toggle.
Built for GutenbergNative blocks with sidebar controls. Shortcodes are not required, though they are supported too.
The full set

Twelve blocks, one API reference page

Mix and match. Most documentation sites end up using all of them.

Endpoint

Method, path, version, deprecation notice, auth flag.

core
Parameters

Type, location, format, defaults, nested objects.

core
Request / Response

Tabbed examples per language, synced across the page.

core
Response Body

Real bodies grouped by status code, with a schema toggle.

core
Status Codes

Color-coded by class, with collapsible example bodies.

core
Authentication

Bearer, API key, Basic, or OAuth 2.0.

core
Try It Console

A real request, sent from the visitor's own browser.

live
Error Codes

Your API's own error taxonomy, distinct from HTTP status.

core
Events

Webhook names with descriptions and example payloads.

core
API Navigation

Auto-generated jump list of every Endpoint block.

auto
Servers

Base URLs, maps to OpenAPI's servers.

core
Code Block

The syntax-highlighted snippet block at the heart of it all.

core

Document your API without leaving WordPress

Nahnu Code and API Block is free either way. Pick how you want to write.

Do it yourself

Write endpoints by hand

Drop in Endpoint, Parameters, Response Body and the rest as you write, full control over every block.

Get Nahnu Code Block, free
Beta: sync from a spec

Generate docs from OpenAPI

Pair Nahnu with WP Super Docs: attach a spec to a category and get one draft doc per endpoint.

Get WP Super Docs

Either way you will need Nahnu Code and API Block active. WP Super Docs uses it to render every generated block.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only