All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] docs: ReSTify table of contents in core.rst
@ 2017-08-23 20:42 Josh Holland
  2017-08-24  6:45 ` Jani Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Josh Holland @ 2017-08-23 20:42 UTC (permalink / raw)
  To: keyrings

Sphinx will now generate the table of contents automatically, which
avoids having the ToC getting out of sync with the rest of the document.

Signed-off-by: Josh Holland <anowlcalledjosh@gmail.com>
---
 Documentation/security/keys/core.rst | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst
index 312f981fa..1266eeae4 100644
--- a/Documentation/security/keys/core.rst
+++ b/Documentation/security/keys/core.rst
@@ -16,17 +16,7 @@ The key service can be configured on by enabling:
 
 This document has the following sections:
 
-	- Key overview
-	- Key service overview
-	- Key access permissions
-	- SELinux support
-	- New procfs files
-	- Userspace system call interface
-	- Kernel services
-	- Notes on accessing payload contents
-	- Defining a key type
-	- Request-key callback service
-	- Garbage collection
+.. contents:: :local:
 
 
 Key Overview
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] docs: ReSTify table of contents in core.rst
  2017-08-23 20:42 [PATCH v2] docs: ReSTify table of contents in core.rst Josh Holland
@ 2017-08-24  6:45 ` Jani Nikula
  2017-08-24 22:18 ` Josh Holland
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2017-08-24  6:45 UTC (permalink / raw)
  To: keyrings

On Wed, 23 Aug 2017, Josh Holland <anowlcalledjosh@gmail.com> wrote:
> Sphinx will now generate the table of contents automatically, which
> avoids having the ToC getting out of sync with the rest of the document.
>
> Signed-off-by: Josh Holland <anowlcalledjosh@gmail.com>
> ---
>  Documentation/security/keys/core.rst | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst
> index 312f981fa..1266eeae4 100644
> --- a/Documentation/security/keys/core.rst
> +++ b/Documentation/security/keys/core.rst
> @@ -16,17 +16,7 @@ The key service can be configured on by enabling:
>  
>  This document has the following sections:
>  
> -	- Key overview
> -	- Key service overview
> -	- Key access permissions
> -	- SELinux support
> -	- New procfs files
> -	- Userspace system call interface
> -	- Kernel services
> -	- Notes on accessing payload contents
> -	- Defining a key type
> -	- Request-key callback service
> -	- Garbage collection
> +.. contents:: :local:

Did you actually try this and look at the 'make htmldocs' results?

I know I tried what I suggested:

.. contents::
   :local:

http://docutils.sourceforge.net/docs/ref/rst/directives.html#table-of-contents

BR,
Jani.

>  
>  
>  Key Overview

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] docs: ReSTify table of contents in core.rst
  2017-08-23 20:42 [PATCH v2] docs: ReSTify table of contents in core.rst Josh Holland
  2017-08-24  6:45 ` Jani Nikula
@ 2017-08-24 22:18 ` Josh Holland
  2017-08-25  6:49 ` Jani Nikula
  2017-08-30 21:33 ` Jonathan Corbet
  3 siblings, 0 replies; 5+ messages in thread
From: Josh Holland @ 2017-08-24 22:18 UTC (permalink / raw)
  To: keyrings

On 2017-08-24, Jani Nikula wrote:
> On Wed, 23 Aug 2017, Josh Holland <anowlcalledjosh@gmail.com> wrote:
> > Sphinx will now generate the table of contents automatically, which
> > avoids having the ToC getting out of sync with the rest of the document.
> >
> > Signed-off-by: Josh Holland <anowlcalledjosh@gmail.com>
> > ---
> >  Documentation/security/keys/core.rst | 12 +-----------
> >  1 file changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst
> > index 312f981fa..1266eeae4 100644
> > --- a/Documentation/security/keys/core.rst
> > +++ b/Documentation/security/keys/core.rst
> > @@ -16,17 +16,7 @@ The key service can be configured on by enabling:
> >  
> >  This document has the following sections:
> >  
> > -	- Key overview
> > -	- Key service overview
> > -	- Key access permissions
> > -	- SELinux support
> > -	- New procfs files
> > -	- Userspace system call interface
> > -	- Kernel services
> > -	- Notes on accessing payload contents
> > -	- Defining a key type
> > -	- Request-key callback service
> > -	- Garbage collection
> > +.. contents:: :local:
> 
> Did you actually try this and look at the 'make htmldocs' results?
> 
> I know I tried what I suggested:
> 
> .. contents::
>    :local:
> 
> http://docutils.sourceforge.net/docs/ref/rst/directives.html#table-of-contents

Yep, I tried with sphinx_rtd_theme and it looks fine.  The documentation
suggests that the two forms are equivalent:

> If the default title is to be used, the options field list may begin
> on the same line as the directive marker:
>
>   .. contents:: :depth: 2

I went for the single-line version purely because that's what's used in
Documentation/security/credentials.rst (one of two existing users of
"contents::"), and I figured I may as well be consistent within the
security docs.  I have no particular preference either way.

Thanks,

Josh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] docs: ReSTify table of contents in core.rst
  2017-08-23 20:42 [PATCH v2] docs: ReSTify table of contents in core.rst Josh Holland
  2017-08-24  6:45 ` Jani Nikula
  2017-08-24 22:18 ` Josh Holland
@ 2017-08-25  6:49 ` Jani Nikula
  2017-08-30 21:33 ` Jonathan Corbet
  3 siblings, 0 replies; 5+ messages in thread
From: Jani Nikula @ 2017-08-25  6:49 UTC (permalink / raw)
  To: keyrings

On Fri, 25 Aug 2017, Josh Holland <anowlcalledjosh@gmail.com> wrote:
> On 2017-08-24, Jani Nikula wrote:
>> On Wed, 23 Aug 2017, Josh Holland <anowlcalledjosh@gmail.com> wrote:
>> > Sphinx will now generate the table of contents automatically, which
>> > avoids having the ToC getting out of sync with the rest of the document.
>> >
>> > Signed-off-by: Josh Holland <anowlcalledjosh@gmail.com>
>> > ---
>> >  Documentation/security/keys/core.rst | 12 +-----------
>> >  1 file changed, 1 insertion(+), 11 deletions(-)
>> >
>> > diff --git a/Documentation/security/keys/core.rst b/Documentation/security/keys/core.rst
>> > index 312f981fa..1266eeae4 100644
>> > --- a/Documentation/security/keys/core.rst
>> > +++ b/Documentation/security/keys/core.rst
>> > @@ -16,17 +16,7 @@ The key service can be configured on by enabling:
>> >  
>> >  This document has the following sections:
>> >  
>> > -	- Key overview
>> > -	- Key service overview
>> > -	- Key access permissions
>> > -	- SELinux support
>> > -	- New procfs files
>> > -	- Userspace system call interface
>> > -	- Kernel services
>> > -	- Notes on accessing payload contents
>> > -	- Defining a key type
>> > -	- Request-key callback service
>> > -	- Garbage collection
>> > +.. contents:: :local:
>> 
>> Did you actually try this and look at the 'make htmldocs' results?
>> 
>> I know I tried what I suggested:
>> 
>> .. contents::
>>    :local:
>> 
>> http://docutils.sourceforge.net/docs/ref/rst/directives.html#table-of-contents
>
> Yep, I tried with sphinx_rtd_theme and it looks fine.  The documentation
> suggests that the two forms are equivalent:
>
>> If the default title is to be used, the options field list may begin
>> on the same line as the directive marker:
>>
>>   .. contents:: :depth: 2
>
> I went for the single-line version purely because that's what's used in
> Documentation/security/credentials.rst (one of two existing users of
> "contents::"), and I figured I may as well be consistent within the
> security docs.  I have no particular preference either way.

TIL. I'm fine either way. Sorry for the noise.

BR,
Jani.


>
> Thanks,
>
> Josh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-doc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] docs: ReSTify table of contents in core.rst
  2017-08-23 20:42 [PATCH v2] docs: ReSTify table of contents in core.rst Josh Holland
                   ` (2 preceding siblings ...)
  2017-08-25  6:49 ` Jani Nikula
@ 2017-08-30 21:33 ` Jonathan Corbet
  3 siblings, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2017-08-30 21:33 UTC (permalink / raw)
  To: keyrings

On Wed, 23 Aug 2017 21:42:32 +0100
Josh Holland <anowlcalledjosh@gmail.com> wrote:

> Sphinx will now generate the table of contents automatically, which
> avoids having the ToC getting out of sync with the rest of the document.

I've (finally) applied this, thanks.

jon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-30 21:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-23 20:42 [PATCH v2] docs: ReSTify table of contents in core.rst Josh Holland
2017-08-24  6:45 ` Jani Nikula
2017-08-24 22:18 ` Josh Holland
2017-08-25  6:49 ` Jani Nikula
2017-08-30 21:33 ` Jonathan Corbet

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.