-- Leo's gemini proxy

-- Connecting to michaelnordmeyer.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

Links in General


There are two different linking styles: absolute and relative linking.


The chosen style makes a difference.


Relative Linking


Relative links are tempting, because they take care of themselves. It doesnʼt matter for a page in which directory it is located. `.` will always load the current index.gmi, while `..` will always load to index.gmi of one level up, assuming both files exist. But this creates a problem.


Compare both options:


=> / Home
=> /sub-directory/ Sub-Directory Index

=> .. Home
=> . Sub-Directory Index

While relative links like `.` in the latter case would correctly go to the index page of this sub-directory, Gemini clients might not highlight those as visited properly. Because a user coming from the home page has to select “/sub-directory/” to navigate to the sub-directory. But on the sub-directoryʼs index.gmi, this very same link is called `.`. While it is semantically the same, itʼs textually different.


To make this matter even worse, consider more than two levels of sub-directories:


=> ../.. Home
=> .. Sub-Directory Index
=> . Sub-Sub-Directory Index

If those sub-sub-directories are being moved, the whole navigation has to be changed.


To avoid this problem altogether, links should always start from the root having absolute links.


Absolute Linking


=> / Home
=> /sub-directory/ Sub-Directory Index
=> /sub-directory/sub-directory/ Sub-Sub-Directory Index

While those links have to be maintained, an ordinary text editor can be used to easily replace those “=> /sub-directory/ Sub-Directory Index” with a new “=> /new-sub-directory/ Sub-Directory Index”.


“=> / Home” is always correct, regardless on which page it is.


The problem with this approach, however, is the duplication of keywords. If the sub-directory is gemlog, for example, then a search for gemlog on a search engine with turn up all gemlog posts instead of just the index of the gemlog.


Closing Notes


Again, it looks like, after carefully considering all options, it seems best to choose the simplest version: donʼt have any navigation and rely on the clientʼs ability, and – when linking locally – have absolute links to not break linking on file movement.


I created a couple of templates, which show visually how those navigation links can be placed on pages, and the pros and cons of those placements:


Gemtext Page Templates

-- Response ended

-- Page fetched on Sat May 11 15:56:03 2024