0

While generating a Google site map for my (non-github) Jekyll site, I would like to exclude certain files based on the page URL (or file name). In shell-speak, something like

site.pages | grep -v forbidden_name

In Liquid, I imagine a signature something like

site.pages | exclude 'url', forbidden_name

In a related note, is there a catalog of the standard, built-in filters, tags, and generator? Something a bit handier than grep -Rl register_filter ~/.rvm/gems?

jackr
  • 1,407
  • 1
  • 14
  • 29

1 Answers1

1

You can try something like

{% for p in site.pages %}
    {% if p.url contains 'ca' %}
        {% comment %}Do nothing{% endcomment %}
    {% else %}
        {{ p.title }}
    {% endif %}
{% endfor %}

A little hacky an case unsensitive and no wild card.

I've made a list of tags and filters that works on Github.

David Jacquel
  • 51,670
  • 6
  • 121
  • 147