← GDG /

#168 gdtest_sec_faq

#168 gdtest_sec_faq OK CONFIG
Custom 'FAQ' section via sections config.
Custom 'FAQ' section. faq/ dir with question-based 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

N5
N5FAQ sectionsections

Source Files

๐Ÿ“ faq/
๐Ÿ“„ configuration.qmd
---
title: Configuration FAQ
---

# Configuration FAQ

Frequently asked questions about configuring the package.
๐Ÿ“„ installation.qmd
---
title: Installation FAQ
---

# Installation FAQ

Frequently asked questions about installing the package.
๐Ÿ“„ troubleshooting.qmd
---
title: Troubleshooting FAQ
---

# Troubleshooting FAQ

Frequently asked questions about troubleshooting common issues.
๐Ÿ“ gdtest_sec_faq/
๐Ÿ“„ __init__.py
"""Test package for custom FAQ section."""

from .core import answer, ask

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


def ask(question: str) -> str:
    """Ask a question and get a response.

    Parameters
    ----------
    question : str
        The question to ask.

    Returns
    -------
    str
        A response to the question.

    Examples
    --------
    >>> ask("How do I install?")
    'See the installation guide.'
    """
    return "See the installation guide."


def answer(question_id: int) -> str:
    """Retrieve the answer for a specific question by ID.

    Parameters
    ----------
    question_id : int
        The numeric ID of the question.

    Returns
    -------
    str
        The answer text for the given question ID.

    Examples
    --------
    >>> answer(1)
    'Use pip install to get started.'
    """
    return "Use pip install to get started."
๐Ÿ“„ README.md
# gdtest-sec-faq

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