All of lore.kernel.org
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: Donald Hunter <donald.hunter@gmail.com>
Cc: corbet@lwn.net, linux-doc@vger.kernel.org,
	netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com
Subject: Re: [PATCH] Documentation: Document the Netlink spec
Date: Thu, 9 Nov 2023 10:28:04 -0800	[thread overview]
Message-ID: <ZU0ktGJNbqTwjS3Q@gmail.com> (raw)
In-Reply-To: <m2y1f8mjex.fsf@gmail.com>

On Wed, Nov 08, 2023 at 02:03:34PM +0000, Donald Hunter wrote:
> Breno Leitao <leitao@debian.org> writes:
> 
> > This is a Sphinx extension that parses the Netlink YAML spec files
> > (Documentation/netlink/specs/), and generates a rst file to be
> > displayed into Documentation pages.
> >
> > Create a new Documentation/networking/netlink_spec page, and a sub-page
> > for each Netlink spec that needs to be documented, such as ethtool,
> > devlink, netdev, etc.
> >
> > Create a Sphinx directive extension that reads the YAML spec
> > (located under Documentation/netlink/specs), parses it and returns a RST
> > string that is inserted where the Sphinx directive was called.
> 
> This is great! Looks like I need to fill in some missing docs in the
> specs I have contributed.
> 
> I wonder if the generated .rst content can be adjusted to improve the
> resulting HTML.
> 
> There are a couple of places where paragraph text is indented and I
> don't think it needs to be, e.g. the 'Summary' doc.
> 
> A lot of the .rst content seems to be over-indented which causes
> blockquote tags to be generated in the HTML. That combined with a
> mixture of bullets and definition lists at the same indentation level
> seems to produce HTML with inconsistent indentation.
> 
> I quickly hacked the diff below to see if it would improve the HTML
> rendering. I think the HTML has fewer odd constructs and the indentation
> seems better to my eye. My main aim was to ensure that for a given
> section, each indentation level uses the same construct, whether it be a
> definition list or a bullet list.

Thanks for the diff. That makes total sense and I will integrate it  in
the updated version.

> It would be great to generate links from e.g. an attribute-set to its
> definition.
> 
> Did you intentionally leave out the protocol values?

Yes. This could be done in a follow up patch if necessary.
> 
> It looks like parse_entries will need to be extended to include the type
> information for struct members, similar to how attribute sets are shown.
> I'd be happy to look at this as a follow up patch, unless you get there
> first. 

Awesome. That would be appreciate.

  parent reply	other threads:[~2023-11-09 18:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 13:56 [PATCH] Documentation: Document the Netlink spec Breno Leitao
2023-11-06 22:51 ` Jakub Kicinski
2023-11-08 14:03 ` Donald Hunter
2023-11-08 14:08   ` Donald Hunter
2023-11-09 18:28   ` Breno Leitao [this message]
2023-11-08 20:27 ` Jonathan Corbet
2023-11-09  1:43   ` Jakub Kicinski
2023-11-10  9:23     ` Donald Hunter
2023-11-09 11:22   ` Donald Hunter
2023-11-09 14:12     ` Jonathan Corbet
2023-11-09 15:16       ` Jakub Kicinski
2023-11-09 15:20       ` Breno Leitao

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=ZU0ktGJNbqTwjS3Q@gmail.com \
    --to=leitao@debian.org \
    --cc=corbet@lwn.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.