Relative links aren't working on "Stuff you need to know" page #172
Labels
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HPR/hpr_generator#172
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I noticed that in https://hackerpublicradio.org/stuff_you_need_to_know.html the heading links, which on this page are the full stop at the end of each heading, are all redirecting to the desired id on the home page https://hackerpublicradio.org/ rather than the current page.
This seems to be because of page.tpl.html line 8, , which expects the current page url, not the site's base url, and seems to be what the browser uses for relative links. Perhaps it's good enough to just get rid of the base element altogether, I haven't set up my environment to run this, so I can't test it right now.
I see what you mean (I think).
If I go to the main
about
page and click on Stuff you need to know. I am sent to https://hackerpublicradio.org/about.html#agreement.However, the (rather strange) full-stop link wants to go to the incorrect link https://hackerpublicradio.org/#agreement.
I'm not clear why the destination of a link like this needs to contain a link that moves to the place you just arrived at, but maybe there's a good reason I don't understand.
Given:
I would be inclined to drop the
<a>
tag entirely:Maybe I'm missing some deep HTML magic here though.
https://hackerpublicradio.org/stuff_you_need_to_know.html should not be on the site any more. It is replaced with https://hackerpublicradio.org/about.html#agreement. This is in an effort to consolidate the documentation as much as possible into the about page.
The full stop is (supposed to be) a self reference to click on to bring it to the same place. This is for when I need to point someone to the documentation and I need a link to that exact location.
Action items for me
I still don't get the full-stop link. In order to click it you have to have the header it's attached to on the page. Clicking it leaves you where you already are! OK, it might shift the page so the header is at the top of the screen but I don't see the point of that!
The actual link target is the
id=agreement
in the header tag. In the newabout
page there's a nice menu at the top that contains links with all of these "fragments". Personally I think that's enough.As I said, maybe I don't use anything where this is a highly desirable feature, but to me it's a waste of effort.
It's there on request of the biggest user of the page by far, namely me.
The menus at the top of the page contains only 14 of the 96 links on the page (and is missing some).
When we get questions about why we do stuff the way we do, and I need to reply with a direct link to the answer.
The steps involved were:
id
"
#
id
value from the buffer.The problems encountered are
#
or pasting the url replaces the url rather than adding to it.#
and so the link doesn't workThe steps involved now are:
This is a lot less error prone and allows me to direct questions to the exact location on the page.