Digital-Humanities-Quarterly / dhq-journal

DHQ is an open-access, peer-reviewed journal of digital humanities.
http://www.digitalhumanities.org/dhq/
10 stars 5 forks source link

Fix more broken links #68

Closed amclark42 closed 2 months ago

amclark42 commented 4 months ago

Fixing more broken links found during static site generation. Most of the things fixed here were problems in the main DHQ site as well as my static copy.

I also replaced the alt text on the image that forms the border of the left-hand sidebar. Since it's decorative, the @alt attribute has an empty string indicating that screen readers should ignore it.

juliaflanders commented 3 months ago

Ash, two comments:

  1. For the Announcements links, I am not sure the update here will fix the real problem, which is that old announcements get moved to a separate file (announcements_archive.html). So those links will still be broken, even though the file path is now more correct.
  2. For the title/author indexes: articles that don't have volume/issue information in their headers would only be either unpublished (i.e. in the internal preview area) or broken--either way, they should not be showing up in the author/title indexes. Could you say more about this scenario and what you found that made this change seem practically as well as theoretically useful?
juliaflanders commented 3 months ago

Addendum--we can pull in these changes and then @jawalsh can separately go in and just remove the Announcements link in the left sidebar, which is obsolete.

amclark42 commented 3 months ago

@juliaflanders Okay! I'll leave the Announcements removal to @jawalsh.

Some context for item 2: Articles without volumes or issues did in fact yield broken links. These articles had been published, but their <teiHeader>s were missing the necessary information to generate the links. Since Cocoon relies on the TOC to determine which articles go to which issue, this was only a problem on the indexes. I assumed that, since the articles have been published, they should still be listed in the index, even if they can't be linked to. (The function of the index is not just to link but also to list, imo.)

Honestly, I would rather remove the <a> entirely when articles are erroneously published without a volume or issue number. However, because the indexes' stylesheets use a lot of XSLT 1.0 to do some complex stuff (complex for XSLT 1.0, anyway), I did not feel great about adding a lot of additional complexity to the code. I limited myself to only taking the @href off the <a>. When we upgrade these stylesheets to XSLT 2.0 or higher, we should definitely revisit what happens to articles with erroneous data.

Tl;dr: I felt it was more important to remove the programmatically-generated broken link now. But I also created an issue signaling that we should come back to these stylesheets and upgrade them later.

I'm sorry that I never let you know which articles were missing their volume/issue metadata, though. They're 000735 and 000664 — you can find them in the Title index by searching the page for v n.