Skip to content

Latest commit

 

History

History
92 lines (80 loc) · 3.22 KB

search.md

File metadata and controls

92 lines (80 loc) · 3.22 KB
layout
base

{% include _includes/default-header.html %}

Search Tutorials

{% icon search %}
<script src="assets/js/search-script.js" type="text/javascript"></script> <script> var data= [ {% for topic in site.data %} {% unless topic[0] == 'contributors' %} {% assign topic_material = site.pages | topic_filter:topic[0] %} {% assign topic_title = topic[1].title %} {% for tutorial in topic_material %} {% capture result_entry %}
{{ tutorial.title | escape }}
{{ topic_title}}

{{tutorial.description}}

{% if tutorial.tags %}

{% for tag in tutorial.tags %}

{{ tag }} {% endfor %}

{% endif %}

{% include _includes/contributor-badge-list.html contributors=tutorial.contributors %}

View Tutorial
{% endcapture %} { "topic" : "{{ topic_title }}", "title" : "{{ tutorial.title | escape }}", "description": "{{ tutorial.description }}", "question" : "{{ tutoral.questions | join: ', '}}", "objectives" : "{{ tutorial.objectives | join: ', ' }}", "tags" : "{{ tutorial.tags | join: ', ' }}", "level" : "{{ tutorial.level }}", "time_estimation": "{{ tutorial.time_estimation }}", "url" : "{{ site.baseurl }}{{ tutorial.url }}", "level" : "{{ tutorial.level}}", "contributors": "{{ tutorial.contributors | join: ', '}}", "entry" : "{{ result_entry | strip_newlines | replace: '"',"'" }}" }{% unless forloop.last %},{% endunless %} {% endfor %} {% unless forloop.last %},{% endunless %} {% endunless %} {% endfor %} ] var sjs = SimpleJekyllSearch({ searchInput: document.getElementById('search-input'), resultsContainer: document.getElementById('results-container'), json: data, limit: '25', noResultsText: ("No result found!"), success: function(){}, searchResultTemplate: '{entry}' }); window.addEventListener('DOMContentLoaded', (event) => { params = (new URL(document.location)).searchParams; paramQuery = params.get('query'); if(paramQuery){ document.getElementById('search-input').value = paramQuery; sjs.search(paramQuery); } }); </script>

{% include _includes/default-footer.html %}