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

Guard against invalid or missing URLs #199

Merged
merged 4 commits into from
May 1, 2017
Merged

Conversation

benbalter
Copy link
Collaborator

Fixes #198.

@benbalter benbalter requested a review from DirtyF April 28, 2017 15:48
Copy link
Member

@DirtyF DirtyF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with an invalid path for page.image with image: .\wrong\path

There's no warning on the console, the wrong path is included in the generated page metadata :

<meta property="og:image" content="http://localhost:4000/.%5Cwrong%5Cpath" />
{"@context":"http://schema.org","@type":"BlogPosting","headline":"Welcome to Jekyll!","image":"http://localhost:4000/.%5Cwrong%5Cpath","…

@benbalter
Copy link
Collaborator Author

@DirtyF what would you expect the behavior to be? My intention here was to prevent the build from failing due to invalid or missing URLs. If a user provides an invalid URL right now, we output it to the best of our ability, even if it's wrong (or isn't live, etc.).

@DirtyF
Copy link
Member

DirtyF commented May 1, 2017

@benbalter OK then it's fine, you're right people are responsible for what they enter and can rely on tools like html-proofer and CI to prevent invalid paths.

Copy link
Member

@DirtyF DirtyF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Image Invalid path does not prevent the site from buidling.

@benbalter benbalter merged commit a28cff0 into master May 1, 2017
@benbalter benbalter deleted the nil-image-path-fix branch May 1, 2017 15:32
@jekyll jekyll locked and limited conversation to collaborators Apr 30, 2019
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.

Liquid Exception: undefined method `absolute?' for nil:NilClass
3 participants