aboutsummaryrefslogtreecommitdiff

Coppewebite

Coppewebite is a project exploring interactions between the Gemini protocol and the web.

  • gemini-to-web: Python library and command-line tools to convert Gemini to web formats, including generating RSS from subscribable gemtext pages.
  • apache-configuration: documentation for configuring Apache httpd to make serve Gemtext as an alternative negotiated content type.
  • gemini-from-http: a Gemini proxy server that proxies all content to an http or https server.

gemini-from-http is particularly useful paired with an Apache httpd server configured to serve Gemtext as an alternative negotiated content type, with HTML content generated by gemini-to-web.

Simple authoring of subscribable websites and Gemini capsules

Making simple websites is not as simple as it seems.

HTML is tedious, requiring nested tags and verbose markup.

Markdown uses lighter markup that is sufficient for text content.

However, both using HTML and Markdown, you will likely require some software to enable features such as RSS feeds. (Writing RSS feeds by hand is inconvenient.)

gemtext has a companion specification for subscribing to gemtext pages that follow a specific format. If a gemtext page contains links with dates, then Gemini software can infer a subscription from the links.

gemini-to-web follows this specification. When converting a subscribable gemtext content, gemini-to-web generates an RSS feed and links it from the generated HTML page.

MultiViews and URLs

Apache httpd supports the MultiViews feature.

With this feature, a URL https://example.com/foo can serve both foo.html for clients that support HTML, and foo.gmi for clients that support the Gemini protocol.

If you don't create links to foo.html nor foo.gmi but to foo, then the same content works well for both content types.

A process for authoring content in Gemini

Write all the website content following the gemtext format, with files with the .gmi extension. In gemtext, make internal links without the extension.

Follow the gemtext subscription specification for pages like blogs that you want to enable people to subscribe to updates for.

Convert all .gmi files to .html using gemini-to-web.

Configure Apache httpd to serve the .gmi and .html files using the MultiViews file.

Configure the gemini-from-http Gemini proxy to serve content from Apache httpd.

By following the previous steps:

  • You only author gemtext pages that are simpler than HTML.
  • Readers can access all content both using the Gemini protocol and traditional web browsers.
  • Readers can subscribe to frequently updated pages both using Gemini software and traditional RSS subscription software.

Additional benefits

Because gemtext is such a simple format, many traditional authoring techniques become easier.

For example, adding a header or a footer to many pages can be done by plain text file concatenation.

gemini-to-web includes an indexer that can generate a reverse-chronological list of articles automatically to simplify maintenance of a blog-like site.

Creating aggregators

This repo contains a few scripts that can help you work with Gemini subscriptions.

#!/bin/sh

echo "# Feeds"
echo

{
    python3 gemget.py gemini://aperalesf.flounder.online/gemlog | python3 parse-feed.py gemini://aperalesf.flounder.online/gemlog "Gemlog de Adrián Perales"
    python3 gemget.py gemini://alex.corcoles.net | python3 parse-feed.py gemini://alex.corcoles.net "El blog es mío"
} | sort -r | head -20 | python3 reparse-feed.py