Stream: IG creation
Topic: Getting markdown lists to work right
Jean Duteau (Mar 27 2019 at 18:40):
I'm struggling to understand why the following code doesn't produce a list:
{% for sd_hash in site.data.structuredefinitions -%}
{%- assign sd = sd_hash[1] -%}
{%- if sd.name contains "Base" -%}
- {{sd.name}}
{%- endif -%}
{%- endfor -%}
The first item gets a list bullet, but all of the remaining items just get appended on so it looks like:
- Item 1- Item 2- Item 3
And does someone know what tags exist in site.data.structuredefinitions? I know of name and path, but how do I find the other tags available?
Grahame Grieve (Mar 27 2019 at 19:04):
to find out what else is available, look in [temp]\data
Grahame Grieve (Mar 27 2019 at 19:04):
I can't imagine why it's not being processed as a list. check that carriage return?
Grahame Grieve (Mar 27 2019 at 19:04):
(\n)
Jean Duteau (Mar 27 2019 at 19:05):
to find out what else is available, look in [temp]\data
Ah perfect!
Grahame Grieve (Mar 27 2019 at 19:06):
it might be _data - anyway, those things are just processing the files in the standard jekyll data directory
Eric Haas (Mar 27 2019 at 19:15):
you have too much white space control {%- vs {%- vs {% and -%} vs %}
try removed some hashes
Jean Duteau (Mar 27 2019 at 19:15):
you have too much white space control {%- vs {%- vs {% and -%} vs %}
try removed some hashes
Yep, just figured that out. :)
Eric Haas (Mar 27 2019 at 19:17):
there are also a ton of premade lists already but this method is handy to filter for just what you want
Jean Duteau (Mar 27 2019 at 19:18):
there are also a ton of premade lists already but this method is handy to filter for just what you want
Yeah, I want to take the base resource profile list and break it down into three different sections, so I figured this was the easiest way.
Jean Duteau (Mar 27 2019 at 19:21):
there are also a ton of premade lists already but this method is handy to filter for just what you want
Is there a list somewhere of the premade lists?
Grahame Grieve (Mar 27 2019 at 20:21):
see IG publisher documentation
Last updated: Apr 12 2022 at 19:14 UTC