question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

String Filters For Output from YAML Not Working

See original GitHub issue

I have this line where I spit out some categories…

{{#category "client"}}
    <li>{{ data.tags }} <a href="#{{data.title}}">{{data.title}}</a></li>
{{/category}}

Issue I’m running into is the fact I cannot filter the output like so…

{{ capitalize data.tags }}

Here’s the link to my current Gulp file https://github.com/grayghostvisuals/site/blob/development/gulpfile.js

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
grayghostvisualscommented, Jun 30, 2017

@doowb Figured it out. Before I updated Assemble I was fixing it with CSS. Works as it should now. Thanks for checking.

0reactions
doowbcommented, Jun 30, 2017

@grayghostvisuals I’m trying to reproduce the issue that you’re having, but every place I add {{uppercase data.tags}} the rendered html has all uppercase characters there so I’m not sure where the issue is occurring without more information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

yaml filter generates potentially bad output with single line ...
I was using some jinja templating in a state. It looks like this: /etc/foobar.cfg: file.managed: contents: {{ (salt['pillar.get']('blah', ...
Read more >
Ansible: How to fix to_nice_yaml output quotation and line ...
The to_yaml and to_nice_yaml filters use the PyYAML library which has a default 80 symbol string length limit. That causes unexpected line ...
Read more >
Using filters to manipulate data - Ansible Documentation
Filters let you transform JSON data into YAML data, split a URL to extract the hostname, get the SHA1 hash of a string,...
Read more >
Tips, Tricks, Troubleshooting - yq - GitBook
String blocks and newline issues. There are a couple of tricks to getting the right string representation, take a look at string operators...
Read more >
2 practical ways to use filters to manipulate data in Ansible
This article looks at some practical ways you can use filters. 1. Assign a value to a variable when it was not provided....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found