Bonum Certa Men Certa

Modifying WordPress to Include Gemini Links in All Articles (Assuming a Canonical URL Form)

Links



Summary: In order to promote the departure from the World Wide Web (where possible and suitable; sites with text don't typically need Web-like features) one can promote the analogous pages in one's Gemini capsule; we suggest a way of doing so in WordPress (the most widely used CMS)

Different sites implement their Gemini (protocol) version differently. We intend to publish all the source code we've produced under the AGPLv3. In the meantime, for WordPress itself, here's what it takes to display to readers the analogous page/address in Gemini. Canonical links are assumed.



"The Web as a whole is problematic and it would help to have the FSF promote Gemini."The change typically requires using one's template of choice (WordPress has templates to separate changes from the "core"). In our case, we've edited single.php to include the Gemini page of a given "single" post. For a site that just uses another protocol but the same URL structure the following may do:

<?php $permalink = get_permalink(); $find = array( 'http://', 'https://' ); $replace = ''; $output = str_replace( $find, $replace, $permalink ); echo '<p>gemini://' . $output . '</p>'; ?>

Change the 'smart' quotes to something "normal".

They key is removing the http/https part, then replacing it with something else ("gemini://gemini." in our case). There's also the preg_replace approach, but it can get a tad problematic:

<?php $gemini = preg_replace('http', '', get_permalink()); echo $gemini; ?>

LinkIn Techrights we've used

<?php $permalink = get_permalink(); $find = array( 'http://', 'https://' ); $replace = ''; $output = str_replace( $find, $replace, $permalink ); echo '<p>This post is also available in <a href="http://techrights.org/gemini/" title="Techrights on Gemini">Gemini</a> over at:</p> <p><u>gemini://gemini.' . $output . '</u></p>'; ?>

It has meanwhile emerged that the FSF, perhaps belatedly, realised that Twitter is no longer acceptable. For reasons we've mentioned since November of last year. The Web as a whole is problematic and it would help to have the FSF promote Gemini. The FSF mostly uses Drupal as a CMS.

Recent Techrights' Posts

EPO's Local Staff Committee Munich Organises General Assembly Next Week, the Goal is to Oust the Corrupt President and Derail His Unlawful Agenda
They're aiming to show Campinos the door
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, September 10, 2026
IRC logs for Thursday, September 10, 2026
Keeping Linux Reliable
If Linux becomes a lot more reliable in the future, we'll know why and who is responsible for it
Latest IBM Gossip is, Over 25,000 People to be PIPed (by Year's End)
That figure, 10%, is different from 15% (what we saw a lot). 10% is over 25,000 staff.
Solidarity at EPO
"Many colleagues have made personal and professional sacrifices by participating in the ongoing strike and work-to-rule action"
Gemini Links 11/09/2026: Culture Stuck, Robot Symphony, and Back to Geminispace
Links for the day
Links 10/09/2026: Facebook Unsafe for Kids, Fake Songs (Against Right of Publicity, CG Forgeries Basically) a Growing Problem
Links for the day
Rust is Financially and Technically Controlled by Microsoft. Rust Foundation is a Front for Microsoft's Proprietary Software.
Rust is not and has never been about security
Gemini Links 10/09/2026: "I Don’t Want to Interact With Stochastic Parrots" and "ROOPHLOCH 2026!"
Links for the day
What the British School Closure (BSN Senior School Leidschenveen) Means to EPO Staff
The only European thing about the EPO is the staff
Standing in Solidarity With Matt Mullenweg
I don't trust the people and companies that want Mullenweg out. Neither should you.
Links 10/09/2026: "Smear Campaign Says Anti-Flock Movement Is Chinese Propaganda" and "Flock Employee Calls Cops on Reporter Filming Them"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, September 09, 2026
IRC logs for Wednesday, September 09, 2026
IBM's Senior VP of Infrastructure is Out, Silent Layoffs Still Going On
Some people imagine the CEO will also "retire" very soon (and "ahead of time")
Gemini Links 09/09/2026: Mechanical Cameras, "Super App", and Prusa Issues
Links for the day
SLAPP Censorship - Part 177 Out of 200: Manosphere Without Financial Transparency
It has moreover replaced a female worker with a male
Deadline Tomorrow (10th of September) to Appeal the EPO's Fleecing of Staff (Union to Make Legal Challenges)
Join them. Fight the good fight.
linuxstans.com Died, Then Came Back as Slop (LLM Junk)
Don't make the mistake or the assumption that merely 'dabbling in' or 'experimenting with' LLMs can be forgivable as it is a trust destroyer
Links 09/09/2026: GAFAM Fatalities in Miami International Airport, "Britain’s Health Crisis Is Becoming a Political Crisis"
Links for the day
Gemini Links 09/09/2026: "Adjective Is Subjective" and Walled Gardens
Links for the day
Plagiarism is Hardly a New Problem, It Predates Mainstream Media Getting Paid to Whitewash It as "Training" or "Hey Hi", Then Conflate Plagiarism With "Intelligence" or Deferred "Value"
"Quantum" isn't new either; it's a 'circle-jerk' for companies without direction, only hype
Links 09/09/2026: Airport 'Down' (Glasgow and Edinburgh), 'Open' 'AI' Losses Rise to Pace of 50 Billion Dollars in Losses Per Year
Links for the day
Unsafe at Any Speed, "Modern" Appliances
Appliances have gotten worse
SLAPP Censorship - Part 176 Out of 200: The Sex-Obsessed Non-Experts
We heard some sexual stories
European Patent Office (EPO): No Transparency and No Paper Trail
The incompetence is that of the management, i.e. sheer incompetence of people who never examined a patent in their entire lifetime
Gemini Links 09/09/2026: Going Out, Smartphone Addiction, Mapping the Geminispace
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, September 08, 2026
IRC logs for Tuesday, September 08, 2026