Host Quartz Static Site on Bunny.net with Middleware Script 0 ▲ BurgeonLab 3 hours ago · 7 min read1416 words · Tech · hide · 0 comments PrefaceI wrote a note about an issue I was facing when trying to host my Quartz site on Bunny.net Storage and CDN (affiliate link). I reached out to Bunny support and asked for possible suggestions and went to bed that night. To recap, my problem is: Quartz emits two different HTML file structures depending on page type: Regular pages (e.g. about.md) are output as flat about.html files. Folder/index pages are output like about/index.md, or auto-generated folder listings as folder/index.html and not folder.html. Using Bunny Edge Rules (which are pattern/priority based) to do a flat rewrite will not work because it doesn’t know how to differentiate between the different page types. It cannot do file-system based checks (e.g. try_files in Nginx) nor can it check if a file exists before executing the rewrite rules. This post is relevant for those who are using a static host (can be a provider that is not Bunny Storage) to host their Quartz-built site and want to use Bunny CDN to work… No comments yet. Log in to reply on the Fediverse. Comments will appear here.