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

Build error on github pages: Liquid Exception: no implicit conversion of nil into String #18

Closed
sylhare opened this issue Nov 8, 2017 · 1 comment
Labels

Comments

@sylhare
Copy link
Owner

sylhare commented Nov 8, 2017

So I have a rather generic build fail error on my gh-pages. However everything is working fine on the local host. So it means github fails to build the site, a bummer for a template ...

Here is the error message I got from github:

Liquid Exception: no implicit conversion of nil into String in /_layouts/page.html
           Fatal: TypeError
                    no implicit conversion of nil into String

It seems something is wrong either in my page.html or my _layout folder.

@sylhare sylhare added the bug label Nov 8, 2017
sylhare added a commit that referenced this issue Nov 8, 2017
sylhare added a commit that referenced this issue Nov 8, 2017
sylhare added a commit that referenced this issue Nov 9, 2017
sylhare added a commit that referenced this issue Nov 9, 2017
@sylhare
Copy link
Owner Author

sylhare commented Nov 9, 2017

The problem was because of this on _layout/_page.html :

id="{{ page.title | cgi_escape }}

The proposed solution was to replace it by:

id = {{ page.title | default: "" | cgi_escape }}

So we don't have the nil error. It happened for page without front matter or title. Here are some sources for the answer:

@sylhare sylhare closed this as completed Nov 9, 2017
jougene added a commit to jougene/jougene.github.io that referenced this issue Nov 29, 2017
jougene added a commit to jougene/jougene.github.io that referenced this issue Nov 29, 2017
gmoon92 pushed a commit to gmoon92/gmoon92.github.io that referenced this issue Oct 5, 2021
gmoon92 pushed a commit to gmoon92/gmoon92.github.io that referenced this issue Oct 5, 2021
gmoon92 pushed a commit to gmoon92/gmoon92.github.io that referenced this issue Oct 5, 2021
gmoon92 pushed a commit to gmoon92/gmoon92.github.io that referenced this issue Oct 5, 2021
gmoon92 added a commit to gmoon92/gmoon92.github.io that referenced this issue Mar 8, 2022
gmoon92 added a commit to gmoon92/gmoon92.github.io that referenced this issue Mar 8, 2022
gmoon92 added a commit to gmoon92/gmoon92.github.io that referenced this issue Mar 8, 2022
gmoon92 added a commit to gmoon92/gmoon92.github.io that referenced this issue Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant