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

Enhance detection of conflicting destination URLs #8459

Merged
merged 5 commits into from
Nov 8, 2020

Conversation

ashmaroli
Copy link
Member

  • This is a 🙋 feature or enhancement.
  • I've added tests.

Summary

Currently on master, the build process detects conflicting URLs. But it is limited to just pages and posts.
The proposed change extends the detection to all documents and static files.
Also, improves the readability of the warning message:

   URL Conflict: The destination "jekyll/tmp/jekyll/_site/puppies/2009/03/27/rover.html" is the same for the following:
                  - jekyll/tmp/jekyll/_posts/2009-03-27-rover.markdown
                  - jekyll/tmp/jekyll/_puppies/rover.md

@ashmaroli ashmaroli added this to the 4.2 milestone Nov 6, 2020
@ashmaroli ashmaroli requested a review from a team November 6, 2020 12:13
@ashmaroli
Copy link
Member Author

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit ce441d3 into jekyll:master Nov 8, 2020
@ashmaroli ashmaroli deleted the detect-conflicting-urls-better branch November 8, 2020 16:15
jekyllbot added a commit that referenced this pull request Nov 8, 2020
@DirtyF
Copy link
Member

DirtyF commented Nov 8, 2020

@ashmaroli I now get a warning, that does not make sense on my personal site:

          Conflict: The following destination is shared by multiple files.
                    The written file may end up with unexpected contents.
                    /Users/frank/code/frank.taillandier.me/_site/_redirects
                     - /Users/frank/code/frank.taillandier.me/_redirects
                     - /Users/frank/code/frank.taillandier.me/_redirects

@ashmaroli
Copy link
Member Author

@DirtyF Looks like this change exposed a bug present elsewhere.
Could you open a new issue ticket for this?

Preliminary investigation shows that the file ./_redirects is initialized twice. (i.e. 2 instances of Jekyll::StaticFile for the same file).
Need to investigate if a plugin is initializing the double or Jekyll core itself.

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

Successfully merging this pull request may close these issues.

None yet

3 participants