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
doc/gnome: Port to Markdown #105284
doc/gnome: Port to Markdown #105284
Conversation
c9e55cd
to
49e17a8
Compare
aaf60bd
to
341e0ad
Compare
c182bc4
to
7c052bf
Compare
7c052bf
to
0dbdf90
Compare
Rebased onto staging-next. Can be tested without rebuilding the world now. |
0dbdf90
to
e7bac8f
Compare
I tried building the manual with this PR's changeset and it failed to apply all the patches:
|
e7bac8f
to
31117bc
Compare
Yeah, the two pandoc patches change neighbouring regions and line-based patches cannot handle that. I have rebased the second one onto the first one now that jgm/pandoc#6923 has been merged. |
31117bc
to
b2e4469
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff of the generated HTML looks acceptable to me now. It entails the following:
- Semantic literals have been replaced by non-specific backtick code element.
- Inline anchors are now placed next to the span they are attached to, instead of adding
id
attribute to the span itself. I might open a pandoc PR to correct this but it works fine as is. - Anchors for paragraphs/list items are now inline anchors at their beginning, since Pandoc’s Markdown currently does not allow attaching
id
s to paragraphs or list items. - When building EPUB, there is the following warning
Xref is only supported to listitems in an orderedlist: ssec-gnome-hooks-gdk-pixbuf
. - The definition list has been replaced by headings as described above.
Actually, the EPUB seems to produce the following incorrect link |
Actually, it is not even limited to EPUB. Fixed that now as well. |
Until we update pandoc, these are necessary for faithful Markdown to Docbook conversion in the manual. The following features are necessary for many pages, in particular the GNOME platform docs: * Anchors should use `xml:id` attribute, as mandated by Docbook 5. * Admonitions should be supported, including titles. Additionally, xmlns should be set correctly for root element.
The sectn and ulink hacks are not necessary since pandoc has been defaulting to Docbook 5 for a long time. With the pandoc patches, we can get rid of id→xml:id replacement and xmlns hacks as well.
DocBook does not support creating labels for unordered list items so we need to add a link label ourselves.
7094550
to
6224887
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code, rendering, and diff with master manual all look good.
Adding patches to the regular pandoc derivation is kind of a bit of a departure from our regular policies, but those patches are in master, and we should be able to clean that up in a bit, and it seems nice if people want to do stuff with the manual to not have to know some special argument to pass, so I'm going to merge it.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Closes: #104965
variablelist
entries to separate sectionsAdmonitions do not seem to work using the fenced div syntax (even though pandoc uses them in docbook→markdown conversion), will use docbook for now.Fixed in pandoc.