bridget icon indicating copy to clipboard operation
bridget copied to clipboard

Make the fetching of `index.json` unaffected by URL parameters

Open huyhoang8398 opened this issue 9 months ago • 3 comments

Step to reproduce

  1. Embed link to any 3rd party platform: ie: facebook, instagram, etc
  2. click the link from these
  3. https://huyhoang8398.github.io/photos/?fbclid=IwY2xjawJH_wJleHRuA2FlbQIxMAABHRYukMcjx4gkumpKr2vYCYN8ZHNfSpPxjtlKnf8fz1GJi210BgJVICuDiA_aem_8O4EodCDkGnM75ul8oXEnA
  4. for example facebook add some arg at the end of the url and it broke my link

Expected behaviour

working without any issue

Actual Behaviour

Image nothing show

Logs

No response

Addition details

No response

Hugo version

0.145.0

Bridget version

require github.com/Sped0n/bridget/v2 v2.0.5 // indirect

OS version

linux

Verify steps

  • [ ] Pull request is welcome. Check this if you want to start a pull request
  • [x] I have searched on Issue Tracker, No duplicate or related open issue has been found
  • [x] Ensure there is only one bug report in this issue. Please make mutiply issue for mutiply bugs

huyhoang8398 avatar Mar 19 '25 19:03 huyhoang8398

for example facebook add some arg at the end of the url and it broke my link

then it is facebook's problem

hugo is a ssg, and only pre-defined paths are guaranteed to be generated(no dynamic router), if anything mess around with the url, there is a possibility that indexing might broke

maybe you can try redirect(301) as a escape hatch


btw i see the link u provided works fine, it seems u find a way to get around? if it is i can close the issue

Sped0n avatar Mar 29 '25 06:03 Sped0n

for me it is still not working well, you have to refresh the page or click the correct tab, otherwise when you moving your cursor, nothing seems appear

huyhoang8398 avatar Apr 08 '25 07:04 huyhoang8398

can add a url filtering to index.json fetching in js and move the sharing resources(css/font) under root url, then i think this issue and #473 can be both solved

will try to work on this after my summer internship

Sped0n avatar Apr 08 '25 12:04 Sped0n

sorry to keep you waiting, should be fixed by https://github.com/Sped0n/bridget/releases/tag/v2.1.0

feel free to reopen this issue if any problems persist

Sped0n avatar Nov 11 '25 18:11 Sped0n