OK, got images working via Cloudfront. That required a little more hackery of the source code. I tried adding a 'cdn' var to my config file but the config logic didn't pick up the new value for some reason, so I've had to hardcode it for now. I'll figure it out later when I can be bothered.

I'm hoping I can fairly easily merge upstream into my source when @dev@microblog.pub makes updates. Otherwise things might start getting ugly when the code starts to diverge significantly.

in reply to this note

@s@u.sdj.au Hey! I should be able to add a special key in the config and make it available in all the templates (like extra_config). Would that help?

in reply to this note

@dev@microblog.pub @dev@microblog.pub that sounds awesome. also, another thing I ended up doing was hacking headers['content-security-policy'] in main.py to allow some other sources (js / css / fonts from cdns). If that could somehow be configurable that would be amazing!

in reply to this note

@s@u.sdj.au I's already the case! See https://docs.microblog.pub/user_guide.html#custom-content-security-policy-(csp)

It's a recent addition requested by @ash@acegiak.net who also works on a custom theme 😺.

in reply to this note

@dev@microblog.pub @ash@acegiak.net oh awesome! time to try my first merge from upstream then 😅

in reply to this note

@dev@microblog.pub @ash@acegiak.net merging from upstream worked nicely. I'll see if I can get my head around pushing pull requests back to sourcehut in case I feel I have anything worthy of contributing (maybe the simple modification I made to proxied_media_url in media.py to support swapping in a cdn).