@@ -655,18 +655,175 @@ content = [
655655client.replace_json_document(" document_id" , content)
656656```
657657
658+ ## Navigation Blocks
659+
660+ ### TOC Block - Table of Contents
661+
662+ Automatically generate a table of contents from all headings in the document:
663+
664+ ``` python
665+ from vaiz import toc_block, heading, paragraph
666+
667+ content = [
668+ # Add TOC at the beginning
669+ toc_block(),
670+
671+ heading(1 , " Introduction" ),
672+ paragraph(" Welcome to our documentation" ),
673+
674+ heading(2 , " Getting Started" ),
675+ paragraph(" First steps..." ),
676+
677+ heading(2 , " Advanced Topics" ),
678+ paragraph(" Deep dive into features..." )
679+ ]
680+
681+ client.replace_json_document(document_id, content)
682+ ```
683+
684+ ** Features:**
685+ - Automatically indexes all headings (h1-h6)
686+ - Creates clickable navigation links
687+ - Shows hierarchical document structure
688+ - Updates automatically when content changes
689+
690+ ** Note:** Headings created with ` heading() ` automatically get unique IDs required for TOC navigation.
691+
692+ ### Anchors Block - Related Documents
693+
694+ Display related documents and backlinks:
695+
696+ ``` python
697+ from vaiz import anchors_block, heading, paragraph
698+
699+ content = [
700+ anchors_block(), # Shows related documents
701+
702+ heading(1 , " Main Content" ),
703+ paragraph(" Content here..." )
704+ ]
705+
706+ client.replace_json_document(document_id, content)
707+ ```
708+
709+ ** Shows:**
710+ - Documents that this document links to
711+ - Documents that link to this one (backlinks)
712+ - Related documents from the space
713+ - Knowledge graph connections
714+
715+ ### Siblings Block - Same-Level Documents
716+
717+ Display documents at the same hierarchical level:
718+
719+ ``` python
720+ from vaiz import siblings_block, heading, paragraph
721+
722+ content = [
723+ siblings_block(), # Shows sibling documents
724+
725+ heading(1 , " Current Page" ),
726+ paragraph(" Sibling pages shown above..." )
727+ ]
728+
729+ client.replace_json_document(document_id, content)
730+ ```
731+
732+ ** Useful for:**
733+ - Series of tutorial pages
734+ - Multi-part guides
735+ - Related documentation pages
736+ - Folder/collection navigation
737+
738+ ### Code Block - Syntax Highlighting
739+
740+ Display code with syntax highlighting:
741+
742+ ``` python
743+ from vaiz import code_block, heading, paragraph
744+
745+ python_code = ''' def hello():
746+ print("Hello, World!")
747+ return True'''
748+
749+ content = [
750+ heading(1 , " Code Example" ),
751+ paragraph(" Here's a Python function:" ),
752+
753+ code_block(
754+ code = python_code,
755+ language = " python"
756+ ),
757+
758+ paragraph(" This code demonstrates a simple function." )
759+ ]
760+
761+ client.replace_json_document(document_id, content)
762+ ```
763+
764+ ** Supported Languages:**
765+ - Python, JavaScript, TypeScript, Java, C++, Go, Rust
766+ - SQL, JSON, YAML, XML, HTML, CSS
767+ - Bash, Shell, PowerShell
768+ - And 50+ more languages
769+
770+ ** Features:**
771+ - Syntax highlighting
772+ - Multiline code support
773+ - Optional language specification
774+ - Automatic formatting
775+
776+ ### Complete Navigation Example
777+
778+ Combine all navigation blocks:
779+
780+ ``` python
781+ from vaiz import (
782+ toc_block, anchors_block, siblings_block,
783+ heading, paragraph, code_block, bullet_list
784+ )
785+
786+ content = [
787+ # All navigation blocks at the top
788+ toc_block(),
789+ anchors_block(),
790+ siblings_block(),
791+
792+ # Main content
793+ heading(1 , " API Documentation" ),
794+
795+ paragraph(" This guide explains how to use our API." ),
796+
797+ heading(2 , " Authentication" ),
798+ bullet_list(
799+ " Get API key from settings" ,
800+ " Set environment variable" ,
801+ " Initialize client"
802+ ),
803+
804+ heading(2 , " Example" ),
805+ code_block(
806+ code = ' client = VaizClient(api_key="...")' ,
807+ language = " python"
808+ )
809+ ]
810+
811+ client.replace_json_document(document_id, content)
812+ ```
813+
658814## Supported Elements
659815
660816All helper functions create nodes compatible with the document editor:
661817
662818### Nodes
663819- ✅ ` text() ` - Text with formatting marks
664820- ✅ ` paragraph() ` - Paragraph blocks
665- - ✅ ` heading(level) ` - Headings (H1-H6)
821+ - ✅ ` heading(level) ` - Headings (H1-H6) with automatic UID
666822- ✅ ` bullet_list() ` - Unordered lists
667823- ✅ ` ordered_list() ` - Numbered lists
668824- ✅ ` list_item() ` - List items with content
669825- ✅ ` blockquote() ` - Blockquotes for quotes and callouts
826+ - ✅ ` details() ` - Collapsible sections
670827- ✅ ` table() ` - Tables with rows and cells
671828- ✅ ` table_row() ` - Table row
672829- ✅ ` table_cell() ` - Table cell (use for both data and headers)
@@ -676,6 +833,14 @@ All helper functions create nodes compatible with the document editor:
676833- ✅ ` mention_task() ` - Reference a task
677834- ✅ ` mention_milestone() ` - Reference a milestone
678835- ✅ ` mention(id, kind) ` - Generic mention
836+ - ✅ ` image_block() ` - Embed images
837+ - ✅ ` files_block() ` - Attach files
838+
839+ ### Navigation & Special Blocks
840+ - ✅ ` toc_block() ` - Automatic table of contents
841+ - ✅ ` anchors_block() ` - Related documents and backlinks
842+ - ✅ ` siblings_block() ` - Same-level documents navigation
843+ - ✅ ` code_block() ` - Code with syntax highlighting
679844
680845### Marks (Formatting)
681846- ✅ ` bold=True ` - Bold text
0 commit comments