Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Test commit to preview the man page #21194

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bookwar
Copy link

@bookwar bookwar commented Oct 30, 2024

Testing GitHub presentation of Markdown and Asciidoc for man pages

To generate man page from markdown run:

pandoc --standalone --to man cockpit-desktop.md -o cockpit-desktop.1    

To generate man page from asciidoc run

asciidoctor cockpit-desktop.adoc --doctype manpage -b manpage -o cockpit-desktop-a.1

To view man page run:

man -l cockpit-desktop-a.1

.SH "BUGS"
.sp
Please send bug reports to either the distribution bug tracker or the
.URL "https://github.com/cockpit\-project/cockpit/issues/new" "upstream bug tracker" "."
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the raw output of asciidoctor.

It renders URL correctly in the man markup using .URL keyword.

e.
the path component of Cockpit URLs.
It is highly recommended to only open a particular page
frame (https://cockpit-project.org/guide/latest/embedding.html), not the
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the render of markdown input produced by pandoc.

Url is written as a plain text, thus line breaks can happen in the middle of it.

@@ -0,0 +1,59 @@
% cockpit-desktop(1) | Cockpit Desktop integration
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required by pandoc

@@ -0,0 +1,59 @@
= cockpit-desktop(1)
:doctype: manpage
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the doc-type to use for man pages backend in asciidoctor
https://docs.asciidoctor.org/asciidoctor/latest/manpage-backend/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant