Hidden variable in github _data \ frontmatter - Liquid Templating #51900
Replies: 3 comments
-
|
I was looking in the wrong data-file |
Beta Was this translation helpful? Give feedback.
-
|
It is an opportunity to enhance CapCut's template management system. This proposed feature seeks to streamline metadata handling within CapCut templates, aligning it with Liquid Templating principles. By doing so, users can expect a more efficient and user-friendly experience when customizing templates, including titles, descriptions, and effects. This improvement aims to make CapCut's template system more accessible to both beginners and experienced users, ultimately leading to a smoother and more organized workflow for content creators and video editors. This integration between GitHub and CapCut templates strives to enhance the overall editing experience and template customization within the CapCut app. |
Beta Was this translation helpful? Give feedback.
-
|
I am also encountering this issue. I’m working on a similar setup, combining frontmatter tags and a CSV data file, and I’ve noticed that for some posts, the tags don’t display as expected either. In my case, it seems like the logic for combining post.tags with the CSV data isn’t always catching everything, particularly for certain posts. I’ve been experimenting with tweaking how the related and parent tags are assigned and pushing them, but there’s still one post that won’t show its tags. If anyone has suggestions or has faced something similar, any tips would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Issue using liquid templating language along with frontmatter and a csv datafile.
Body
I have some code in "archive-single.html" an include which is used to display
title,description,excerpt,tags, and some other metadata, for a given post.Additionally, it checks whether the post is included in a csv data file and combines some of those elements with the
post.tagsfrontmatter before displaying all of those tags.This is all going well except for 1 post doesn't display tags as expected. This post doesn't display them at all!
Frontmatter: relevant variables (full source)
CSV Data file: relevant elements of row (full source)
archive-single.html: relevant liquid (full source)
{% if post.name %} {% assign tags = Nil%} {% assign sorted_tags = Nil%} {% for company in site.data.companys %} {% if post.name == company.name %} {% if company.parent %}{% assign tags = company.parent | push: post.name %}{% endif %} {% if company.related != Nil %} {% if company.related contains ';'%} {% assign related = company.related |split: ';' | push: post.name %} {% else %} {% if tags != Nil %} {% assign tags = tags | push: company.related %} {% else %} {% assign tags = company.related %} {%endif%} {% endif %} {% endif %} {% if tags != Nil %} {% assign sorted_tags = tags | concat: post.tags | uniq | compact | sort %} {% else %} {% assign sorted_tags = post.tags | push: post.name | uniq | compact | sort_natural %} {%endif%} {% endif %} {% endfor %} {% else %} {% assign sorted_tags = post.tags | uniq | compact | sort %} {% endif %} {% for tag in sorted_tags %} <div class="tags">{{ tag }}</div> {% endfor %}I'm at a loss. Been pecking at this code all night. Made tons of progress, fixed many bugs.. but this one.. idk.
I've continued to edit the code to make it more explicit, less vague. regardless, this one page isn't showing me tags!!!
Website: decentralized-id.com
TLDR: Why isn't this list of tags showing?
Beta Was this translation helpful? Give feedback.
All reactions