A simple blog engine and static site generator written as an Azure Durable Functions code sample
This is an Azure Functions sample that demonstrates how to build a static site generator with durable functions to take raw markup files and render them to a static Azure website:
All you need to do is upload your Markdown/Textile files to Azure storage, and they’ll be rendered into a nicely formatted web site. You can even use OneDrive to do that automatically for you.
The current demo site is here (may be temporarily broken as I build this out).
This was originally part of an “ETL” blob storage processing pipeline and intended to demonstrate how to process thousands of XML/CSV files in a scalable way and insert them into a database as they were uploaded.
But the general principle behind that kind of transformation pipeline is exactly the same as a static site generator, and handling text and image content also provides opportunity to incorporate Azure Cognitive Services and other fun things, so I turned the original pipeline into something of more general interest - i.e., a fully serverless static file generator.
Incidentally, you can run this completely inside the Azure Free Tier!
This sample currently assumes you’ve performed the following provisioning actions via the Azure Portal:
StorageV2 (general purpose v2)
Static website
feature and made sure the $web
container has public access enabledConfiguration
-> All Settings
-> Deployment Center
and activated Local Git
deployment via Kudu (re-visit that pane after configuration to get the Git URL and credentials)If you feel like contributing, this is a rough roadmap/To Do list that matches what I usually need from a static file generator and some Azure-specific features that I intend to implement given time:
renderTableActivity
to render YAML data into nice tables/blog
)renderTemplateActivity
)Since Azure Functions is usually deployed with Application Insights enabled, you can do real-time monitoring and tracing, as well as per-activity metrics: