Host Quartz Static Site on Bunny.net with Middleware Script 0 ▲ BurgeonLab 64 days ago · 7 min read1416 words · Tech · hide · Fediverse post 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… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town