11ty / eleventy-base-blog

A starter repository for a blog web site using the Eleventy static site generator.
https://eleventy-base-blog.netlify.app/
MIT License
1.21k stars 619 forks source link

The tag `set` on line 3 in `archive.njk` is not a recognized Liquid tag #87

Closed Newman5 closed 2 years ago

Newman5 commented 3 years ago

I got the following build error:


The page build failed for the `master` branch with the following error:

The tag `set` on line 3 in `archive.njk` is not a recognized Liquid tag. For more information, see https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#unknown-tag-error.

For information on troubleshooting Jekyll see:

  https://docs.github.com/articles/troubleshooting-jekyll-builds

If you have any questions you can submit a request on the Contact GitHub page at https://support.github.com/contact?repo_id=327490455&page_build_id=225549798

Any help is appreciated. I got the build to work by deleting the 'archive.njk' file. I saw that both Liquid and another template language are used. Perhaps this is the problem? I'm new to this and this is my first 11ty site.

ArturoAP commented 3 years ago

I was having the same issue, It's probably failing because your github page repository is configured to build the site from jekyll source, since we're using a different generator we have to do things a bit differently.

What I did to solve the issue was to add an empty .nojekyll file to the root, this tells github pages that you are using your own static site generator and will run the build on the generated pages instead of the source.

After that I configured my repo on github to build the site from the /docs folder (documentation here) and on my .eleventy.js file I setup the output to docs.

I then ran eleventy on the terminal and pushed the newly generated files to github after a couple of seconds my site was up and running.

On a side note if you're also configuring a domain name make sure to include the CNAME file in the docs folder as well.

zachleat commented 2 years ago

I added a .nojekyll file to this project to hopefully avoid this for folks in the future! Thanks!