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

Error with img Tag #4

Closed
WLDO opened this issue Jan 7, 2016 · 12 comments
Closed

Error with img Tag #4

WLDO opened this issue Jan 7, 2016 · 12 comments

Comments

@WLDO
Copy link

WLDO commented Jan 7, 2016

Hi, First off, thank you for the amazing work. Im still a novice developer so please excuse me,
I get the following error after building the site with github pages:
"Your site is having problems building: The tag img in _posts/2015-12-20-deep.markdown/#excerpt is not a recognized Liquid tag"
So far my research says I should Use "rake generate" and "rake deploy" to fix this problem but I think this is for Octopress sites only. Have you seen this before?

@nicnocquee
Copy link
Owner

Do you have the _plugins/images.rb file? The img tag is in that file.

@WLDO
Copy link
Author

WLDO commented Jan 7, 2016

yes that file exists.

@WLDO
Copy link
Author

WLDO commented Jan 8, 2016

I can confirm the site builds perfectly on my FTP server. So this is just a Github Pages issue. We can close this since I have a work-around for now.
Thanks again for this great tool!

@fedelcar
Copy link

I'm having the same issue when trying to use Github Pages. Is there any incompatible plugin? Or is it a configuration issue that can be worked around so as to use github.io ?

@nicnocquee
Copy link
Owner

I actually use github page as well for delightfuldev.com. can you show me the markdown post that causing this error so I can try it?

@fedelcar
Copy link

The page build failed with the following error:

The tag imgin_posts/2015-12-20-deep.markdown/#excerpt is not a recognized Liquid tag. For more information, see https://help.github.com/articles/page-build-failed-unknown-tag-error.
(I didn't modify the post file in any way)

@nicnocquee
Copy link
Owner

Ok, I think I know what happened. Did you guys add Gemfile with the following content?

source 'https://rubygems.org'
gem 'github-pages'

and safe: false in _config.yml, then build using bundle exec jekyll build?

There are two problems here:

  1. safe: false makes Jekyll ignore the plugins in the _plugins directory.
  2. Unfortunately, you will bump into different error by removing safe: false: jekyll 2.4.0 | Error: uninitialized constant Jekyll::Hooks. This happens because github-pages gem is using jekyll 2.4.0, while my img tag plugin uses Jekyll::Hooks which seems only available in jekyll 3.0.1.

So what I propose is:

  1. Remove the Gemfile
  2. Remove safe: false from _config.yml
  3. Build the site using jekyll build. Make sure jekyll --version returns jekyll 3.0.1. Update jekyll if needed.
  4. Push the built site in _site directory to Github Pages. I'm using Octopress 3.0 to do this. Check out the deployment using Octopress here. Basically just run octopress deploy init git git@github.com:user/project, edit _deploy.yml if needed, then run octopress deploy to deploy it to Github Pages.

@fedelcar
Copy link

Thanks for the help! This seemed to work, as github does not report any errors, but I'm guessing it is not picking up the plugins, showing just the raw html. (You can see it here)
Any ideas as to why?

@nicnocquee
Copy link
Owner

Apparently I didn't handle if Appolo is not in root url. I'm fixing it but I'll push the update as soon as I get a decent internet connection :)

nicnocquee pushed a commit that referenced this issue Jan 21, 2016
@fedelcar
Copy link

I just tried again with the latests commits and I'm still not having any luck with this.
I cloned your repo, ran jekyll build then octopress deploy init git git@github.com:user/project, edited deploy.yml to point to the gh-pagesbranch and finally octopress deploy
The site was uploaded to the github repo, but Iwhile the page is building, it only shows raw html, with no style. (You can check it out here)
Any idea about what am I doing wrong? I don't have a gemfile in the directory, and I didn't set the safe:false option either.

@nicnocquee
Copy link
Owner

Can you try the newest commit, and set the baseurl in _config.yml to /portfolio/. Then jekyll build and publish again?

I tested with a dummy project page here and the corresponding repo here.

@fedelcar
Copy link

fedelcar commented Feb 8, 2016

Yup, that worked! Thank you very much both for the great work you've done and the help! Congrats!

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

3 participants