A free bilingual digital library of classical Bengali literature.
Read Bangla originals alongside English translations — side by side, fully synchronized.
🌐 Live site: https://yourusername.github.io/bangla-library
- Bilingual reader — Bangla and English side by side with synchronized scrolling
- Click to highlight — click any passage to highlight the matching translation
- Three view modes — Side by Side / Bangla only / English only
- Font size control — three sizes for comfortable reading
- Full-text search — powered by Pagefind, runs entirely in the browser (no server)
- Fully SEO indexed — all text is crawlable by search engines via Astro SSG
- Mobile friendly — responsive layout
- Zero running costs — static files on GitHub Pages
- Node.js 18+
- npm
git clone https://github.com/yourusername/bangla-library
cd bangla-library
npm install
npm run devVisit http://localhost:4321
npm run build
# This builds the Astro site AND generates the Pagefind search indexCreate a new JSON file in src/content/books/:
# File name becomes the URL slug
# e.g. bishad-sindhu.json → /books/bishad-sindhu
touch src/content/books/my-book.jsonUse this structure:
{
"title_bn": "বইয়ের নাম",
"title_en": "Book Title in English",
"author_bn": "লেখকের নাম",
"author_en": "Author Name",
"year": "1890",
"category": "Novel",
"description_en": "A short description of the book in English.",
"paragraphs": [
{
"id": 1,
"bn": "বাংলা অনুচ্ছেদ...",
"en": "English translation of the paragraph..."
},
{
"id": 2,
"bn": "দ্বিতীয় অনুচ্ছেদ...",
"en": "Second paragraph translation..."
}
]
}That's it. Commit and push — GitHub Actions will deploy automatically.
bangla-library/
├── src/
│ ├── components/
│ │ └── BilingualReader.jsx ← React island (interactive reader)
│ ├── content/
│ │ ├── config.ts ← Content collection schema
│ │ └── books/
│ │ ├── gitanjali.json ← One JSON file per book
│ │ └── bishad-sindhu.json
│ ├── layouts/
│ │ └── Base.astro ← Shared nav, footer, fonts
│ └── pages/
│ ├── index.astro ← Homepage
│ ├── about/index.astro ← About page
│ ├── authors/index.astro ← Authors index
│ └── books/
│ ├── index.astro ← All books grid
│ └── [slug].astro ← Individual book page (SSG)
├── public/ ← Static assets
├── .github/workflows/deploy.yml ← Auto-deploy to GitHub Pages
├── astro.config.mjs
└── package.json
- Push this repo to GitHub
- Go to Settings → Pages
- Set source to GitHub Actions
- Update
astro.config.mjs:site: 'https://yourusername.github.io', base: '/bangla-library', // or '/' if using a custom domain
- Push to
main— GitHub Actions builds and deploys automatically
All texts must be in the public domain before adding them. Generally this means works published before 1926 or works where the author died more than 70 years ago (varies by country).
Safe authors to start with:
- Rabindranath Tagore (1861–1941) ✅
- Mir Mosharraf Hossain (1847–1912) ✅
- Bankimchandra Chattopadhyay (1838–1894) ✅
- Michael Madhusudan Dutt (1824–1873) ✅
- Kazi Nazrul Islam (1899–1976) — check jurisdiction
- Astro — Static site generation
- React — Bilingual reader island
- Pagefind — In-browser full-text search
- GitHub Pages — Hosting
- GitHub Actions — CI/CD
- Audio narration per passage
- User annotations / bookmarks (localStorage)
- Printable PDF export per book
- Contributor guide for translations
- Migrate to MongoDB + Cloudflare Pages at scale
Code: MIT
Content: Public Domain