The first three of the following solutions are from my template.
Problem #1
Solution:
Collections:: {% for collection in collections %}#{{collection.name | replace(r/\s+/g, "-") | lower }}{% if not loop.last %}, {% endif %}{% endfor -%}
Collections is an array of objects, so you can’t just put {{collections}}
directly. You have to loop over the elements in the array and apply formatting there.
Note: Replaces whitespace with a dash to keep the collections as one tag, without spaces.
Problem #2
Solution: Use regex like so
{%- set camelRegex = r/([a-z])([A-Z])/g %}
item-type: {{itemType | replace(camelRegex, "$1 $2") | title | trim}}
Problem #3
Solution:
- Install the Creases plugin.
- Append
%% fold %%
after the headings to fold, like so:
## Heading to fold %% fold %%
Problem #4
Solution: Fix your CSS snippet to target callouts using the lowercase color names, as seen in zoteroColors, rather than their hex codes. That’s how your template is set up (the callouts contain the lowercase color name in the header), which is based off this one by @apfelstrudelig: Zotero Integration – Import Templates? - #96 by apfelstrudelig.
Or rather, just download the right CSS snippet from the template author: obsidian-templates/css/litnote-colors.css at main · lguenth/obsidian-templates · GitHub