life-itself / community

👋 Life Itself's community home with forum, projects and website.
https://lifeitself.org/
16 stars 11 forks source link

New website setup using substack and static site in combination #1075

Open rufuspollock opened 3 weeks ago

rufuspollock commented 3 weeks ago
### Tasks
- [x] Cloudflare worker revert proxy script **🚧2024-04-27 https://dash.cloudflare.com/2e945b31b891a1119d506f82b065df2c/workers/services/edit/lifeitself-dotorg-proxy/production**
- [ ] Analyse pages we have on the site so we can work if we need to proxy all of them **🚧2024-04-28 https://docs.google.com/spreadsheets/d/1UYz-oZooKO5e2Smh6CSEBBT8dBLVoDgr_hHaY47EBJo/edit#gid=0**
- [ ] New cloudflare worker https://dash.cloudflare.com/2e945b31b891a1119d506f82b065df2c/workers/services/edit/dotorg-proxy/production

v3

Idea is ...

### Tasks
- [x] What are substack urls? **✅2024-04-28 see below. think i have everything**
- [ ] Create and test proxy
- [ ] Can we disable the signup prompts on most pages? **maybe ... Writer Dashboard -> Settings -> Publication details -> Subscribe prompts on post pages (on/off). Subscribe prompts may include modals, pop-ups, and other ways to encourage readers to subscribe to your publication. (There are several other toggles that control similar settings as well).** **💬2024-04-29  there's no way to disable generally afaict and several online reports confirm it can't be disable.** See also https://www.citationneeded.news/substack-to-self-hosted-ghost/

Substack pages

/
/about
/p/ for pages,
/t/ for tags
/s/ for sections
/archive # for post archive page ...

2nd Effort: ...

Sources

Important facts

Plan

graph LR

flowershow[Flowershow]

request --> proxy[Cloudflare]
proxy --default--> substack[Our Substack]
proxy --"if /"--> flowershow

v1: substack at suburl ❌

This failed because it turns out setting up substack at a suburl is really painful and perhaps impossible.

This documents where we got to ...

graph LR

request --> proxy[Proxy]
proxy --if /blog--> substack[Our Substack]
proxy --"otherwise"--> donothing[do nothing i.e. render our current site]

This failed because it turns out substack calls /api/v1/... stuff and expects that to be there.

Proxying /api/v1 worked pretty well ...

rufuspollock commented 3 weeks ago

NTS about how to handle the reverse proxy