nodejs / api-docs-tooling

Node.js's tooling for API generation
https://nodejs.org/api
MIT License
5 stars 5 forks source link

feat: add `man-page` generator #125

Closed RedYetiDev closed 1 month ago

RedYetiDev commented 1 month ago

Description

This PR adds support for the generation of the node.1 Manfile automatically based on the cli.md input.

Validation

$ node bin/cli.mjs -t man-page -i doc/api/cli.md -o doc/node.1

The above command should provide a valid manfile (runnable with man ./doc/node.1).

Related Issues

https://github.com/nodejs/node/pull/55268

Check List

RedYetiDev commented 1 month ago

I've made (most of) the requested changes. Thanks for the reviews!

RedYetiDev commented 1 month ago

If your curious what this looks like, an HTML-compiled version is available at https://redyeti.dev/hostables/nodejs/1729108143-new-man-page.html.

(Converted using mman -Thtml).

ovflowd commented 1 month ago

@AugustinMauroy, why did you merge this? It got approved, but I was waiting for @RedYetiDev to push so I could give a final look 😅

ovflowd commented 1 month ago

Also, @AugustinMauroy, this repository is outside of the Node.js Website team scope. It is more in the scope of the Web Infra team + Documentation team, so I'd avoid merging PRs -- but also my bad here. I gave approval, but my comment was a bit explicit that this was not ready yet.

ovflowd commented 1 month ago

@RedYetiDev I finished reviewing the latest change :)

Would you mind making a follow-up PR 🙈?