Skip to content

support links in text-based browsers #1725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SeanMooney
Copy link

@SeanMooney SeanMooney commented Apr 14, 2025

This change modifies the list template to add
an additional to the article header.

The existing a tag uses the entry-link css class
to make the containing article cliable by forcing
position: absolute in combination with an empty
anchor element <a class='entry-link'></a>

This has the effect of making the entire article
clickable to navigate in a graphical browser however
it is not rendered in a text-based browser.

To correct this the title text in the article header
is wrapped in a second tag. The entry-link css
class is not applied and default css is inherited.

Closes: #1716

What does this PR change? What problem does it solve?

Was the change discussed in an issue or in the Discussions before?

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

This change modifies the list template to add
an additional <a> to the article header.

The existing a tag uses the `entry-link` css class
to make the containing article cliable by forcing
`position: absolute` in combination with an empty
anchor element `<a class='entry-link'></a>`

This has the effect of making the entire article
clickable to navigate in a graphical browser however
it is not rendered in a text-based browser.

To correct this the title text in the article header
is wrapped in a second <a> tag. The `entry-link` css
class is not applied and default css is inherited.

Closes: adityatelange#1716
@SeanMooney
Copy link
Author

SeanMooney commented Apr 14, 2025

https://imgur.com/a/w7T32Ct

i have uploaded a screenshot of my blog using this theme with the master behavior and the behavior form this pr.

This is using the EWW text browser built into Emacs to render the site with the local Hugo development server

This change makes the titles on archive lists
a tags so that they are clickable in text only mode.
As with the list template, no class is applied
to ensure correct indentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Post list links should render as links in text-based browsers
1 participant