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

"Software Libre con Richard Stallman"
Dr. Stallman has at least 8 public talks this month and next month
Monopolies/Monopsonies Run by the Head of State, Not CEOs, to Manage a Pyramid Scheme the Head of State Profits From
The bailouts for Intel resulted in yet more buybacks
GAFAM (and Microsoft) Hiring Freeze, Even in India
Boohoo, as if we expect a company that tells 60,000 existing workers to leave would actively pursue new workers
 
A Growing Consensus That Microsoft Mass Layoffs Are Weeks Away (Impacting Those Among the 60,000 Told to Leave But Would Not Leave)
There appears to be a growing consensus around this
What GrapheneOS Talks About is a Crackdown on Users Who Try to Maintain Control Over Their Digital Devices and Their Lives
They don't want freedom to become "mainstream" [...] more users of GNU/Linux now pursue rootkits, DRM etc.
Abolishing or Cancelling Microsoft's Restricted Boot
We'll soon start a new series and resume several (there are three ongoing ones)
"Certificate" "Authorities" (CAs) in Geminispace: Linux Foundation Down to Less Than 0.1%, or Less Than 10% Of All CAs
Ideally we'll pursue real security, not outsourcing, and decentralisation, not a censorship hub controlled by the cartel of CAs
Gemini Links 23/11/2026: Lungs Transplant, Androidification of Open Source, Gemini Protocol on the M5Stack CardputerZero, Slop Ban Hammer
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, November 23, 2026
IRC logs for Monday, November 23, 2026
Gemini Links 23/11/2026: Why Inline Links in GemText Are a Great Thing, Geminispace as Another Internet Revival, Dealing With Slop Scrapers
Links for the day
Links 23/11/2026: Slop Pyramid Scheme Reinstates Slop Pope and "Europe Needs to Save Itself"
Links for the day
IBM Does Not Need "Resource Actions" Anymore (IBM's Internal Euphemism for Job Cuts or Mass Layoffs), It Just Treats Staff Like "Zeroes" and Pushes Staff Out
IBM terms like "RAs" and "workforce rebalancing" (reduction) are just self-serving spin/optics
Harassment by Proxy in America - Part III - Perjury at the Human Rights Tribunal of Ontario (HRTO)
"I think [redacted] is trying to bait you into saying something about him so that he can complain to the police again."
linuxandubuntu.com (LinuxAndUbuntu) and anto.online Became Slopfarms
It's a big problem for the Web and on the Web
Links 23/11/2026: Fakecoins Creators Schmoozing the Democratic Party, "Your Life is Not a Lie", Nvidia Faces US Probe for False Accounting
Links for the day
Gemini Links 23/11/2026: Thanksgiving Week, Offensive and Defensive Pride, The Oppenheimer Alternative
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, November 22, 2026
IRC logs for Sunday, November 22, 2026
Intel: Bailed Out by American Taxpayers (Without Their Consent), Laying Off About 10% of Its Workers (Again)
Microsofters had killed Intel from within
Gemini Links 22/11/2026: Dungeon and Health Trauma
Links for the day
GNU/Linux and Apple Eat Microsoft's Lunch in New Zealand
GNU/Linux and ChromeOS grew this past year
Last Week for IBM RAs or Silent Layoffs Before It's "December" or "Holidays" and Hence Not Tactful to Announce Mass Layoffs
It seems unlikely that an RA will be talked about in December
Problems at Broadcom. It Rode the "Hey Hi Wave" for Years. Now the Shares Are Down From $500 to Less Than $300.
Buy popcorn, not Broadcom shares
Slop Bots Have Wrecked Analytics
The sad story of schestowitz.com
Richard Stallman (RMS) Still Manages People and Projects, Linus Torvalds Plays With Chatbots and Slop
Seems like a demotion for Torvalds
The Register MS "Charges 30, 50K Quid Minimum for Anything Involving an Advertiser"
It is circular
GPUs Don't Cost Much to Manufacture; Their Market Value is Set by a Cartel
Notice who's petitioning for Jensen to return to NVIDIA as CEO
Outages and 60,000 Workers Told to Leave: What Insiders Say About Microsoft and What Might Happen Next
trouble for Microsoft is only just beginning
Gemini Links 22/11/2026: No Antimemetics Division and Switching Gemtext Converters
Links for the day
Links 22/11/2026: Demonstrations in France Carry on and USPTO Surveillance With New Walls ("Patent Public Search Login Requirement: No More Anonymous Searching")
Links for the day
Links 22/11/2026: "The Bubble is Bursting" and "The Anthropic Bubble"
Links for the day
Andy Explains the 'Ritual' of Buy Nothing Day
old article about Buy Nothing Day
A List of Nadella's Accomplishments at Microsoft
Two weeks ago (exactly 2 weeks) everyone believed that Jensen was an excellent CEO too
Richard Stallman Gives a Talk in Guayaquil Tomorrow
Richard Stallman (RMS) is giving many talks in Ecuador, then he'll give several talks in Mexico as well
A Week After Microsoft Outages Windows is Measured at Only ~60% in North American Desktops/Laptops
Microsoft gives 2 more weeks for 60,000 of its own workers to announce they're leaving
Techrights Was Never a Political Site, It Deals With Mostly Technical Topics
There are people who try to weaponise politics to accomplish bad things inside or against the community
Harassment by Proxy in America - Part II - Decades of Misusing the Human Rights Tribunal of Ontario (HRTO)
We had seen this for quite some time
Techrights '30 Years Ago'
Don't mock people for still offering HTTP (not HTTPS-only) as an option
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, November 21, 2026
IRC logs for Saturday, November 21, 2026