PyHPy is a static website generation framework, built on top of the Python-powered Mako templating engine.
Static is Beautiful
Static webpages have some very nice features:
Static is Fast. Nothing is faster than serving a static page. A static website can easily survive huge traffic spikes.
Static is Immortal. Once a static webpage is online, it almost never breaks. No maintenence is required to keep them online. They handle server upgrades, library updates, and host migrations with ease.
Hacker-Proof. A static page never introduces any extra security vulnerabilities. Much, much safer than a dynamic site.
Easy to Host. Static websites are supported by every web host.
Mako is Awesome
I chose to build this framework on top of Mako for the following reasons:
Mako can produce any kind of output -- not just webpages. Therefore, you can use PyHPy for any kind of static output generation. (I like general solutions.)
Mako's powerful template inheritence makes it easy to create consistent, scalable websites, no matter how large your site gets.
Small Feature Set. Helps you to learn it quickly.
PyHPy Makes it Easy
PyHPy combines powerful tools like
mako-render, and adds a layer of convenience and integration on top.
MarkDown Integration. Just type your content text into an
.mdfile and it becomes a beautiful webpage. Easy enough for my Mom.
Improved Error Reporting. When things go wrong, PyHPy produces very detailed and helpful error reports, allowing you to pin-point the cause of the problem with minimal effort.
TODO: I need to write more details that are specific to PyHPy. Get rid of the Expires Header and FontAwesome stuff -- anybody can do that. I need to answer the question: does PyHPy actually solve a real problem? Why would I use it over Blogofile? ...Or Pelican? Or Jekyll? Do I plan to support ReStructuredText? Do I have easy ability to use themes from elsewhere? ...I guess PyHPy is supposed to be a good general solution to static output generation, and therefore doesn't have the ability to focus on any of those domain-specific goals. Need to demonstrate awesome, realistic use cases that the other systems just can't do. Also seems like PyHPy actually has a much simpler model than Blogofile/Nikola. Much less structured --> less to learn to get started.
Here's the typical process of building a site with PyHPy:
- Create content (like MarkDown), Mako templates, and static files (like images) in an
make. Content and templates are rendered, and the results are published to an
- View the output in a web browser. If you're not totally happy with the result, GOTO 1.
- Upload the
outputdirectory to your web server using
The best way to start learning PyHPy is to read through the included
1-input/, which produces this website. You can also read the documentation articles that are included in the demo blog. If you have questions, send them to Christopher Sebastian.
View the Demo Photo Album
View the Demo Blog