Skip to content

Commit 06fe1e1

Browse files
committed
writing to style guide
1 parent b86435a commit 06fe1e1

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

docs/sphinx/source/contributing/style_guide.rst

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,16 @@ For more details, see the sphinx-gallery
354354
Controlling Example Order
355355
~~~~~~~~~~~~~~~~~~~~~~~~~
356356

357-
Examples within a subsection are ordered alphabetically by filename.
358-
To control their position explicitly, prefix filenames with numbers
359-
(e.g., ``01_``, ``02_``).
360-
361-
For more advanced ordering options, see the sphinx-gallery
362-
`documentation <https://sphinx-gallery.github.io/stable/configuration.html#own-sort-keys>`_.
363-
364-
357+
Examples within a subsection are ordered according to the
358+
``within_subsection_order`` setting defined in ``conf.py``.
359+
360+
By default, Sphinx-Gallery applies its built-in sorting behavior.
361+
To explicitly control the order of examples, configure
362+
``within_subsection_order`` in ``docs/sphinx/source/conf.py``.
363+
This may be set to one of Sphinx-Gallery's built-in sort keys
364+
(e.g., ``FileNameSortKey`` or ``ExampleTitleSortKey``),
365+
or to a custom callable for fine-grained control.
366+
367+
See the Sphinx-Gallery documentation for details:
368+
`Gallery examples
369+
<https://sphinx-gallery.github.io/stable/configuration.html#sorting-gallery-examples>`_.

0 commit comments

Comments
 (0)