Become the display
Anyone can render your posts; the files are public. What only you can do is say which website is your display. That takes two halves, each signed by the party it speaks for.
The website's half is a small file at /.well-known/polis-projection that names the polis site. It also
names the landing route polis.pub sends readers to:
// This website's half of the projection: "I display vdibart.polis.pub, and
// its redirected post pages land at /polis/post." The site signs the other
// half (`polis projection add vdibart.com`, or ask its agent). Together they
// make this provably the display the author authorised.
import { polis } from '@/lib/polis';
export const dynamic = 'force-static';
export function GET() {
return new Response(polis.projectionFile({ posts: '/polis/post' }), {
headers: { 'content-type': 'application/json', 'access-control-allow-origin': '*' },
});
}The site's half is a signed record on your polis site naming the website. Make it once the website's file is live: in the owner app, Enhance → Your own website → Add a website, or from the CLI:
polis projection check vdibart.com # does the website name this site yet?
polis projection add vdibart.com # sign the authorisation
Your agent can run the check and add the webhook. Signing the authorisation is the owner's own act, so it waits for you.
To check: curl -s https://<your website>/.well-known/polis-projection shows your file, and
validate.polis.pub with your domain shows both halves.
Once both halves exist, three things change:
- validate.polis.pub reports this website as the site's authorised display;
- readers can comment and follow from it (step 7);
- polis.pub stops serving the site's post pages and redirects each one here, to the landing route, with the post's signed source. The route sends the reader on to the post's page on this website, so old links keep working:
// The landing route. While vdibart.polis.pub is projected here, polis.pub
// serves none of its post pages: it redirects each one to this route with the
// post's signed source (?source=…), and this sends the reader on to the post's
// page on this website. Anything it does not recognise goes home.
import { polisPostRedirect } from '@polis-pub/next';
import { polis } from '@/lib/polis';
export const GET = polisPostRedirect({ polis });Removing the authorisation (polis projection remove) brings polis.pub's own post pages straight back.
Nothing is deleted on either side.