Skip to contentSkip to conversation

docs: ReSTify table of contents in core.rst

PATCH In review Josh Holland 3 participants 5 messages Aug 23, 2017 – Aug 30, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 docs: ReSTify table of contents in core.rst

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

---
 Documentation/security/keys/core.rst | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
Documentation/security/keys/core.rst +1 -11
index 312f981fa..1266eeae4 100644
@@ -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
Signature · 1 line
2.14.1
#1 lore raw
Quoted 18 lines · Josh Holland

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

---
 Documentation/security/keys/core.rst | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
Documentation/security/keys/core.rst +0 -2
index 312f981fa..1266eeae4 100644
@@ -16,17 +16,7 @@ The key service can be configured on by enabling:
 
 This document has the following sections:
 
-	- Key overview
-	- Key service overview

Documentation/security/keys/core.rst The key service can be configured on by enabling: · line 19

Quoted 10 lines
Documentation/security/keys/core.rst +1 -9
-	- 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.

Quoted 3 lines
Documentation/security/keys/core.rst +0 -0
 Key Overview
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
#2 lore raw
In reply to Josh Holland
Quoted 32 lines · Jani Nikula
Quoted 18 lines · Josh Holland

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

---
 Documentation/security/keys/core.rst | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
Documentation/security/keys/core.rst +0 -2
index 312f981fa..1266eeae4 100644
@@ -16,17 +16,7 @@ The key service can be configured on by enabling:
 
 This document has the following sections:
 
-	- Key overview
-	- Key service overview

Documentation/security/keys/core.rst The key service can be configured on by enabling: · line 19

Quoted 10 lines
Documentation/security/keys/core.rst +1 -9
-	- 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?

Quoted 6 lines

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:

Quoted 4 lines

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

#3 lore raw
In reply to Josh Holland
Quoted 46 lines · Josh Holland
Quoted 32 lines · Jani Nikula
Quoted 18 lines · Josh Holland

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

---
 Documentation/security/keys/core.rst | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
Documentation/security/keys/core.rst +0 -2
index 312f981fa..1266eeae4 100644
@@ -16,17 +16,7 @@ The key service can be configured on by enabling:
 
 This document has the following sections:
 
-	- Key overview
-	- Key service overview

Documentation/security/keys/core.rst The key service can be configured on by enabling: · line 19

Quoted 10 lines
Documentation/security/keys/core.rst +1 -9
-	- 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?

Quoted 6 lines

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:

Quoted 3 lines

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

Quoted 6 lines
Quoted 1 line

.. 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.

Quoted 8 lines

Thanks,

Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
maintainer
#4 lore raw
In reply to Josh Holland
Quoted 2 lines · On Wed, 23 Aug 2017 21:42:32 +0100 Josh Holland <[email protected]>…

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