Links
AI / Agents
gdtest-sec-blog-user-index
Test blog section with user-provided listing index.
Installation
pip install gdtest-sec-blog-user-indexGet Started
- API Reference — Full API documentation
Source files
blog/
first-post/
index.qmd
--- title: First Post author: Alice date: 2024-03-01 categories: [announcements] description: Our very first blog post. image: post-banner.svg --- This is the first post on our blog.  ## Getting Started We're excited to share our work with you.
post-banner.svg
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="60"><rect width="300" height="60" fill="#5cb85c" rx="6"/><text x="150" y="38" text-anchor="middle" fill="white" font-size="18" font-family="sans-serif">First Post</text></svg>
second-post/
index.qmd
--- title: Second Post author: Bob date: 2024-04-15 categories: [updates] description: A follow-up with new features. --- Here's what we've been working on. ## New Features - Improved performance - Better error messages
blog-header.svg
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="80"><rect width="400" height="80" fill="#4a90d9" rx="8"/><text x="200" y="48" text-anchor="middle" fill="white" font-size="24" font-family="sans-serif">Blog</text></svg>
index.qmd
---
title: Blog
listing:
type: table
sort: "date desc"
feed: true
contents:
- "**.qmd"
---

Welcome to our blog.gdtest_sec_blog_user_index/
__init__.py
"""Test package for blog section with user index.""" from .core import publish, draft __all__ = ["publish", "draft"]
core.py
"""Core blog helpers."""
def publish(title: str, body: str) -> dict:
"""Publish a blog post.
Parameters
----------
title : str
The post title.
body : str
The post body.
Returns
-------
dict
The published post record.
Examples
--------
>>> publish("Hello", "World")
{'title': 'Hello', 'body': 'World', 'status': 'published'}
"""
return {"title": title, "body": body, "status": "published"}
def draft(title: str) -> dict:
"""Create a draft post.
Parameters
----------
title : str
The draft title.
Returns
-------
dict
The draft post record.
Examples
--------
>>> draft("WIP")
{'title': 'WIP', 'status': 'draft'}
"""
return {"title": title, "status": "draft"}great-docs.yml
sections:
- title: Blog
dir: blog
type: blog