← Back to docs

Guestbook hosting

Guestbook hosting

Tools can host multiple separate public guestbooks. /guestbook is the Tools default/demo guestbook. Other books receive their own slug and public URL.

Create a guestbook

Administrators can create a guestbook directly from the main guestbook administration page at /admin/guestbook. The same creation form is also available on the full hosting manager at /admin/guestbook/hosting.

Enter:

  • Name - public title, for example Miazma.
  • Slug - URL identity, for example miazma.
  • Theme - tools, miazma or terminal.
  • Active - whether the book is active in Tools.
  • Publicly hosted - whether the book is actually exposed publicly on its slug.
  • Site URL, Site language and Site / guestbook description - optional context for the site and expected guestbook content.

Creating a guestbook from /admin/guestbook keeps the administrator on the main guestbook page so the new book can immediately be selected as an import destination. Use /admin/guestbook/hosting for full guestbook management, including editing, embed information, purging entries and deleting a book.

An active and publicly hosted book with slug miazma is available at:

https://tools.tornevall.net/guestbook/miazma

Theme and guestbook identity are separate. /guestbook/miazma selects the Miazma data. ?theme=miazma only selects presentation.

Existing imported legacy books are listed on the hosting page and can be assigned the correct slug and theme without importing them again. Imported books are not published automatically. Publicly hosted must be enabled explicitly.

JavaScript embed

Each publicly hosted book has a JavaScript endpoint:

https://tools.tornevall.net/guestbook/{slug}/embed.js

A minimal embed only needs the script tag placed where the widget should appear:

<script src="https://tools.tornevall.net/guestbook/miazma/embed.js"></script>

When no target is supplied, the script creates a container next to the script tag automatically.

To render into a specific element, use target:

<div id="miazma-guestbook"></div>
<script src="https://tools.tornevall.net/guestbook/miazma/embed.js?target=miazma-guestbook"></script>

Supported query parameters:

  • target - element id where the guestbook should render.
  • limit - number of entries, normally 10 and at most 50.
  • theme - temporary presentation override: tools, miazma or terminal.

Example:

<div id="miazma-guestbook"></div>
<script src="https://tools.tornevall.net/guestbook/miazma/embed.js?theme=miazma&limit=10&target=miazma-guestbook"></script>

The embed renders inside Shadow DOM so the guestbook CSS does not interfere with the surrounding site.

Public entries can show a country flag next to the visitor's location. Tools derives only the country code and flag server-side from the private source IP using the local MaxMind GeoLite2 lookup. The raw IP and detailed GeoIP data remain private. If no country can be resolved, no placeholder is shown. DNSBL status remains available for moderation and administration but is not rendered as public commenter decoration.

Signing

The JavaScript embed is a public read view. It contains no Tools API key and does not expose e-mail addresses or visitor IP addresses.

The Read or sign the guestbook link opens the full hosted guestbook on Tools. Signing happens there and is protected by Cloudflare Turnstile.

This allows a normal external website to embed a guestbook with a script tag without storing any secret in the browser.

Tools default guestbook

The Tools guestbook remains available at:

https://tools.tornevall.net/guestbook

Its global embed remains available at:

https://tools.tornevall.net/guestbook/embed.js

Hosted guestbooks are filtered by guestbook_id and are not shown in the Tools default guestbook.