Module

cli.commands.explain

Explain command - show how a page is built.

Provides complete traceability for any page: source file, template chain, dependencies, cache status, output location, and diagnostics.

Commands:

bengal explain <page> - Show how a page is built

Functions

explain
🔍 Explain how a page is built. Shows complete traceability for any page including: - Source file i…
6 None
def explain(page_path: str, verbose: bool, diagnose: bool, output_json: bool, traceback: str | None, source: str) -> None

🔍 Explain how a page is built.

Shows complete traceability for any page including:

  • Source file information
  • Frontmatter metadata
  • Template inheritance chain
  • Dependencies (templates, data, assets)
  • Shortcodes/directives used
  • Cache status (HIT/MISS/STALE)
  • Output location

Parameters 6

Name Type Default Description
page_path str
verbose bool
diagnose bool
output_json bool
traceback str | None
source str
_find_similar_pages
Find pages with similar paths.
2 list[str]
def _find_similar_pages(query: str, pages: list[Page]) -> list[str]

Find pages with similar paths.

Parameters 2

Name Type Default Description
query str
pages list[Page]

Returns

list[str]

_convert_paths_to_strings
Recursively convert Path objects to strings for JSON serialization.
1 Any
def _convert_paths_to_strings(obj: Any) -> Any

Recursively convert Path objects to strings for JSON serialization.

Parameters 1

Name Type Default Description
obj Any

Returns

Any