Skip to content

Caddy template functions page not up-to-date? maybe still missing #538

Description

@steffenbusch

A couple of months ago, I have added the documentation for the maybe template function in caddyserver/caddy#7388:
https://github.com/caddyserver/caddy/blob/d2172bea61414635c55554b42714af94a3c9cefd/modules/caddyhttp/templates/templates.go#L328

However, visiting the Caddy website documentation for Module http.handlers.templates (https://caddyserver.com/docs/modules/http.handlers.templates), the maybe func is still not present.

There are also at least these two other template funcs not present in the documentation:

If the issue with the missing maybe function is sorted out, I would be pleased to add the two missing funcs via another PR in https://github.com/caddyserver/caddy

Activity

  1. francislavoie commented on May 7, 2026

    @francislavoie
    Member

    Yeah JSON docs are parsed from code and it isn't as automatic as we would like. The code for it is old and buggy and unmaintained (and because it's sloppy it's still closed source, something Matt wrote like 6 years ago). It's due for a rewrite probably with AI 😅

  2. steadytao commented on May 11, 2026

    @steadytao
    Member

    Yeah docs will need to be regenerated with moduledoc. Will propose an automation flow to Matt.

  3. mholt commented on Jun 2, 2026

    @mholt
    Member

    I am working on this, completely revamping the docs backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions