This directory contains comprehensive examples and demonstrations of the Logseq Python library features.
python3 examples/comprehensive_features_demo.pyLatest features showcase:
- ✅ Hierarchical blocks and sub-blocks (v0.3.1 fix)
- ✅ Code blocks with proper indentation (v0.3.2 fix)
- ✅ Comprehensive test coverage (v0.3.3)
- ✅ NEW Diagram support - Mermaid, Graphviz, PlantUML (v0.4.0)
- ✅ 7 interactive demos with validation
- ✅ Real-world usage scenarios
What's included:
- Demo 1: Nested blocks with proper hierarchy
- Demo 2: Code blocks as child blocks
- Demo 3: Mermaid diagrams (flowchart, sequence, gantt)
- Demo 4: Graphviz and PlantUML diagrams
- Demo 5: Complete documentation page
- Demo 6: Diagrams in nested blocks
- Demo 7: Meeting notes and technical docs
This directory also contains a comprehensive demonstration of all Logseq features, generated programmatically using the Logseq Builder DSL.
- 15+ demonstration pages covering all major Logseq features
- All block types: text, headings, code, math, quotes, tables, embeds
- Task management: TODO/DOING/DONE with priorities, scheduling, GTD workflows
- Page properties: metadata, queries, automation
- Linking systems: bidirectional links, backlinks, namespaces, tags
- Templates: reusable content for meetings, projects, workflows
- Journal entries: 7 days of realistic daily notes
- Advanced features: queries, automation, plugin integration
- Learning resources: tutorials, best practices, troubleshooting
- Type-safe content creation - No string templates, all programmatically built
- Fluent interface - Readable, chainable method calls
- Language-aware code blocks - Smart comment generation for 15+ languages
- Multi-line content support - Proper handling of code blocks, math expressions
- Modular building blocks - TaskBuilder, CodeBlockBuilder, MathBuilder, etc.
- Project management workflows and templates
- Software development documentation and processes
- Academic research note-taking and citation management
- Personal productivity systems and habit tracking
- Team collaboration meeting notes and communication
- Comprehensive plugin ecosystem overview
- 18+ plugin categories with detailed descriptions
- Integration examples and code snippets
- Plugin development guidance
- External tool connections (GitHub, APIs, browsers)
The demo is automatically generated in the logseq-demo/ directory:
examples/
├── generate_logseq_demo.py # DSL-based demo generator script
├── logseq-demo/ # Generated Logseq graph
│ ├── .logseq/ # Configuration files
│ ├── journals_*.md # Daily note examples
│ └── (various demo pages) # Feature demonstration pages
└── README.md # This file
- Open Logseq application
- Click "Add graph" or "Open existing graph"
- Navigate to and select the
examples/logseq-demodirectory - Start exploring with the "Welcome to Demo" page
- Start here: [[Welcome to Demo]]
- Core features: Task Management, Block Types, Page Properties
- Advanced features: Templates, Namespaces, Advanced Features
- Learning: Learning Resources, Plugin Integration
| Page | Description | Key Features |
|---|---|---|
| Task Management Demo | Complete task workflows | TODO/DOING/DONE, priorities, scheduling, GTD |
| Block Types Showcase | All supported block formats | Code, math, tables, embeds, drawings |
| Page Properties Demo | Metadata and automation | Properties, queries, relationships |
| Linking and Tagging System | Knowledge graph features | Links, backlinks, tags, references |
| Page | Description | Key Features |
|---|---|---|
| Templates and Workflows | Automation and standardization | Meeting notes, project plans, workflows |
| Namespace Hierarchy Demo | Organizational structures | Projects/, People/, Learning/ hierarchies |
| Advanced Features Demo | Power user capabilities | Complex queries, automation, integrations |
| Plugin Integration Demo | Ecosystem and extensions | 18+ plugin categories, development guide |
- 7 days of journal entries with realistic daily workflows
- Project examples with full hierarchies (Projects/Website Redesign/)
- People profiles with roles and relationships
- Meeting templates and follow-up workflows
- Learning resources with progressive skill development
The demo includes pre-configured settings in .logseq/:
- config.edn: Optimal settings for demo exploration
- custom.css: Enhanced styling for better visualization
- metadata.edn: Demo metadata and feature tracking
To create a fresh demo with updated content:
cd examples
python generate_logseq_demo.py my-custom-demoEdit generate_logseq_demo.py to:
- Add new feature demonstrations
- Modify example content
- Include custom templates
- Add organization-specific examples
- Welcome to Demo - Overview and navigation
- Block Types Showcase - Basic content creation
- Task Management Demo - Essential productivity features
- Linking and Tagging System - Knowledge connections
- Page Properties Demo - Structured data and queries
- Templates and Workflows - Process automation
- Namespace Hierarchy Demo - Organizational strategies
- Journal entries (7 sample days) - Daily workflow patterns
- Advanced Features Demo - Complex queries and automation
- Plugin Integration Demo - Ecosystem and extensions
- Workflow Examples - Professional and academic patterns
- Learning Resources - Mastery and troubleshooting
The demo generator is modular and extensible:
def _create_custom_demo(self):
"""Add your custom demo content here."""
content = """# My Custom Feature Demo
Your custom content here...
"""
self.client.create_page("Custom Demo", content)The demo includes:
- Plugin architecture examples
- API integration patterns
- Custom command implementations
- Theme and UI customizations
Real-world integration examples for:
- Version Control: Git workflow documentation
- APIs: External service connections
- Databases: Query and visualization
- Automation: Scheduled content generation
- Pages: 25+ comprehensive demonstration pages
- Block Types: All 10+ supported formats with examples
- Tasks: 50+ task management examples
- Templates: 10+ production-ready templates
- Queries: 20+ query examples from basic to advanced
- Links: 100+ internal connections demonstrating knowledge graphs
- Features: Complete coverage of Logseq capabilities
To improve the demo:
- Fork the repository
- Modify
generate_logseq_demo.py - Test with
python generate_logseq_demo.py test-demo - Submit pull request with improvements
- Industry-specific workflow examples
- Additional language code samples
- Plugin integration tutorials
- Performance optimization examples
- Accessibility feature demonstrations
This demo showcases the full power of Logseq as a knowledge management and productivity platform. It serves as both a learning resource for new users and a reference for advanced implementations.
The programmatic generation approach demonstrates how the Logseq Python Library can be used for:
- Bulk content creation
- Knowledge base migration
- Automated documentation
- Template and workflow distribution
- Integration with existing systems
Explore, experiment, and adapt these patterns to your own Logseq workflows!
Generated with ❤️ by the Logseq Python Library