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
File content is listed without liquid processing, if its name goes after the listing file #6465
Comments
My bug description seems to be a little bit complicated, so see the code and the demo: |
Seems to be some kind of output-loop prevention. |
This comment has been minimized.
This comment has been minimized.
This occurs because the Renderer hasn't parsed the liquid in those files yet. My proposal to fix this would be to store the information on the |
That seems like a complicated flow to me.. if there are multiple listing pages (edge-case) then there might be instances of multiple IMO, a "listing" page ought to be specially designated and as such generated towards the end of the build process.. similar to how |
I think we need to take the approach of on-demand generation. When a Liquid drop requests a Page/Document’s content, it should receive the compiled output. We have a dependency chain mapped a little in our regenerator, but it isn’t fully fleshed out yet. I was talking with @mneumegen about making regeneration on-demand, and this seemed like a good approach to us. /cc @jekyll/performance |
@parkr Just so i understand do you mean if i use |
@Crunch09 Yes! |
This comment has been minimized.
This comment has been minimized.
Not stale, do you need anything from me to fix/reproduce this? |
Reproduced on latest Jekyll, any help welcome to make sure all files are processed before outputing the index file. |
I am having a similar problem though in my case the pages are not processed in a strictly alphabetic order. Also it's not only about rendering liquid - markdown is not rendered into HTML either. |
I've a similar problem. But for me it's within _includes. I'm using lunr. This is the code I use within Therefore I think the part with dependencies @parkr mentioned isn't working (anymore) either. {% assign counter = 0 %}
var documents = [{% for page in site.pages %}{% if page.url contains '.xml' or page.url contains 'assets' %}{% else %}{
"id": {{ counter }},
"url": "{{ page.url | absolute_url }}",
"title": "{{ page.title }}",
"body": "{{ page.content | markdownify | replace: '\','\\\\' | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}, {% endif %}{% endfor %}{% for page in site.without-plugin %}{
"id": {{ counter }},
"url": "{{ page.url | absolute_url }}",
"title": "{{ page.title }}",
"body": "{{ page.content | markdownify | replace: '\','\\\\' | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}, {% endfor %}{% for page in site.posts %}{
"id": {{ counter }},
"url": "{{ page.url | absolute_url }}",
"title": "{{ page.title }}",
"body": "{{ page.date | date: "%Y/%m/%d" }} - {{ page.content | markdownify | replace: '\','\\\\' | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %}
}{% if forloop.last %}{% else %}, {% endif %}{% endfor %}]; |
@agowa338 Are you using Jekyll 4.2.0? gem 'jekyll', github: 'jekyll/jekyll' If that's not possible, try downgrading to Jekyll 4.1.1 |
Yes, I was using Jekyll 4.2.0. I now also tried |
My Reproduction Steps
foo.html
) containing a loop forsite.pages
and outputting their{{ page.content }}
foo0.html
,fop.html
,google.html
orjazz.md
etc.).bar.html
,baz.md
orfon.html
etc.){% include %}
,{% assign %}
etc.)The Output I Wanted
When opening 'index' page in browser, I expect to see both 'prior' and 'later' pages content with liquid constructs processed.
Actually, liquid contructs are only processed in 'prior pages content', and left 'as is' (e,g, unprocessed) in 'later' pages.
Details:
site.pages
outputting theirpage.content
,fop.html
will have its content output unprocessed in both pages)The text was updated successfully, but these errors were encountered: