Using a base uri is breaking linking to local images #235
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HPR/hpr_generator#235
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?
With
<base href="https://hackerpublicradio.org/">
set local images<a href="hpr4282_1.jpeg">
are not been displayed on a page https://hackerpublicradio.org/eps/hpr4282/index.html removing it and the css fails.The
eps.notes
must have images linked locally and so displayed when the index page for the episode is displayed.After the redesign the only place the shownotes will be displayed is on the epidode index page
eps/hpr????/index.html
, and the main page will only display a summaryI see the issue. The <link href="./css/hpr.css" rel="stylesheet" /> should be <link href="/css/hpr.css" rel="stylesheet" /> (i.e. don't use a relative path but absolute path). That should fix when using the base href. Although the setting the base should really only be done when trying to view files locally through your browser and not viewing through a webserver.
I will take a look at this and put in a PR when I have a tested fix.
I haven't test, but thinking about the issue and things observed while developing the generator, when using the base tag then any relative src or href paths need to be relative to the href set in the base tag. So either the img or a needs the full path relative to the base or the base path for that page must include the path to the relative folder.