inukshuk / jekyll-scholar

jekyll extensions for the blogging scholar
MIT License
1.13k stars 101 forks source link

github-pages 223 | Error: Liquid syntax error : Unknown tag 'cite' #337

Open ksheersaagr opened 2 years ago

ksheersaagr commented 2 years ago

Hi, I'm getting this error -> " github-pages 223 | Error: Liquid syntax error (line 78): Unknown tag 'cite' " while deploying. Locally, the citations generate perfectly, I don't understand why it's failing while deploying. I've tried methods mentioned in the issues -> #142 #162 and #194 respectively but had no luck. If you could guide me towards anything that helps that will great. Thanks liquid syntax cite

ksheersaagr commented 2 years ago

Update: I've found out why it's happening - "GitHub pages will mistake certain characters, specifically curly braces, as Jekyll objects, tags, etc. causing your page build to fail. The solution is to create an empty file .nojekyll in your root folder." Reference: https://stackoverflow.com/questions/40176947/jekyll-page-build-failure But if I add the .nojekyll file to the root directory, it corrupts the whole website lol. Need to find out a specific solution for this!

inukshuk commented 2 years ago

I think you're trying to push the page straight to GitHub pages? This can't work, because the jekyll-scholar Gem is not installed on GitHub. To serve the page on GitHub pages you will have to push the compiled page instead. There are multiple ways to do this. Basically, build locally and push the compiled site; keep sources in a branch and push only the compiled site to the main branch, etc.; you can automate this using GitHub Actions to end up with a similar setup as regular GitHub pages. This isn't specific to jekyll-scholar, it's the same for every GitHub page that wants to use jekyll plugins beyond the default set that's pre-installed on GitHub.

Deep0Thinking commented 1 year ago

As @inukshuk mentioned, here is the list of plugins that Github Pages site supports. "GitHub Pages cannot build sites using unsupported plugins. If you want to use unsupported plugins, generate your site locally and then push your site's static files to GitHub." from About GitHub Pages and Jekyll.

And here is a solution to a similar question that may help: Use jekyll-toc plugin on Github Pages posted by David Dong.

GiveMeAnApple99 commented 1 year ago

Update: I've found out why it's happening - "GitHub pages will mistake certain characters, specifically curly braces, as Jekyll objects, tags, etc. causing your page build to fail. The solution is to create an empty file .nojekyll in your root folder." Reference: https://stackoverflow.com/questions/40176947/jekyll-page-build-failure But if I add the .nojekyll file to the root directory, it corrupts the whole website lol. Need to find out a specific solution for this!

Hi, I wonder if you have solved this problem?It's confusing me now😭