🐫Bill Seitz Twin Pages

Bill Seitz has this notion of TwinPages in his digital garden. Compare with interwiki.

for the current page, show which Sister Sites have a page with the same Wiki Name

a service called "Twin Pages", which can tell you which other wikis and digital gardens have pages with the same name.

Bill's widget

You can embed a twin pages widget on your own site by adding this snippet:

<div id="twin_pages" style="border:1px; vertical-align:top; horizontal-align:center">
<script src="http://www.wikigraph.net/twinpages.js" referrerpolicy="unsafe-url"></script>
<noscript>Please enable JavaScript to view the TwinPages</noscript></div>

The problem with is that it is not secure: it fetches a script from a different domain. Well, it might be secure in this particular case, but in general, it is not. That's why Safari blocks it by default. This security policy can be turned off, but I do not want to. The widget works well if I turn off the policy.

I want to embed the same widget on Melanocarpa, yet I do not want to use this very snippet. Therefore, I am writing my own server-side wrapper.

Related pages:

Example

Visit Bill's article about digital garden:

If your browser allows it, look at the TwinPages section at the bottom. You will see a link to my site.

Here's how to generate this widget.

curl -H "Referer:http://webseitz.fluxent.com/wiki/DigitalGarden" "http://www.wikigraph.net/twinpages.js"

So, the file twinpages.js is generated dynamically depending on the referer. Try visiting it from the browser, it will fail:

Implementation

So, how do I write a wrapper?

The Les Arbres URLs below are not true.

  1. GET https://lesarbr.es/dynamic/twin-pages-seitz?title= lets you fetch a JSON of twin pages for the given title.

  2. GET https://lesarbr.es/dynamic/twin-pages-seitz-widget.js contains the code, that will safely call the first URL, generate HTML and insert it where needed.

Looks ok to me. Note that the first URL can be used by everyone, and other people in the twin pages network could utilise it. They could also copy the second and self-host it for privacy.