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

Microsoft Killed the Term "Open Source" (by Bribing/Taking Over OSI, 'Linux' Foundation Etc.) and Now It Needs to Kill the Brand Linux (Because Windows Just Won't Run!)
Why else would Microsoft falsely describe Windows as "Linux" and "Open Source"?
Slopwatch: Liars for Microsoft, Plagiarism, and IBM Red Hat Markets Slop as "AI"
Today was a bad day news-wise
Slopwatch: Slopfarms 'Think' Redis is "Linux" (RedisRaider)
Today we'll keep it short and to the point again
 
Bigots and Lunatics Who Attack Microsoft Critics, Projecting Their Own Bigotry by Accusing Others of Imaginary Things (Which They're Innocent Of)
"In psychology, projection refers to assigning your negative traits or unwanted emotions to others without being aware you’re doing it."
"The Appeals Committee [at the EPO] Unanimously Stated a Formal Flaw in the Consultation of the General Consultative Committee (GCC) on the Reform"
It's a truly horrifying situation
Links 21/05/2025: Climate Problems and Ceasefires No Longer Foreseen
Links for the day
Gemini Links 21/05/2025: "Shrimps of Doom" and "ASCII-graphs"
Links for the day
Links 21/05/2025: GitHub Becoming Slop, MElon as a Drug Addict Considered National Security Risk
Links for the day
IBM Has Allegedly Just Sacked Mr. McKinsey (McK), Clay Cowan, Its Fourth CMO in a Few Years
To insiders he represented the company that's killing IBM or advising IBM on how to self-destruct
Gemini Links 21/05/2025: Trips, 4D Golf, and Writing Software
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, May 20, 2025
IRC logs for Tuesday, May 20, 2025
Links 20/05/2025: Biden's Cancer, GDPR Changes, and UK Defamation Cases (or SLAPPs) Fail Again
Links for the day
Microsofters Targeting the Wife of the Critic of Microsoft
false claims and loaded statement
Links 20/05/2025: "Bankrupt 23andMe Just Sold Off All Your DNA Data" and "Free Speech Warriors" MIA
Links for the day
Microsoft a Top Sponsor at Red Hat Summit (IBM Selling Proprietary Spyware and Back Doors in a "Red" Trench Coat)
They both work for Microsoft
Openwashing of Windows, Back Doors, Persistent Surveillance, Keyloggers, Screen Loggers, DRM and So On
WSL is not "Linux", it's Windows
New 'Interview' With - or Talk Coverage of - Richard Stallman in the European Union
automated English translation
IBM Mass Redundancies Likely This Coming Thursday
We're not in a position to judge if that's true or false
Gemini Links 20/05/2025: LLM Scraper Bots in Gopher and "Starmer and the Somewheres"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, May 19, 2025
IRC logs for Monday, May 19, 2025
Skype Fell Off a Cliff (Microsoft Killed It), All Microsoft Has Left Now is Slop and Spaghetti Code
"This isn’t about AI. This is a puppet show to drive stock prices up and down."
The Official SUSE Blog Uses LLM Slop to Compose Fake Articles Promoting Microsoft and Azure
even a little slop spoils the broth
Slopfarms (Machine-Generated Fake News Sites Authored by Bots With Slop Images) Spread GNU FUD
This isn't about Linux (GNU doesn't run just on Linux)
United States Federal Government's Digital Analytics Program (DAP): GNU/Linux Users Represent Close to 6% of Visitors This Year
How far has GNU/Linux gotten? Very far!
The "LLM Ouroboros of Shit" is Complemented by Even Worse Phenomena Caused by Microsoft's Contribution of SPAM and Pollution
Microsoft became a world leader in promotion of LLM slop
The LLM Ouroboros Phenomenon
Fact #1: over time slop gets worse (training set is like some blurry JPEG). Fact #2: People's "smell" for slop improves over time, as they 'train' on slop and can detect it based on prior encounters. Put 1 and 2 together.
Links 19/05/2025: Charges of Blackmailing Over Son Heung-min, Chad Opposition Leader Detained
Links for the day
Gemini Links 19/05/2025: Ableism, Silicon Monkeys, and More
Links for the day
How We Defeated DDoS Attacks
One of the best things one can do is migrate to an SSG
Microsofters Issuing Threats to Microsoft Critics Who Blog About Microsoft
So far we see that their "legal strategy" revolves around trying to discredit people like Theodore Ts'o
Links 19/05/2025: Political Catchup and CISA Advisories
Links for the day
TheLayoff.com Has Begun Deleting Trolls/AstroTurfers Infesting the IBM Section to Discourage On-Topic Discussion About Culls and Maladministration (Bad Strategy)
Moderators have realised there's a problem
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, May 18, 2025
IRC logs for Sunday, May 18, 2025