Skip to content
Snippets Groups Projects
search.json 1.98 KiB
Newer Older
{% if site.baseurl != '/' %}
{% assign base_url = site.baseurl %}
Uwe Jandt (DESY, HIFIS)'s avatar
Uwe Jandt (DESY, HIFIS) committed
{% else %}
{% assign base_url = '' %}
[
  {% for post in site.posts %}
    {

      "title"    : "{{ post.title | escape }}",
Uwe Jandt (DESY, HIFIS)'s avatar
Uwe Jandt (DESY, HIFIS) committed
      "url"      : "{{ base_url }}{{ post.url }}",
      "category" : "{{ post.category }}",
      "tags"     : "{{ post.tags | join: ', ' }}",
      "date"     : "{{ post.date }}",
      "content"  : "{{ post.content | strip_html | strip_newlines | remove_chars | escape }}"

    } {% unless forloop.last %},{% endunless %}
  {% endfor %}
  ,
  {% for page in site.pages %}
   {
     {% if page.title != nil %}
        "title"    : "{{ page.title | escape }}",
        "category" : "{{ page.category }}",
        "tags"     : "{{ page.tags | join: ', ' }}",
Uwe Jandt (DESY, HIFIS)'s avatar
Uwe Jandt (DESY, HIFIS) committed
        "url"      : "{{ base_url }}{{ page.url }}",
        "date"     : "{{ page.date }}",
        "content"  : "{{ page.content | strip_html | strip_newlines | remove_chars | escape }}"
     {% endif %}
   } {% unless forloop.last %},{% endunless %}
  {% endfor %}
  ,
  {% for page in site.spotlights %}
   {
     {% if page.title != nil %}
        "title"    : "{{ page.title | escape }}",
        "url"      : "{{ base_url }}{{ page.url }}",
        "date_added"     : "{{ page.date_added }}",
        "software_type"                 : "{{ page.software_type }}",
        "application_type"              : "{{ page.application_type }}",
        "programming_languages"         : "{{ page.programming_languages }}",
        "scientific_community"          : "{{ page.scientific_community }}",
        "impact_on_community"           : "{{ page.impact_on_community }}",
        "hgf_centers"                   : "{{ page.hgf_centers }}",
        "hgf_research_field"            : "{{ page.hgf_research_field }}",
        "keywords"                      : "{{ page.keywords }}",
        "content"  : "{{ page.content | strip_html | strip_newlines | remove_chars | escape }}"
     {% endif %}
   } {% unless forloop.last %},{% endunless %}
  {% endfor %}