← GDG /

#166 gdtest_sec_recipes

#166 gdtest_sec_recipes OK CONFIG
Custom 'Recipes' section via sections config.
Custom 'Recipes' section. recipes/ dir with short how-to 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

N3
N3Recipes sectionsections

Source Files

๐Ÿ“ gdtest_sec_recipes/
๐Ÿ“„ __init__.py
"""Test package for custom Recipes section."""

from .core import cook, serve

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


def cook(recipe: str) -> dict:
    """Cook a dish from the given recipe.

    Parameters
    ----------
    recipe : str
        The name of the recipe to cook.

    Returns
    -------
    dict
        A dictionary describing the cooked dish.

    Examples
    --------
    >>> cook("pasta")
    {'dish': 'pasta', 'status': 'cooked'}
    """
    return {"dish": recipe, "status": "cooked"}


def serve(dish: dict) -> str:
    """Serve a cooked dish.

    Parameters
    ----------
    dish : dict
        A dictionary describing the dish to serve.

    Returns
    -------
    str
        A message confirming the dish was served.

    Examples
    --------
    >>> serve({"dish": "pasta", "status": "cooked"})
    'Serving pasta'
    """
    return f"Serving {dish.get('dish', 'unknown')}"
๐Ÿ“ recipes/
๐Ÿ“„ data-pipeline.qmd
---
title: Data Pipeline
---

# Data Pipeline

A recipe for building a data processing pipeline.
๐Ÿ“„ quick-setup.qmd
---
title: Quick Setup
---

# Quick Setup

A recipe for quickly setting up the project.
๐Ÿ“„ README.md
# gdtest-sec-recipes

Test custom Recipes section.
๐Ÿ“„ great-docs.yml
sections:
  - title: Recipes
    dir: recipes