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

Including Liquid code into the .pug file #228

Open
logiamo opened this issue Feb 5, 2023 · 0 comments
Open

Including Liquid code into the .pug file #228

logiamo opened this issue Feb 5, 2023 · 0 comments

Comments

@logiamo
Copy link

logiamo commented Feb 5, 2023

I am trying to get Liquid code running in my .pug file, as I am using gulp.js with jekyll. My goal is to set up a Jekyll loop using Liquid inside the .pug file. This is the following code:

 - {% for posts in site.posts %}
    a(href="" style="background-image: url(https://placekitten.com/100/200)").article-thumb
    .article-meta
        .name Article Name 
        .date Dec 10, 1982
- {% endfor %}

Can someone tell me what is wrong and why it does give me following error:

[14:57:04] Error in plugin "gulp-pug"
Message:
    Error parsing body of the with expression
Details:
    component: src
    babylonError: SyntaxError: Unexpected token (10:1)
    fileName: \_pugfiles\section-articles.pug
    domainEmitter: [object Object]
    domainThrown: false

Wherin line 10 is the following code: .date Dec 10, 1982

Thank you very much!

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

1 participant