caddyserver / caddyserver/website
Caddy template functions page not up-to-date? `maybe` still missing
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:
fileExist-> https://github.com/caddyserver/caddy/blob/d2172bea61414635c55554b42714af94a3c9cefd/modules/caddyhttp/templates/tplcontext.go#L429fileStat-> https://github.com/caddyserver/caddy/blob/d2172bea61414635c55554b42714af94a3c9cefd/modules/caddyhttp/templates/tplcontext.go#L442
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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