gdtest-tag-location
A test package demonstrating the tag_location feature.
Tags can appear at the top (below title) or bottom (after metadata) of each page. The global default is set in great-docs.yml and individual pages can override via tag-location frontmatter.
Six user-guide pages testing tag_location placement. The global default is set to ‘bottom’ so tags appear after page metadata. Three pages have frontmatter dates (date_created, last_update) with show_dates enabled to test bottom-placed tags appearing after the metadata block. Two pages override to ‘top’ via tag-location frontmatter, one page explicitly sets ‘bottom’, one page has no dates (tags under), and one page has no tags at all.
Source files
gdtest_tag_location/
__init__.py
"""A test package for the tag location feature."""
__version__ = "0.1.0"
__all__ = ["Gadget", "make_gadget"]
class Gadget:
"""
A simple gadget.
Parameters
----------
label
Display label for the gadget.
"""
def __init__(self, label: str):
self.label = label
def activate(self) -> str:
"""
Activate the gadget.
Returns
-------
str
Activation message.
"""
return f"Gadget {self.label} activated"
def make_gadget(label: str) -> Gadget:
"""
Create a new gadget.
Parameters
----------
label
Display label for the gadget.
Returns
-------
Gadget
A new gadget instance.
"""
return Gadget(label)user_guide/
01-intro.qmd
--- title: Introduction tags: [Setup, Python] date_created: "2025-06-01" last_update: date: "2026-03-15" author: "Alice" --- Welcome! This page inherits the global tag location (bottom) and has page metadata (dates + author). Tags should appear *after* the metadata block at the bottom.
02-api-guide.qmd
--- title: API Guide tags: [API, Python] tag-location: top date_created: "2025-07-10" last_update: date: "2026-02-20" --- This page overrides the global setting and places tags at the top, right below the title. Page metadata still appears at the bottom. ## Using the API Import and use gadgets in your code.
03-advanced.qmd
--- title: Advanced Patterns subtitle: Power-user techniques tags: [Python, API] date_created: "2025-08-22" last_update: date: "2026-04-01" author: "Bob" --- This page inherits the global tag location (bottom) and has both a subtitle and page metadata. Tags should appear after the metadata block. ## Multi-Gadget Workflows Combine multiple gadgets for complex tasks.
04-setup.qmd
--- title: Setup Guide tags: [Setup] tag-location: bottom --- This page explicitly sets tag-location to bottom and has no date metadata. Tags should appear under a horizontal rule at the end of content. ## Installation Install the package via pip.
05-tips.qmd
--- title: Tips and Tricks description: Handy shortcuts and lesser-known features. tags: [Python, Setup] tag-location: top --- This page overrides to top and has a description field. ## Shortcuts Use keyboard shortcuts for faster workflows.
06-faq.qmd
--- title: FAQ --- This page has no tags. No tag pills should appear anywhere.
README.md
# gdtest-tag-location A test package demonstrating the tag_location feature. Tags can appear at the top (below title) or bottom (after metadata) of each page. The global default is set in great-docs.yml and individual pages can override via tag-location frontmatter.
great-docs.yml
display_name: Tag Location Demo
site:
show_dates: true
tags:
enabled: true
index_page: true
show_on_pages: true
hierarchical: true
location: bottom
icons:
Setup: download
Python: code
API: plug