-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Import manual pages from shards #476
Comments
I forgot to include a link to the code: https://github.com/straight-shoota/crystal-book/tree/feature/import-manuals |
I proposed some changes to the man page format in crystal-lang/shards#488 The major issue left now is that definition list formats are lost in the translation process. The term and definition blocks are converted to inline text separated by a In the mean time I was also made aware of https://github.com/postmodern/kramdown-man by @postmodern which offers a similar transformation process from markdown to roff. This could be a better alternative than the current asciidoc setup because we wouldn't need to cross-transform from asciidoc to markdown for mkdocs. |
Somewhat relevant, @crimson-knight asked for a more prominent place to explain |
@straight-shoota I found downdoc to convert from asciidoc to markdown in one step. It may have sufficient support for most features? |
Since crystal-lang/shards#262 the manpages
shards.1
andshard.yml.5
are generated from asciidoc source.As a benefit it allows to transform the content to other formats. We can import it into this repo to replace the The shards command page - which is effectively just an HTML version of the manpage. Mkdocs doesn't support asciidoc directly, but it can be convert to markdown via HTML or docbook.
pandoc
can't read asciidoc, so adoc->md is a two-step process.The result of importing the markdown transformation isn't that great. It's okay and gets the job done. The important benefit is it avoids maintaing the same content twice.
But unfortunately it doesn't integrate nicely on terms of UX. It's essentially just a manpage and formatted like a man page. Some formatting can be automatically fixed, but others is hard to do.
I have some hope in Pandoc's filter system. It's quite powerful and allows custom modifications to the transformation process. It's still a bit of a task to find out how exactly to do things.
But it looks like it could help improve many of the smaller problems.
The text was updated successfully, but these errors were encountered: