gulp-pug icon indicating copy to clipboard operation
gulp-pug copied to clipboard

Including Liquid code into the .pug file

Open logiamo opened this issue 2 years ago • 0 comments
trafficstars

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!

logiamo avatar Feb 05 '23 14:02 logiamo