#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.
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