← GDG /

#167 gdtest_sec_blog

#167 gdtest_sec_blog OK CONFIG
Blog section using Quarto's native listing directive.
Blog section using Quarto's native listing directive. blog/ dir with posts in subdirectories. Uses type: blog for auto-listing.
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

N4
N4Blog sectionsections

Source Files

๐Ÿ“ blog/
๐Ÿ“ february-update/
๐Ÿ“„ index.qmd
---
title: February Update
author: John Doe
date: 2024-02-20
categories: [updates]
description: An update on the progress made in February 2024.
---

An update on the progress made in February 2024.

## Highlights

- Improved performance by 30%
- Added support for new file formats
- Fixed several reported bugs

## Community Contributions

Thanks to everyone who contributed this month!
๐Ÿ“ introducing-our-project/
๐Ÿ“„ index.qmd
---
title: Introducing Our Project
author: Jane Smith
date: 2024-01-15
categories: [announcements, getting-started]
description: A blog post introducing the project and its goals.
---

A blog post introducing the project and its goals.

We're excited to announce the launch of this project. Here's what you need to know.

## Why We Built This

We saw a need for better tooling in this space and decided to build something that addresses common pain points.

## What's Next

Stay tuned for updates as we continue to develop new features.
๐Ÿ“ v0.2-release/
๐Ÿ“„ index.qmd
---
title: "Version 0.2 Release Notes"
author: Jane Smith
date: 2024-03-10
categories: [releases]
description: Release notes for version 0.2 with new features.
---

We're happy to announce the v0.2 release!

## New Features

- Blog support via Quarto's listing directive
- Improved dark mode styling
- Better section card colors

## Breaking Changes

None in this release.
๐Ÿ“ gdtest_sec_blog/
๐Ÿ“„ __init__.py
"""Test package for blog section."""

from .core import archive, post

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


def post(title: str, content: str) -> dict:
    """Create a new blog post.

    Parameters
    ----------
    title : str
        The title of the blog post.
    content : str
        The content of the blog post.

    Returns
    -------
    dict
        A dictionary representing the created post.

    Examples
    --------
    >>> post("Hello", "World")
    {'title': 'Hello', 'content': 'World'}
    """
    return {"title": title, "content": content}


def archive(year: int) -> list:
    """Retrieve archived posts for a given year.

    Parameters
    ----------
    year : int
        The year to retrieve posts from.

    Returns
    -------
    list
        A list of archived posts for the given year.

    Examples
    --------
    >>> archive(2024)
    []
    """
    return []
๐Ÿ“„ README.md
# gdtest-sec-blog

Test blog section using Quarto listing.
๐Ÿ“„ great-docs.yml
sections:
  - title: Blog
    dir: blog
    type: blog