Links
AI / Agents
gdtest-sec-dir-titles
Test dir_titles and numeric prefix stripping in section sidebars.
Custom section with dir_titles overrides and numeric-prefix subdirectories (01-getting-started/, 02-results-and-reporting/, 03-advanced-topics/). Tests that numeric prefixes are stripped from sidebar section headings and that dir_titles mapping overrides the auto-generated title (e.g., ‘Results/Reporting’ instead of ‘Results And Reporting’).
Source files
demos/
01-getting-started/
first-steps.qmd
--- title: First Steps description: Your first steps with the package. --- # First Steps Start by importing the package and running a basic demo.
installation.qmd
--- title: Installation description: How to install the package. --- # Installation Install with pip: ```bash pip install gdtest-sec-dir-titles ```
02-results-and-reporting/
basic-report.qmd
--- title: Basic Report description: Generate a basic results report. --- # Basic Report Use `show_results()` to display output.
custom-output.qmd
--- title: Custom Output description: Customize the output format. --- # Custom Output Override the default formatting.
03-advanced-topics/
tips-and-tricks.qmd
--- title: Tips and Tricks description: Advanced tips for power users. --- # Tips and Tricks Explore advanced patterns and optimizations.
gdtest_sec_dir_titles/
__init__.py
"""Test package for dir_titles in section sidebars.""" from .core import run_demo, show_results __all__ = ["run_demo", "show_results"]
core.py
"""Core demo functions."""
def run_demo(name: str) -> str:
"""Run a demo by name.
Parameters
----------
name : str
The name of the demo to run.
Returns
-------
str
A summary of the demo run.
Examples
--------
>>> run_demo("starter")
'Running demo: starter'
"""
return f"Running demo: {name}"
def show_results(data: list) -> str:
"""Show results from a demo run.
Parameters
----------
data : list
A list of result values.
Returns
-------
str
Formatted results string.
Examples
--------
>>> show_results([1, 2, 3])
'Results: [1, 2, 3]'
"""
return f"Results: {data}"README.md
# gdtest-sec-dir-titles Test dir_titles and numeric prefix stripping in section sidebars.
great-docs.yml
sections:
- title: Demos
dir: demos
index: true
dir_titles:
getting-started: Getting Started
results-and-reporting: Results/Reporting
advanced-topics: Advanced Topics