Skip to content

Commit adc946f

Browse files
committed
Let the builder keep track of the documented items
This makes it possible for other parts of the process to have access to the items.
1 parent 030955e commit adc946f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

quartodoc/autosummary.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,8 @@ class Builder:
465465
title: str
466466

467467
renderer: Renderer
468+
items: list[layout.Item]
469+
"""Documented items by this builder"""
468470

469471
def __init_subclass__(cls, **kwargs):
470472
super().__init_subclass__(**kwargs)
@@ -555,7 +557,7 @@ def build(self, filter: str = "*"):
555557
blueprint = blueprint(self.layout, dynamic=self.dynamic, parser=self.parser)
556558

557559
_log.info("Collecting pages and inventory items.")
558-
pages, items = collect(blueprint, base_dir=self.dir)
560+
pages, self.items = collect(blueprint, base_dir=self.dir)
559561

560562
# writing pages ----
561563

@@ -568,7 +570,7 @@ def build(self, filter: str = "*"):
568570
# inventory ----
569571

570572
_log.info("Creating inventory file")
571-
inv = self.create_inventory(items)
573+
inv = self.create_inventory(self.items)
572574
if self._fast_inventory:
573575
# dump the inventory file directly as text
574576
# TODO: copied from __main__.py, should add to inventory.py

0 commit comments

Comments
 (0)