From 5cb04d59c1d0d8bbab99d02cd3bcf155aaf3a800 Mon Sep 17 00:00:00 2001 From: jungle Date: Mon, 8 Jan 2024 11:37:29 -0800 Subject: [PATCH] doc suggestion from IRC #pico.sh @ libera.chat [10:25am] pareidoliac: I have had problem with the docs apart from the minor detail that the "-> yourusername" should be "-> {username}-myproject" in the https://pgs.sh/help#custom-domain section. [10:25am] pareidoliac: thinking of making a PR to suggest that [10:29am] pareidoliac: also suggest mentioning the CSP policy pico.sh vs custom domain in the https://pgs.sh/help#spa section [10:44am] erock: happy to accept PRs --- pgs/html/help.page.tmpl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pgs/html/help.page.tmpl b/pgs/html/help.page.tmpl index a6285203..e57ca56e 100644 --- a/pgs/html/help.page.tmpl +++ b/pgs/html/help.page.tmpl @@ -136,6 +136,13 @@ pgs supports SPAs! Upload a _redirects file your project:

/*  /index.html  200
+ +

+ Note that the Content Security Policy (CSP) for pages in the pgs.sh domain + prohibits javascript from connecting to other origins. + Pages served by custom domains do not have this restriction. +

+
@@ -154,10 +161,11 @@
CNAME subdomain.yourcustomdomain.com -> {{.Site.Domain}}

Resulting in:

subdomain.yourcustomdomain.com.         300     IN      CNAME   {{.Site.Domain}}.
-

And a TXT record to tell Prose what blog is hosted on that domain at the subdomain entry _pgs

-
TXT _pgs.subdomain.yourcustomdomain.com -> yourusername
+

And a TXT record to tell Prose what project is hosted on that domain at the subdomain entry _pgs

+
TXT _pgs.subdomain.yourcustomdomain.com -> username-myproject
+

E.g. for user 'erock' and project 'kittens' the result would be:

Resulting in:

-
_pgs.subdomain.yourcustomdomain.com.         300     IN      TXT     "hey"
+
_pgs.subdomain.yourcustomdomain.com.         300     IN      TXT     "erock-kittens"
{{template "marketing-footer" .}}