Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: new Sphinx code-sample extension should allow to generate a nice toc/index of all samples #62453

Closed
kartben opened this issue Sep 8, 2023 · 0 comments
Assignees
Labels
area: Documentation Enhancement Changes/Updates/Additions to existing features

Comments

@kartben
Copy link
Collaborator

kartben commented Sep 8, 2023

Is your enhancement proposal related to a problem? Please describe.

Now that code samples have the ability to expose a nice, short, description, it should be used to create a more useful and browseable list of code samples. This will also allow to make the list alphabetically sorted, as right now the somewhat flat, and very unordered, giant list of samples we have is not really eye-pleasing :)

Describe the solution you'd like

add something like a .. zephyr:code-sample-index: directive to spit out the full list of code samples (names + short description). This should ideally behave like toctree and only show the samples that are "under" the current document.

Describe alternatives you've considered

Don't change anything.

Additional context
Add any other context or graphics (drag-and-drop an image) about the feature request here.

@kartben kartben added the Enhancement Changes/Updates/Additions to existing features label Sep 8, 2023
@kartben kartben self-assigned this Sep 8, 2023
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 13, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 16, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 17, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/zephyr that referenced this issue Sep 18, 2024
This commit adds support for categorizing code samples in the
documentation.

It introduces two new directives:

- `zephyr:code-sample-category::` to create a category and associated
  brief description, that implicitly acts as a toctree too.

- `zephyr:code-sample-listing::` to allow dumping a list of samples
  corresponding to a category anywhere in the documentation.

Fixes zephyrproject-rtos#62453.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Documentation Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

2 participants