Skip to content

Commit 030955e

Browse files
committed
Add doc classes to the index/reference page
1 parent 023cb3c commit 030955e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

quartodoc/autosummary.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
from .renderers import Renderer
2323
from .validation import fmt_all
2424
from ._pydantic_compat import ValidationError
25+
from .pandoc.blocks import Blocks, Header
26+
from .pandoc.components import Attr
2527

2628

2729
from typing import Any
@@ -591,7 +593,10 @@ def write_index(self, blueprint: layout.Layout):
591593
content = self.renderer.summarize(blueprint)
592594
_log.info(f"Writing index to directory: {self.dir}")
593595

594-
final = f"# {self.title}\n\n{content}"
596+
final = str(Blocks([
597+
Header(1, self.title, Attr(classes=["doc", "doc-index"])),
598+
content
599+
]))
595600

596601
p_index = Path(self.dir) / self.out_index
597602
p_index.parent.mkdir(exist_ok=True, parents=True)

0 commit comments

Comments
 (0)