gdtest-sec-navbar-after
Test custom section with navbar_after.
Custom section with navbar_after specified. Section should appear after a specific navbar item. Tests ordering control.
Source files
📁 cookbook/
📄 recipe1.qmd
---
title: Recipe One
---
# Recipe One
The first recipe in the cookbook.
📄 recipe2.qmd
---
title: Recipe Two
---
# Recipe Two
The second recipe in the cookbook.
📁 gdtest_sec_navbar_after/
📄 __init__.py
"""Test package for custom section with navbar_after."""
from .core import prepare, serve
__all__ = ["prepare", "serve"]
📄 core.py
"""Core prepare/serve functions."""
def prepare(ingredient: str) -> dict:
"""Prepare an ingredient for cooking.
Parameters
----------
ingredient : str
The ingredient to prepare.
Returns
-------
dict
A dictionary with the prepared ingredient details.
Examples
--------
>>> prepare("tomato")
{'ingredient': 'tomato', 'status': 'prepared'}
"""
return {"ingredient": ingredient, "status": "prepared"}
def serve(dish: dict) -> str:
"""Serve a prepared dish.
Parameters
----------
dish : dict
A dictionary representing the dish to serve.
Returns
-------
str
A message indicating the dish has been served.
Examples
--------
>>> serve({"name": "pasta"})
'Serving pasta'
"""
return f"Serving {dish.get('name', 'dish')}"
📄 README.md
# gdtest-sec-navbar-after
Test custom section with navbar_after.
📄 great-docs.yml
sections:
- title: Cookbook
dir: cookbook
navbar_after: Reference