← GDG /

#164 gdtest_sec_examples

#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.
View Site → Build Log ๐Ÿงช Test Coverage

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