Overview
The GitaChat embed feature allows you to display daily verses from the Bhagavad Gita directly on your website. The embed automatically updates daily with a new verse, providing your visitors with spiritual wisdom.Simple Integration
Add a verse widget with just a few lines of HTML
Daily Updates
Automatically displays a different verse each day
Fully Styled
Pre-styled widget matches GitaChat’s aesthetic
Lightweight
Fast-loading iframe with minimal overhead
Basic Implementation
Iframe Embed
The simplest way to embed GitaChat is using an iframe that points to the widget endpoint:Implementation Steps
Copy the embed code
Visit gitachat.org/embed to access the embed code generator with a live preview
Configuration Options
Sizing
Customize the widget dimensions to fit your layout:Styling
The iframe accepts standard CSS styling through thestyle attribute:
Border Radius
Control corner rounding with
border-radiusMax Width
Set maximum width with
max-widthBox Shadow
Add shadows with
box-shadowMargin/Padding
Control spacing with standard CSS properties
Widget Endpoint
Daily Verse Logic
The widget displays a consistent “verse of the day” that changes daily. The verse selection is deterministic based on the current date: Source:/home/daytona/workspace/source/frontend/app/widget/page.tsx:2-6
- Calculates days elapsed since January 1, 2024
- Uses modulo 700 to cycle through the verse collection
- Ensures the same verse appears globally for any given day
Data Source
The widget fetches verse data from the backend API: Source:/home/daytona/workspace/source/frontend/app/widget/page.tsx:8-31
Use Cases
Blog Sidebars
Add daily spiritual wisdom to your blog’s sidebar
Landing Pages
Enhance landing pages with inspirational verses
Community Sites
Share daily guidance on forums or community platforms
Personal Websites
Display verses on portfolios or personal sites
Responsive Design
The widget automatically adapts to different screen sizes. For optimal responsive behavior:Responsive Breakpoints
Technical Details
Caching
Widget data is cached for 1 hour for optimal performance
No Navigation
The widget route hides the main navigation for clean embedding
Server-Side Rendered
Widget content is rendered on the server for fast loading
Error Handling
Graceful fallback if verses cannot be loaded
Navigation Exclusion
The widget page automatically hides the GitaChat navigation to provide a clean embed experience: Source:/home/daytona/workspace/source/frontend/app/components/Nav.tsx:31-34
Best Practices
Support
Need help with embedding? The GitaChat embed page at gitachat.org/embed provides:- Live preview of the widget
- Copy-to-clipboard functionality
- Step-by-step usage instructions
- Visual examples
Embed Generator
Access the interactive embed code generator