Unverified Commit 516a9816 authored by Michael Lohmann's avatar Michael Lohmann Committed by GitHub
Browse files

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: default avatarpennae <82953136+pennae@users.noreply.github.com>
parent ff4ed855
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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