Closed afaur closed 4 years ago
Definitely would be useful, but a maintenance burden, as you said.
I think a more "cost effective" approach with roughly similar goals would be:
deno doc
output and mention it in various places. Currently, deno doc https://deno.land/x/pogo/main.ts
doesn't output anything. To fix this, I believe we need to export our classes as named exports and add doc comments to them.lib/types.ts
in main.ts
to make them easier to discover and access?.ts
files but I've used js
for the code fences in the docs? Perhaps the languages have to exactly match for GitHub to do its magic.Opened (https://github.com/sholladay/pogo/pull/45) to work on items 1 and 2. Will take a look at 3 soon.
Looks like my theory about 3
was correct. I did a little experiment in PR #48 and changed a few of the code fences in the documentation to use "ts" instead of "js". Now the code in those examples is clickable, presumably because it matches the language of the source code.
For example, this one: https://github.com/sholladay/pogo/tree/001d8099157d3a54b542712c2371aab1d768c595#using-hdirectory-recommended
I added TSDoc comments to further improve the deno doc
output in commit https://github.com/sholladay/pogo/commit/8fa9c0c77be12cffc8a52cc8f51ad50c13366ab4. I also updated the language of the code examples in the documentation to enable GitHub's link-to-definition feature in commit https://github.com/sholladay/pogo/commit/4d24945730f5c4892bed90103be625e6189dd5d3.
With your PR, plus those changes, I think we can probably close this issue. What do you think?
I'm open to any other suggestions for improving the documentation. The next logical step I can think of would be to have a website for the docs.
Thanks, good idea!
Done: https://github.com/sholladay/pogo/commit/fef521c0b065bb5da627d4e40780a0187312b441
Pogo v0.5.0 has been published with these changes. Great work, @afaur!
Might be helpful to link out to the code in readme examples. Links would use a
tag
orsha
to avoid taking the user to the latest changes.server.router.get(String, RouteHandler<ServerRequest, Toolkit>)