Configuration Examples
Powerful customization options for every need
๐ง Configuration Basics
Bodh uses YAML files to configure presentations. Create a bodh.yml
file in your project directory to customize themes, layouts, and features.
๐ Configuration Examples
All examples use the same comprehensive gradient descent content but with different configurations to demonstrate the power of customization.
Modern Configuration
# configs/gradient-descent-modern.yml
theme:
name: "modern"
logo:
path: "examples/sample-logo.svg"
position: "bottom-right"
size: "medium"
slide_number:
enabled: true
format: "Slide {current}"
position: "top-right"
font:
family: "Inter"
size: 18
pdf:
engine: "playwright"
Result: Modern Style
Minimal Configuration
# configs/gradient-descent-minimal.yml
theme:
name: "minimal"
# No logo for clean look
logo:
enabled: false
slide_number:
enabled: true
format: "{current}/{total}"
position: "bottom-right"
font:
family: "Inter"
size: 20
pdf:
engine: "playwright"
Result: Minimal Style
Academic Configuration
# configs/gradient-descent-academic.yml
theme:
name: "default"
logo:
path: "examples/sample-logo.svg"
position: "top-center"
size: "small"
slide_number:
enabled: true
format: "Page {current} of {total}"
position: "bottom-center"
font:
family: "Inter"
size: 14 # Smaller for more content
pdf:
engine: "latex" # LaTeX backend for academic quality
latex_engine: "pdflatex"
colors:
background: "#ffffff"
text: "#000000"
accent: "#8b0000" # Dark red for academic look
Result: Academic Style
Presentation Configuration
# configs/gradient-descent-presentation.yml
theme:
name: "modern"
logo:
path: "examples/sample-logo.svg"
position: "bottom-right"
size: "large"
slide_number:
enabled: false # No slide numbers for clean presentation
font:
family: "Inter"
size: 24 # Large for presentations
colors:
background: "#ffffff"
text: "#2d3748"
accent: "#e53e3e" # Bold red for emphasis
Result: Presentation Style
Dark Theme Configuration
# configs/gradient-descent-dark.yml
theme:
name: "dark"
logo:
path: "examples/sample-logo.svg"
position: "bottom-right"
size: "medium"
slide_number:
enabled: true
format: "{current}"
position: "top-right"
font:
family: "Inter"
size: 18
colors:
background: "#1a202c"
text: "#ffffff"
accent: "#ed8936" # Orange accent
Result: Dark Style
๐ Real-World Examples
Academic Presentation
# academic.yml - For research presentations
theme: metropolis
font:
family: "Fira Sans"
size: 18
style:
hrule:
enabled: true
width: "70%"
style: "solid"
bullets:
style: "default"
color: "primary"
layout:
columns: 1
alignment: "left"
slide_number:
enabled: true
format: "current/total"
navigation:
show_dots: false
show_progress: false
Tech Conference Talk
# tech-talk.yml - For developer presentations
theme: dark
font:
family: "Fira Code"
size: 16
logo:
source: "tech-logo.svg"
location: "bottom-right"
size: 80
style:
shadows: true
rounded_corners: true
bullets:
style: "arrow"
color: "accent"
overlays:
enabled: true
transition: "slide"
navigation:
show_progress: true
keyboard_shortcuts: true
Corporate Pitch
# corporate.yml - For business presentations
theme: modern
font:
family: "Inter"
size: 20
logo:
source: "company-logo.png"
location: "top-left"
size: 150
style:
shadows: false
rounded_corners: false
hrule:
enabled: false
bullets:
style: "circle"
color: "primary"
slide_number:
enabled: true
format: "current"
position: "bottom-right"
navigation:
show_dots: false
show_arrows: true
Design Portfolio
# portfolio.yml - For creative presentations
theme: minimal
font:
family: "Source Sans Pro"
size: 24
style:
slide_padding: "4rem"
element_margin: "2rem"
shadows: false
bullets:
style: "square"
color: "accent"
layout:
alignment: "center"
navigation:
show_dots: true
show_arrows: false
show_progress: false
slide_number:
enabled: false
Educational Content
# education.yml - For teaching and courses
theme: sky
font:
family: "Roboto"
size: 22
style:
rounded_corners: true
shadows: true
bullets:
style: "default"
color: "primary"
layout:
columns: 1
alignment: "left"
overlays:
enabled: true
transition: "fade"
duration: "0.3s"
navigation:
enabled: true
show_progress: true
keyboard_shortcuts: true
slide_number:
enabled: true
format: "current/total"
๐ฏ Configuration Tips
Performance Optimization
# Fast rendering for development
style:
animations: false
shadows: false
rounded_corners: false
# High quality for final export
style:
animations: true
shadows: true
rounded_corners: true
Accessibility
# High contrast for better readability
theme: dark # or minimal
font:
size: 24 # Larger text
style:
bullets:
size: "1.5em" # Larger bullets
navigation:
keyboard_shortcuts: true # Always enable
Print Optimization
# Optimized for PDF export
theme: minimal
style:
shadows: false # Avoid printing issues
animations: false # Not needed in PDF
layout:
alignment: "left" # Better for reading
slide_number:
enabled: true # Helpful in printed form
format: "current/total"
๐ File Organization
Project Structure
my-presentation/
โโโ bodh.yml # Main configuration
โโโ slides.md # Presentation content
โโโ images/ # Image assets
โ โโโ logo.png
โ โโโ charts/
โโโ configs/ # Alternative configs
โโโ dark-theme.yml
โโโ print-ready.yml
Multiple Configurations
# Use different configs for different outputs
python bodh.py slides.md -c configs/web-preview.yml --html
python bodh.py slides.md -c configs/print-ready.yml -o final.pdf
๐ Validation and Testing
Bodh automatically validates your configuration and provides helpful error messages:
# Test configuration
python bodh.py --config bodh.yml --validate-only
# Common validation errors:
# - Invalid theme names
# - Font sizes out of range (8-72px)
# - Invalid color formats
# - Missing logo files
Ready to customize? Check out our Live Examples to see these configurations in action!