← GDG /

#169 gdtest_sec_multi

#169 gdtest_sec_multi OK CONFIG
Multiple custom sections: Examples, Tutorials, and Recipes.
Multiple custom sections: Examples + Tutorials + Recipes. Three different section dirs, all configured via sections list. All should appear as separate nav sections.
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

N6
N6Multiple sectionssections

Source Files

๐Ÿ“ examples/
๐Ÿ“„ demo.qmd
---
title: Demo Example
---

# Demo Example

A demonstration example for the multi-section package.
๐Ÿ“ gdtest_sec_multi/
๐Ÿ“„ __init__.py
"""Test package for multiple custom sections."""

from .core import combine, multi_demo

__all__ = ["combine", "multi_demo"]
๐Ÿ“„ core.py
"""Core multi_demo/combine functions."""


def multi_demo(x: int) -> int:
    """Run a multi-section demo with the given input.

    Parameters
    ----------
    x : int
        The input value for the demo.

    Returns
    -------
    int
        The demo result doubled.

    Examples
    --------
    >>> multi_demo(5)
    10
    """
    return x * 2


def combine(a: str, b: str) -> str:
    """Combine two strings with a separator.

    Parameters
    ----------
    a : str
        The first string.
    b : str
        The second string.

    Returns
    -------
    str
        The combined string.

    Examples
    --------
    >>> combine("hello", "world")
    'hello-world'
    """
    return f"{a}-{b}"
๐Ÿ“ recipes/
๐Ÿ“„ quick.qmd
---
title: Quick Recipe
---

# Quick Recipe

A quick recipe for common tasks.
๐Ÿ“ tutorials/
๐Ÿ“„ basics.qmd
---
title: Basics Tutorial
---

# Basics Tutorial

A tutorial covering the basic concepts.
๐Ÿ“„ README.md
# gdtest-sec-multi

Test multiple custom sections.
๐Ÿ“„ great-docs.yml
sections:
  - title: Examples
    dir: examples
  - title: Tutorials
    dir: tutorials
  - title: Recipes
    dir: recipes