caddyserver / caddyserver/website

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

Open
#538 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
227
Forks
213
Avg merge
3h 52m
Merged PRs (30d)
1

Description

A couple of months ago, I have added the documentation for the maybe template function in https://github.com/caddyserver/caddy/pull/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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the http.handlers.templates documentation page, then compare it with modules/caddyhttp/templates/templates.go around line 328 and tplcontext.go around lines 429 and 442. Trace how these template functions are surfaced in the website documentation and update the relevant documentation source so maybe, fileExist, and fileStat are represented; done means the published page lists all three.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, html
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.