Skip to content

Commit

Permalink
Fix URLs in RSS feeds (LycheeOrg#1732)
Browse files Browse the repository at this point in the history
URLs in RSS feeds are "https://example.com/#xyzzy/aabbcc". This works in
default installations, however the canonical URL to albums (and photos)
starts with "/gallery", so these URLs should be
"https://example.com/gallery#xyzzy/aabbcc".

When using the landing page, URLs even _need_ to include "gallery",
otherweise all of the RSS URLs only show the landing page.
  • Loading branch information
nicokaiser committed Jan 26, 2023
1 parent 0b973da commit ac503be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Actions/RSS/Generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function __construct(PhotoQueryPolicy $photoQueryPolicy)
private function create_link_to_page(Photo $photo_model): string
{
if ($photo_model->album_id !== null) {
return url('/#' . $photo_model->album_id . '/' . $photo_model->id);
return url('/gallery#' . $photo_model->album_id . '/' . $photo_model->id);
}

return url('/view?p=' . $photo_model->id);
Expand Down

0 comments on commit ac503be

Please sign in to comment.