#164
gdtest_sec_examples
OK
CONFIG
Custom 'Examples' section via sections config.
Custom 'Examples' section via config sections. examples/ dir with 3 example pages. Should appear as a separate nav section.
Build Mode
● Has great-docs.yml
This package ships a pre-supplied config.
The great-docs init step is skipped and
great-docs build uses the spec-defined configuration directly.
Tests specific config options and their rendered output.
Dimensions
N1
N1Examples sectionsections
Source Files
examples/
advanced-example.qmd
--- title: Advanced Example --- # Advanced Example An advanced example demonstrating complex usage patterns.
basic-example.qmd
--- title: Basic Example --- # Basic Example A simple example showing how to get started.
edge-cases.qmd
--- title: Edge Cases --- # Edge Cases Examples covering edge cases and boundary conditions.
gdtest_sec_examples/
__init__.py
"""Test package for custom Examples section.""" from .core import demo, showcase __all__ = ["demo", "showcase"]
core.py
"""Core demo/showcase functions."""
def demo(x: int) -> int:
"""Run a demo with the given input.
Parameters
----------
x : int
The input value for the demo.
Returns
-------
int
The demo result.
Examples
--------
>>> demo(5)
10
"""
return x * 2
def showcase(items: list) -> str:
"""Showcase a list of items as a formatted string.
Parameters
----------
items : list
The items to showcase.
Returns
-------
str
A formatted string of all items.
Examples
--------
>>> showcase(["a", "b", "c"])
'a, b, c'
"""
return ", ".join(str(i) for i in items)README.md
# gdtest-sec-examples Test custom Examples section.
great-docs.yml
sections:
- title: Examples
dir: examples