Drogon's CSP template system
clehaxze.tw·4d
✏️Code Editors
Preview
Report Post

2026-01-05

Drogon’s CSP template system

This blog relies heavily on Drogon’s CSP (C++ Server Page) system - think of it as PHP’s templating engine, but written in C++. It’s not the most modern choice in 2026, especially since CSP predates C++ coroutines. But it’s good enough for the static-ish pages I serve, and more importantly, it lets me avoid mandatory JavaScript without going with string hacking. An Tao originally built it back when the Drogon project began- likely for something resembling a classic bulletin board system. Consider this post being me writing a guide on what CSP does in proactice and well as me double checking my understanding.

At its core, CSP is just a template engine. While it’s mostly used to generate HTML, there’s no technical barrier preventing…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help