\documentclass{article}

\usepackage[a4paper]{geometry}

\title{ Linking tags to Wikidata }

\author{ Sam Wilson }

\date{ 2021 June 7 (Monday), 5:46AM }

\begin{document}
\maketitle
\tableofcontents

I've recently added support to my website for linking posts' tags to Wikidata entities. This means that each tag (which has it's own URL at \texttt{samwilson.id.au/Tnn} where \texttt{nn} is the tag ID) can be linked to a Wikidata ID, and have a little table of facts displayed. This means that tags are no longer just strings, but are firmly linked to a meaningful concept — a tag such as 'York' is definitely the town in Western Australia and not the one in Yorkshire. No two tags are allowed to be linked to the same Wikidata item.

The other part of this work was adding a lookup widget to the tag entry form field. Before, it was just a text box and tags had to be entered with semicolons separating them. Now, you start typing and a dropdown appears with suggestions firstly from existing tags on the site and then below them with labels and descriptions of Wikidata items. It makes entering new tags much easier.

It's great fun going back through my archives and linking all the tags, although it's also highlighting the fact that I often create duplicate tags (e.g. misspellings, or \texttt{Fremantle Railway Station} vs \texttt{Fremantle Train Station}). To add a tag-merging system I first need to add a system of tracking and redirecting old URLs (something I should've added ages ago when I added the ability to delete duplicate posts).

\end{document}
