# proxy URL: /api/core/page/proxy/ Section: page -------------------------------------------------------------------------------- proxy - Bengal window.BENGAL_THEME_DEFAULTS = { appearance: 'dark', palette: 'snow-lynx' }; // Progressive Enhancement System Configuration window.Bengal = window.Bengal || {}; window.Bengal.enhanceBaseUrl = '/bengal/assets/js/enhancements'; window.Bengal.watchDom = true; window.Bengal.debug = false; (function () { try { var defaults = window.BENGAL_THEME_DEFAULTS || { appearance: 'system', palette: '' }; var defaultAppearance = defaults.appearance; if (defaultAppearance === 'system') { defaultAppearance = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ? 'dark' : 'light'; } var storedTheme = localStorage.getItem('bengal-theme'); var storedPalette = localStorage.getItem('bengal-palette'); var theme = storedTheme ? (storedTheme === 'system' ? defaultAppearance : storedTheme) : defaultAppearance; var palette = storedPalette ?? defaults.palette; document.documentElement.setAttribute('data-theme', theme); if (palette) { document.documentElement.setAttribute('data-palette', palette); } } catch (e) { document.documentElement.setAttribute('data-theme', 'light'); } })(); Skip to main content Magnifying Glass ESC Recent Clear Magnifying Glass No results for "" Try different keywords or check your spelling Start typing to search... ↑↓ Navigate ↵ Open ESC Close Powered by Lunr ᓚᘏᗢ Documentation Info About Arrow Clockwise Get Started Note Tutorials File Text Content Palette Theming Settings Building Starburst Extending Bookmark Reference Learning Tracks Releases Dev GitHub API Reference bengal CLI Magnifying Glass Search ⌘K Palette Appearance Chevron Down Mode Monitor System Sun Light Moon Dark Palette Snow Lynx Brown Bengal Silver Bengal Charcoal Bengal Blue Bengal List ᓚᘏᗢ Magnifying Glass Search X Close Documentation Info About Arrow Clockwise Get Started Note Tutorials File Text Content Palette Theming Settings Building Starburst Extending Bookmark Reference Learning Tracks Releases Dev GitHub API Reference bengal CLI Palette Appearance Chevron Down Mode Monitor System Sun Light Moon Dark Palette Snow Lynx Brown Bengal Silver Bengal Charcoal Bengal Blue Bengal API Reference __main__ bengal Caret Right Folder Analysis community_detection graph_analysis graph_reporting graph_visualizer knowledge_graph link_suggestions link_types page_rank path_analysis performance_advisor results Caret Right Folder Assets manifest pipeline Caret Right Folder Autodoc base config docstring_parser utils virtual_orchestrator Caret Right Folder Extractors cli openapi python Caret Right Folder Models cli common openapi python Caret Right Folder Cache asset_dependency_map cache_store cacheable compression dependency_tracker page_discovery_cache query_index query_index_registry taxonomy_index utils Caret Right Folder Build Cache autodoc_tracking core file_tracking fingerprint parsed_content_cache rendered_output_cache taxonomy_index_mixin validation_cache Caret Right Folder Indexes author_index category_index date_range_index section_index Caret Right Folder Cli __main__ base site_templates utils Caret Right Folder Commands assets build clean collections config debug explain fix health init perf project serve site skeleton sources theme utils validate Caret Right Folder Graph __main__ bridges communities orphans pagerank report suggest Caret Right Folder New config presets scaffolds site wizard Caret Right Folder Helpers cli_app_loader cli_output config_validation error_handling menu_config metadata progress site_loader traceback validation Caret Right Folder Skeleton hydrator schema Caret Right Folder Templates base registry Caret Right Folder Blog template Caret Right Folder Changelog template Caret Right Folder Default template Caret Right Folder Docs template Caret Right Folder Landing template Caret Right Folder Portfolio template Caret Right Folder Resume template Caret Right Folder Collections errors loader schemas validator Caret Right Folder Config defaults deprecation directory_loader env_overrides environment feature_mappings hash loader merge origin_tracker validators Caret Right Folder Content Layer entry loaders manager source Caret Right Folder Sources github local notion rest Caret Right Folder Content Types base registry strategies Caret Right Folder Core build_context cascade_engine menu section theme Caret Right Folder Asset asset_core css_transforms Caret Right Folder Page computed content metadata navigation operations page_core proxy relationships utils Caret Right Folder Site core data discovery factories page_caches properties section_registry theme Caret Right Folder Debug base config_inspector content_migrator delta_analyzer dependency_visualizer explainer incremental_debugger models reporter shortcode_sandbox Caret Right Folder Discovery asset_discovery content_discovery Caret Right Folder Fonts downloader generator Caret Right Folder Health autofix base health_check report Caret Right Folder Linkcheck async_checker ignore_policy internal_checker models orchestrator Caret Right Folder Validators anchors assets cache config connectivity cross_ref fonts links menu navigation output performance rendering rss sitemap taxonomy tracks Caret Right Folder Directives analysis checkers constants Caret Right Folder Orchestration asset content full_to_incremental incremental menu postprocess related_posts render section static streaming taxonomy Caret Right Folder Postprocess html_output redirects rss sitemap special_pages Caret Right Folder Output Formats index_generator json_generator llm_generator lunr_index_generator txt_generator utils Caret Right Folder Rendering api_doc_enhancer asset_extractor errors jinja_utils link_transformer link_validator pygments_cache renderer template_context template_profiler validator Caret Right Folder Parsers base factory mistune native_html pygments_patch python_markdown Caret Right Folder Pipeline core output thread_local toc transforms Caret Right Folder Plugins badges cross_references inline_icon term variable_substitution Caret Right Folder Directives _icons admonitions badge base button cache cards checklist code_tabs container contracts data_table dropdown embed errors example_label fenced figure glossary icon include list_table literalinclude marimo navigation options rubric steps tabs target term terminal tokens utils validator video Caret Right Folder Template Engine asset_url core environment manifest menu url_helpers Caret Right Folder Template Functions advanced_collections advanced_strings autodoc collections content crossref data dates debug files get_page i18n icons images math_functions navigation pagination_helpers seo strings tables taxonomies theme urls Caret Right Folder Server build_handler component_preview constants dev_server live_reload pid_manager reload_controller request_handler request_logger resource_manager utils Caret Right Folder Services validation Caret Right Folder Themes config Caret Right Folder Utils atomic_write autodoc build_context build_stats build_summary cli_output css_minifier dates dotdict error_handlers file_io file_lock hashing incremental_constants js_bundler live_progress logger metadata observability page_initializer pagination path_resolver paths performance_collector performance_report profile progress retry rich_console sections swizzle text theme_registry theme_resolution thread_local traceback_config traceback_renderer url_normalization url_strategy Core Page ᗢ Caret Down Link Copy URL External Open LLM text Copy Copy LLM text Share with AI Ask Claude Ask ChatGPT Ask Gemini Ask Copilot Module core.page.proxy PageProxy - Lazy-loaded page placeholder for incremental builds. A PageProxy holds minimal page metadata (title, date, tags, etc.) loaded from the PageDiscoveryCache and defers loading full page content until needed. This enables incremental builds to skip disk I/O and parsing for unchanged pages while maintaining transparent access (code doesn't know it's lazy). Architecture: Metadata loaded immediately from cache (fast) Full content loaded on first access to .content or other lazy properties Transparent to callers - behaves like a normal Page object Falls back to eager load if cascades or complex operations detected View source 1 Class Classes PageProxy Lazy-loaded page placeholder. Holds page metadata from cache and defers loading full content until… 68 Caret Right Lazy-loaded page placeholder. Holds page metadata from cache and defers loading full content until accessed. Transparent to callers - implements Page-like interface. LIFECYCLE IN INCREMENTAL BUILDS: Discovery (content_discovery.py): Created from cached metadata for unchanged pages Has: title, date, tags, slug, _section, _site, output_path Does NOT have: content, rendered_html (lazy-loaded on demand) Filtering (incremental.py): PageProxy objects pass through find_work_early() unchanged Only modified pages become full Page objects for rendering Rendering (render.py): Modified pages rendered as full Page objects PageProxy objects skipped (already have cached output) Update (build/rendering.py Phase 15): Freshly rendered Page objects REPLACE their PageProxy counterparts site.pages becomes: mix of fresh Page (rebuilt) + PageProxy (cached) Postprocessing (postprocess.py): Iterates over site.pages (now updated with fresh Pages) ⚠️ CRITICAL: PageProxy must implement ALL properties/methods used: output_path (for finding where to write .txt/.json) url, permalink (for generating index.json) title, date, tags (for content in output files) TRANSPARENCY CONTRACT: PageProxy must be transparent to: Templates: Implements .url, .permalink, .title, etc. Postprocessing: Implements .output_path, metadata access Navigation: Implements .prev, .next (via lazy load) ⚠️ When adding new Page properties used by templates/postprocessing, MUST also add to PageProxy or handle in _ensure_loaded(). Usage: # Create from cached metadata page = PageProxy( source_path=Path("content/post.md"), metadata=cached_metadata, loader=load_page_from_disk, # Callable that loads full page ) # Access metadata (instant, from cache) print(page.title) # "My Post" print(page.tags) # ["python", "web"] # Access full content (triggers lazy load) print(page.content) # Loads from disk and parses # After first access, it's fully loaded assert page._lazy_loaded # True Attributes Name Type Description _site Site | None Methods 59 Tag title property Get page title from cached metadata. str Caret Right def title(self) -> str Get page title from cached metadata. Returns str Tag date property Get page date from cached metadata (parsed from ISO string). datetime | None Caret Right def date(self) -> datetime | None Get page date from cached metadata (parsed from ISO string). Returns datetime | None Tag tags property Get page tags from cached metadata. list[str] Caret Right def tags(self) -> list[str] Get page tags from cached metadata. Returns list[str] Tag slug property Get URL slug from cached metadata. str | None Caret Right def slug(self) -> str | None Get URL slug from cached metadata. Returns str | None Tag weight property Get sort weight from cached metadata. int | None Caret Right def weight(self) -> int | None Get sort weight from cached metadata. Returns int | None Tag lang property Get language code from cached metadata. str | None Caret Right def lang(self) -> str | None Get language code from cached metadata. Returns str | None Tag type property Get page type from cached metadata (cascaded). str | None Caret Right def type(self) -> str | None Get page type from cached metadata (cascaded). Returns str | None Tag variant property Get visual variant from cached metadata (Mode). Falls back to legacy layout/he… str | None Caret Right def variant(self) -> str | None Get visual variant from cached metadata (Mode). Falls back to legacy layout/hero_style fields in props if not set. Returns str | None Tag props property Get custom props from cached metadata. This provides access to the 'props' dic… dict[str, Any] Caret Right def props(self) -> dict[str, Any] Get custom props from cached metadata. This provides access to the 'props' dictionary (formerly metadata) without loading the full page. Returns dict[str, Any] Tag section property Get section path from cached metadata. str | None Caret Right def section(self) -> str | None Get section path from cached metadata. Returns str | None Tag relative_path property Get relative path string (alias for source_path as string). str Caret Right def relative_path(self) -> str Get relative path string (alias for source_path as string). Returns str Tag aliases property Get redirect aliases from cached metadata. list[str] Caret Right def aliases(self) -> list[str] Get redirect aliases from cached metadata. Returns list[str] Tag content property Get page content (lazy-loaded from disk). str Caret Right def content(self) -> str Get page content (lazy-loaded from disk). Returns str Tag metadata property Get metadata dict from cache (no lazy load). Returns cached metadata including… dict[str, Any] Caret Right def metadata(self) -> dict[str, Any] Get metadata dict from cache (no lazy load). Returns cached metadata including cascaded fields like 'type'. This allows templates to check page.metadata.get("type") without triggering a full page load. Returns dict[str, Any] Tag rendered_html property Get rendered HTML (lazy-loaded). str Caret Right def rendered_html(self) -> str Get rendered HTML (lazy-loaded). Returns str Tag links property Get extracted links (lazy-loaded). list[str] Caret Right def links(self) -> list[str] Get extracted links (lazy-loaded). Returns list[str] Tag version property Get version (lazy-loaded). str | None Caret Right def version(self) -> str | None Get version (lazy-loaded). Returns str | None Tag toc property Get table of contents (lazy-loaded). str | None Caret Right def toc(self) -> str | None Get table of contents (lazy-loaded). Returns str | None Tag toc_items property Get TOC items (lazy-loaded). list[dict[str, Any]] Caret Right def toc_items(self) -> list[dict[str, Any]] Get TOC items (lazy-loaded). Returns list[dict[str, Any]] Tag output_path property Get output path (lazy-loaded). Path | None Caret Right def output_path(self) -> Path | None Get output path (lazy-loaded). Returns Path | None Tag parsed_ast property Get parsed AST (lazy-loaded). Any Caret Right def parsed_ast(self) -> Any Get parsed AST (lazy-loaded). Returns Any Tag related_posts property Get related posts (lazy-loaded). list[Page] Caret Right def related_posts(self) -> list[Page] Get related posts (lazy-loaded). Returns list[Page] Tag translation_key property Get translation key. str | None Caret Right def translation_key(self) -> str | None Get translation key. Returns str | None Tag url property Get the URL path for the page (lazy-loaded, cached after first access). str Caret Right def url(self) -> str Get the URL path for the page (lazy-loaded, cached after first access). Returns str Tag relative_url property Get the relative URL (without baseurl) for the page (lazy-loaded, cached after … str Caret Right def relative_url(self) -> str Get the relative URL (without baseurl) for the page (lazy-loaded, cached after first access). Returns str Tag permalink property Get the permalink (URL with baseurl) for the page (lazy-loaded, cached after fi… str Caret Right def permalink(self) -> str Get the permalink (URL with baseurl) for the page (lazy-loaded, cached after first access). Returns str Tag meta_description property Get meta description (lazy-loaded from full page). str Caret Right def meta_description(self) -> str Get meta description (lazy-loaded from full page). Returns str Tag reading_time property Get reading time estimate (lazy-loaded from full page). str Caret Right def reading_time(self) -> str Get reading time estimate (lazy-loaded from full page). Returns str Tag excerpt property Get content excerpt (lazy-loaded from full page). str Caret Right def excerpt(self) -> str Get content excerpt (lazy-loaded from full page). Returns str Tag keywords property Get keywords (lazy-loaded from full page). list[str] Caret Right def keywords(self) -> list[str] Get keywords (lazy-loaded from full page). Returns list[str] Tag parent property Get the parent section of this page. Returns parent section without forcing fu… Any Caret Right def parent(self) -> Any Get the parent section of this page. Returns parent section without forcing full page load (uses _section). Returns Any Tag ancestors property Get all ancestor sections of this page. Returns list of ancestor sections from… list[Any] Caret Right def ancestors(self) -> list[Any] Get all ancestor sections of this page. Returns list of ancestor sections from immediate parent to root without forcing full page load (uses _section property). Returns list[Any] Tag is_home property Check if this page is the home page. bool Caret Right def is_home(self) -> bool Check if this page is the home page. Returns bool Tag is_section property Check if this page is a section page. bool Caret Right def is_section(self) -> bool Check if this page is a section page. Returns bool Tag is_page property Check if this is a regular page (not a section). bool Caret Right def is_page(self) -> bool Check if this is a regular page (not a section). Returns bool Tag kind property Get the kind of page: 'home', 'section', or 'page'. str Caret Right def kind(self) -> str Get the kind of page: 'home', 'section', or 'page'. Returns str Tag description property Get page description. Favors core.description (fast, cached) but falls back to… str Caret Right def description(self) -> str Get page description. Favors core.description (fast, cached) but falls back to full page load if not available, for backward compatibility. Returns str Tag draft property Check if page is marked as draft. bool Caret Right def draft(self) -> bool Check if page is marked as draft. Returns bool Tag hidden property Check if page is hidden (unlisted). bool Caret Right def hidden(self) -> bool Check if page is hidden (unlisted). Returns bool Tag visibility property Get visibility settings with defaults. dict[str, Any] Caret Right def visibility(self) -> dict[str, Any] Get visibility settings with defaults. Returns dict[str, Any] Tag in_listings property Check if page should appear in listings/queries. bool Caret Right def in_listings(self) -> bool Check if page should appear in listings/queries. Returns bool Tag in_sitemap property Check if page should appear in sitemap. bool Caret Right def in_sitemap(self) -> bool Check if page should appear in sitemap. Returns bool Tag in_search property Check if page should appear in search index. bool Caret Right def in_search(self) -> bool Check if page should appear in search index. Returns bool Tag in_rss property Check if page should appear in RSS feeds. bool Caret Right def in_rss(self) -> bool Check if page should appear in RSS feeds. Returns bool Tag robots_meta property Get robots meta content for this page. str Caret Right def robots_meta(self) -> str Get robots meta content for this page. Returns str Tag should_render property Check if page should be rendered. bool Caret Right def should_render(self) -> bool Check if page should be rendered. Returns bool Tag next property Get next page in site collection. Page | None Caret Right def next(self) -> Page | None Get next page in site collection. Returns Page | None Tag prev property Get previous page in site collection. Page | None Caret Right def prev(self) -> Page | None Get previous page in site collection. Returns Page | None Tag next_in_section property Get next page in same section. Page | None Caret Right def next_in_section(self) -> Page | None Get next page in same section. Returns Page | None Tag prev_in_section property Get previous page in same section. Page | None Caret Right def prev_in_section(self) -> Page | None Get previous page in same section. Returns Page | None rendered_html Set rendered HTML. 1 None Caret Right def rendered_html(self, value: str) -> None Set rendered HTML. Parameters 1 value str toc Set table of contents. 1 None Caret Right def toc(self, value: str | None) -> None Set table of contents. Parameters 1 value str | None output_path Set output path. 1 None Caret Right def output_path(self, value: Path | None) -> None Set output path. Parameters 1 value Path | None parsed_ast Set parsed AST. 1 None Caret Right def parsed_ast(self, value: Any) -> None Set parsed AST. Parameters 1 value Any related_posts Set related posts. In incremental mode, allow setting on proxy without forcing… 1 None Caret Right def related_posts(self, value: list[Page]) -> None Set related posts. In incremental mode, allow setting on proxy without forcing a full load. Parameters 1 value list[Page] should_render_in_environment Check if page should be rendered in the given environment. 1 bool Caret Right def should_render_in_environment(self, is_production: bool = False) -> bool Check if page should be rendered in the given environment. Parameters 1 is_production bool Returns bool extract_links Extract links from content. 0 None Caret Right def extract_links(self) -> None Extract links from content. get_load_status Get debugging info about proxy state. 0 dict[str, Any] Caret Right def get_load_status(self) -> dict[str, Any] Get debugging info about proxy state. Returns dict[str, Any] from_page classmethod Create proxy from full page (for testing). 2 PageProxy Caret Right def from_page(cls, page: Page, metadata: Any) -> PageProxy Create proxy from full page (for testing). Parameters 2 page Page metadata Any Returns PageProxy Internal Methods 9 Caret Right Tag _section property Get the section this page belongs to (lazy lookup via path). If the page is lo… Any | None Caret Right def _section(self) -> Any | None Get the section this page belongs to (lazy lookup via path). If the page is loaded, delegates to the full page's _section property. Otherwise, performs path-based lookup via site registry without forcing load. Returns Any | None — Section object if found, None otherwise __init__ Initialize PageProxy with PageCore metadata and loader. 3 None Caret Right def __init__(self, source_path: Path, metadata: PageCore, loader: Callable[[Path], Page]) Initialize PageProxy with PageCore metadata and loader. Parameters 3 source_path Path Path to source content file metadata PageCore PageCore with cached page metadata (title, date, tags, etc.) loader Callable[[Path], Page] Callable that loads full Page(source_path) -> Page _parse_date Parse ISO date string to datetime (deprecated, use date property). 1 datetime | None Caret Right def _parse_date(self, date_str: str) -> datetime | None Parse ISO date string to datetime (deprecated, use date property). Parameters 1 date_str str Returns datetime | None _ensure_loaded Load full page content if not already loaded. 0 None Caret Right def _ensure_loaded(self) -> None Load full page content if not already loaded. _section Set the section this page belongs to (stores path, not object). 1 None Caret Right def _section(self, value: Any) -> None Set the section this page belongs to (stores path, not object). Parameters 1 value Any Section object or None __hash__ Hash based on source_path (same as Page). 0 int Caret Right def __hash__(self) -> int Hash based on source_path (same as Page). Returns int __eq__ Equality based on source_path. 1 bool Caret Right def __eq__(self, other: Any) -> bool Equality based on source_path. Parameters 1 other Any Returns bool __repr__ String representation. 0 str Caret Right def __repr__(self) -> str String representation. Returns str __str__ String conversion. 0 str Caret Right def __str__(self) -> str String conversion. Returns str ← Previous page_core Next → relationships List © 2025 Bengal ᓚᘏᗢ window.BENGAL_LAZY_ASSETS = { tabulator: '/bengal/assets/js/tabulator.min.js', dataTable: '/bengal/assets/js/data-table.js', mermaidToolbar: '/bengal/assets/js/mermaid-toolbar.9de5abba.js', mermaidTheme: '/bengal/assets/js/mermaid-theme.344822c5.js', graphMinimap: '/bengal/assets/js/graph-minimap.cc7e42e3.js', graphContextual: '/bengal/assets/js/graph-contextual.440e59c6.js' }; window.BENGAL_ICONS = { close: '/bengal/assets/icons/close.911d4fe1.svg', enlarge: '/bengal/assets/icons/enlarge.652035e5.svg', copy: '/bengal/assets/icons/copy.3d56e945.svg', 'download-svg': '/bengal/assets/icons/download.04f07e1b.svg', 'download-png': '/bengal/assets/icons/image.c34dfd40.svg', 'zoom-in': '/bengal/assets/icons/zoom-in.237b4a83.svg', 'zoom-out': '/bengal/assets/icons/zoom-out.38857c77.svg', reset: '/bengal/assets/icons/reset.d26dba29.svg' }; Arrow Up X -------------------------------------------------------------------------------- Metadata: - Author: lbliii - Word Count: 3365 - Reading Time: 17 minutes