From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"tiwai@suse.de" <tiwai@suse.de>
Subject: Re: [PATCH ndctl v2 2/3] Documentation: Add the support for asciidoctor
Date: Mon, 23 Apr 2018 21:46:28 +0000 [thread overview]
Message-ID: <1524519985.20736.2.camel@intel.com> (raw)
In-Reply-To: <20180419151120.11041-3-tiwai@suse.de>
On Thu, 2018-04-19 at 17:11 +0200, Takashi Iwai wrote:
> This patch adds the support for asciidoctor to be used for generating
> documents instead of asciidoc. It's enabled via --enable-asciidoctor
> configure option while asciidoc is used still as default.
>
> In addition to the configure option, a few other changes were needed:
> * some asciidoc.conf python stuff has to be replaced with asciidoctor
> ruby extension; copied mostly from git
> * asciidoctor requires slightly different options
> * the man pages are generated directly via asciidoctor without xmlto
> processing; less package dependency
>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> Documentation/asciidoctor-extensions.rb.in | 28
> ++++++++++++++++++++++++++++
> Documentation/daxctl/Makefile.am | 28
> ++++++++++++++++++++++++++--
> Documentation/ndctl/Makefile.am | 28
> ++++++++++++++++++++++++++--
> configure.ac | 17 +++++++++++++++--
> 4 files changed, 95 insertions(+), 6 deletions(-)
> create mode 100644 Documentation/asciidoctor-extensions.rb.in
>
> diff --git a/Documentation/asciidoctor-extensions.rb.in
> b/Documentation/asciidoctor-extensions.rb.in
> new file mode 100644
> index 000000000000..ebdd665f1fb9
> --- /dev/null
> +++ b/Documentation/asciidoctor-extensions.rb.in
> @@ -0,0 +1,28 @@
> +require 'asciidoctor'
> +require 'asciidoctor/extensions'
> +
> +module @Utility@
> + module Documentation
> + class Link@Utility@Processor <
> Asciidoctor::Extensions::InlineMacroProcessor
> + use_dsl
> +
> + named :chrome
> +
> + def process(parent, target, attrs)
> + if parent.document.basebackend? 'html'
> + prefix = parent.document.attr('@utility@-relative-html-
> prefix')
> + %(<a
> href="#{prefix}#{target}.html">#{target}(#{attrs[1]})</a>\n)
> + elsif parent.document.basebackend? 'docbook'
> + "<citerefentry>\n" \
> + "<refentrytitle>#{target}</refentrytitle>" \
> + "<manvolnum>#{attrs[1]}</manvolnum>\n" \
> + "</citerefentry>\n"
> + end
> + end
> + end
> + end
> +end
> +
> +Asciidoctor::Extensions.register do
> + inline_macro @Utility@::Documentation::Link@Utility@Processor, :link@u
> tility@
> +end
Hi Takashi,
It looks like this extension should be doing the right thing for the
'linkndctl' macros, but for some reason it doesn't seem to be working for
me. In the generated man pages:
SEE ALSO
linkndctl:ndctl-zero-labels[1], linkndctl:ndctl-init-labels[1]... etc.
Thanks,
-Vishal
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
next prev parent reply other threads:[~2018-04-23 21:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 15:11 [PATCH ndctl v2 0/3] Documentation: add asciidoctor support Takashi Iwai
2018-04-19 15:11 ` [PATCH ndctl v2 1/3] Documentation: fix title and section markers Takashi Iwai
2018-04-19 15:11 ` [PATCH ndctl v2 2/3] Documentation: Add the support for asciidoctor Takashi Iwai
2018-04-23 21:46 ` Verma, Vishal L [this message]
2018-04-24 10:13 ` Takashi Iwai
2018-04-19 15:11 ` [PATCH ndctl v2 3/3] Documentation: add asciidoctor-extensions.rb to .gitignore Takashi Iwai
2018-04-19 15:12 ` [PATCH ndctl v2 0/3] Documentation: add asciidoctor support Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1524519985.20736.2.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=linux-nvdimm@lists.01.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox