nixos/manual/manpages: add description on previewing manpage files (#214833)

nixos/manual/manpages: add description on previewing manpage files

I was a bit lost with the new manpage format and it took me some time to
find the corresponding pull request by @pennae with a very helpful
comment of @alyssais that mentioned this:
https://github.com/NixOS/nixpkgs/pull/213256#issuecomment-1407713215

As @pennae noted, the file path is only a fallback if it cannot be resolved in the man database

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
This commit is contained in:
Michael Lohmann 2023-02-06 00:37:38 +01:00 committed by GitHub
parent ff4ed85523
commit 516a9816a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,8 @@ This is the collection of NixOS manpages, excluding `configuration.nix(5)`.
Man pages are written in [`mdoc(7)` format](https://mandoc.bsd.lv/man/mdoc.7.html) and should be portable between mandoc and groff for rendering (though minor differences may occur, mandoc and groff seem to have slightly different spacing rules.)
For previewing edited files, you can just run `man -l path/to/file.8` and you will see it rendered.
Being written in `mdoc` these manpages use semantic markup. This file provides a guideline on where to apply which of the semantic elements of `mdoc`.
### Command lines and arguments