anirudh@Shadow:~$ cat Palya.md
Palya
A blazing-fast, zero-bloat static site generator with built-in search and compile-time syntax highlighting.
What is Palya?
Palya is a static site generator built in rust. The major focus of palya is speed. I have optimised palya’s features to make it as fast as possible, to decrease build time (still working on this).
Building personal static site generators is a tradition of sort in my college’s tech community. Palya is heavily inspired by saaru and anna.
Why name it Palya?
In Kannada, Palya (ಪಲ್ಯ) means a simple, quick, and flavorful dry vegetable stir-fry. Just like the dish, this static site generator is designed to be lightweight, incredibly fast to prepare (build), and satisfying without any unnecessary bloat. It takes raw Markdown files and serves up a fully searchable, styled HTML website in milliseconds.
Our SSG naming convention has accidentally (intentionally) turned into a South Indian thali. Saaru, Anna… so I added Palya to complete the plate.
Architecture & Features
Palya is built to be a zero-friction tool for developers who want to get their static sites (blogs or portfolio’s) up and running quick. Get the binary and run it in the directory with the templates and content. Voila! You have your site ready!!
Its key features include:
- Incremental Build Cache: Palya hashes your files and stores a .palya_cache.json ledger. On subsequent runs, it only recompiles files that have actually changed, bringing warm-build times down to ~4ms.
- Compile-Time Syntax Highlighting: Uses syntect to colorize code blocks during the build phase. This means zero client-side JavaScript is required to render beautiful code blocks, eliminating layout shifts and keeping the payload tiny.
- Native Client-Side Search: During the build process, Palya strips Markdown tags and aggregates your content into a highly compressed search.json index. This pairs with minisearch.js to provide instant, fuzzy, offline-capable search directly on the frontend.
- Flexible Jinja2 Templating: Complete freedom over your layout. Palya natively routes content to different templates (post.j2, project.j2, about.j2) based on frontmatter configurations.
- Per-Post Theme Overrides: Support for changing the syntax highlighting color scheme (e.g., from Ocean Dark to GitHub Light) dynamically via frontmatter for specific articles.
Implementation Details
The core build engine processes content iteratively, parsing Markdown into HTML events using pulldown_cmark. During this phase, it intercepts code block events to inject styled HTML nodes, extracts raw text for the search index payload, and routes the final HTML through the Jinja2 engine.
I have discussed more about the working and implementation here
Performance Benchmarks
Refer to this post