class_docstr: Render a Page object (layout.Page)
class_docstr_tok: ["Render","a","Page","object","(","layout.Page",")"]
code: def render_summary(self):
      page = self.page
      if page.summary is not None:
          link = Link(
              markdown_escape(page.summary.name), f"{page.path}.qmd"
          )
          items = [(str(link), page.summary.desc)]
      elif len(page.contents) > 1 and not page.flatten:
          msg = (
              f"Cannot summarize page {page.path}. "
              "Either set its `summary` attribute with name and"
              "description details, or set `flatten` to True."
          )
          raise ValueError(msg)
      else:
          items = [
              row
              for d in self.render_objs
              for row in d.render_summary()
          ]
      return items
  
imports: from __future__ import annotations
  from copy import copy
  from dataclasses import dataclass
  from functools import cached_property
  from typing import cast
  from quartodoc import layout
  from quartodoc.pandoc.blocks import Block, BlockContent, Blocks, Div, Header
  from quartodoc.pandoc.components import Attr
  from quartodoc.pandoc.inlines import Link
  from ..format import markdown_escape
  from ..pandoc.blocks import RawHTMLBlockTag
  from .base import RenderBase
label_desc: Use image node_id 8 for calling the __RenderPage obj's underlying member method code with example usage: obj.render_summary() and returns: items