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

How to disable redirects.json? #189

Closed
TWiStErRob opened this issue Nov 8, 2018 · 10 comments
Closed

How to disable redirects.json? #189

TWiStErRob opened this issue Nov 8, 2018 · 10 comments

Comments

@TWiStErRob
Copy link

Re #147
I updated from an older Jekyll version and now my site has an extra redirects.json file. That lurks into sitemap and rss feed.

Question is simple how can I disable generating that file?

I tried this without luck:

exclude:
  - redirects.json
@TWiStErRob
Copy link
Author

also tried (with and without slash)

defaults:
  -
    scope:
      path: '/redirects.json'
    values:
      sitemap: false

@jekyllbot

This comment has been minimized.

@jekyllbot jekyllbot added the stale label Jan 8, 2019
@TWiStErRob
Copy link
Author

@benbalter @DirtyF do you need some info on this?

@pathawks
Copy link
Member

pathawks commented Jan 8, 2019

I am unable to reproduce this issue in our CI suite. The following test already passes:

it "doesn't contain redirects.json" do
expect(contents).to_not be_nil
expect(contents).to_not match("redirects.json")
end

@TWiStErRob
Copy link
Author

Hmm, I'll have to double check and create a repro then.

@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@KasparEtter
Copy link

Can we please reopen this issue? I don't know much about Ruby and haven't studied the code of this plugin but the following line suggests to me that the file redirects.json is created whenever it doesn't exist without an option to switch this off:

I want to be able to redirect certain pages without exposing all redirected pages to the public. While creating an empty redirect.json in the "source directory" solves this, it isn't a particularly elegant solution.

@jekyllbot jekyllbot removed the stale label Jun 17, 2019
@smkelly
Copy link

smkelly commented Jul 9, 2019

A workaround for this can be accomplished by:

  • Create a redirects.json file. Mine is blank.
  • Add redirects.json to "exclude" In _config.yaml

The first step makes this plugin not generate a destination file since a source one exists. The second step tells Jekyll to not spit out your redirects.json in your destination directory.

Ideally, this plugin should have an option to make this call optional.

@ashmaroli
Copy link
Member

Y'all are welcome to submit a Pull Request.

@dmalan
Copy link
Contributor

dmalan commented Jul 22, 2019

We were just trying to disable this as well, actually. Here's one possible option, #207!

agude added a commit to agude/agude.github.io that referenced this issue Jan 27, 2020
@jekyll jekyll locked and limited conversation to collaborators Jul 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants