From b348145f6a033ca4a0c52864536b1a65e2d03c50 Mon Sep 17 00:00:00 2001 From: Daniela Rus Morales Date: Mon, 25 Nov 2024 19:22:14 +0100 Subject: [PATCH] Output content of build static dir --- docs/source/conf.py | 2 +- sphinx_nefertiti/__init__.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 17a56cc..d15f126 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -166,7 +166,7 @@ }, ], - "show_colorset_choices": False, + "show_colorset_choices": True, # Return user's to 'blue' after a day since color was picked. "reset_colorset_choice_after_ms": 1000 * 60 * 60 * 24, } diff --git a/sphinx_nefertiti/__init__.py b/sphinx_nefertiti/__init__.py index 3b09112..f9294a2 100644 --- a/sphinx_nefertiti/__init__.py +++ b/sphinx_nefertiti/__init__.py @@ -77,9 +77,17 @@ def update_context(app, pagename, templatename, context, doctree): context["all_colorsets"] = colorsets.all_colorsets +def build_finished(app, exc): + print(f"Files in {app.builder.outdir}") # noqa: T201 + static_dir = Path(app.builder.outdir) / "_static" + for item in static_dir.iterdir(): + print(f"\t{item}") # noqa: T201 + + def setup(app): app.connect("builder-inited", initialize_theme) app.connect("html-page-context", update_context) + app.connect("build-finished", build_finished) if hasattr(app, "add_html_theme"): theme_path = str(Path(__file__).parent)