Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jekyll-redirect-from gets stuck on "Redirecting..." page #332

Open
tgaff opened this issue Sep 21, 2023 · 0 comments
Open

jekyll-redirect-from gets stuck on "Redirecting..." page #332

tgaff opened this issue Sep 21, 2023 · 0 comments

Comments

@tgaff
Copy link

tgaff commented Sep 21, 2023

I'm working on a site that uses a nested structure. Hydejack has some nice breadcrumbs at the top, however I don't have an index page corresponding to each level.

I wanted to use jekyll-redirect-from (its mentioned in one of the docs) to redirect those missing indexes to a higher level index page. However when clicking the breadcrumb link it gets stuck on the "Redirecting..." page and doesn't redirect. If I manually type in the same URL it redirects correctly.

Digging into hydejack's code and the code in the jekyll-redirect-from gem, it looks like this is part of a redirect setup in hydejack not the gem so I'm reporting here. I'm guessing this has something to do with the pushstate stuff in hydejack (that's a guess though).

Example:

pets/
  index.md
  dogs/
    dog1.md
    dog2.md
  cats/
    cat1.md

In this case I added the following to pets/index.md:

redirect_from:
  - /pets/dogs
  - /pets/cats
  - /pets/dogs/
  - /pets/cats/

In this setup if I visit pets/dogs or pets/dogs/. I'm properly redirected to pets.

However if I visit pets/dogs/dog1 and click the breadcrumb for dogs, I just see a Redirecting... page with the link. That string shows in hydejack code, not in the redirect gem code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant