/packages URLs are incorrectly prefixed with "/en/en"
I've just noticed this after firing up a linkchecker over the website. You can see it here, where it fails to load any CSS assets, and all of the links are broken.
After investigating, the reason is because the polyglot plugin prefixes URLs in each page like so:
- Iterate over each Jekyll collection and their pages and fix up their URLs
- Iterate over
# hook to make a call to process rendered documents,
Jekyll::Hooks.register :site, :post_render do |site|
site.collections.each do |_, collection|
site.process_documents(collection.docs)
end
site.process_documents(site.pages)
end
This is all well and good, except that when we run jekyll-fdroid
, it solves its problem by appending each of its generated package .html
files to the sites pages. In addition, it is seen as a "collection" also, so it ends up correcting the URL twice, once for site.process_documents(collection.docs)
and once for site.process_documents(site.pages)
.
This could equally be logged in jekyll-fdroid, but I'm not fussed. I'll continue investigating to get a better picture of what is going on and how to solve it. Perhaps a patch upstream is neccesary, maybe we can just tweak jekyll-plugin and the way it generates pages.