data.json
index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: null | |
excluded_in_search: true | |
permalink: /data.json | |
--- | |
{ | |
{% for post in site.pages %}{% unless post.excluded_in_search %}{% if added %},{% endif %}{% assign added = false %} | |
"{{ site.title | slugify }}-{{ post.url | slugify }}": { | |
"id": "{{ site.title | slugify }}-{{ post.url | slugify }}", | |
"title": "{{ site.title }}: {{ post.title | xml_escape }}", | |
"categories": "{{ site.github_username }},{{ site.institution }},{{ post.categories | join: ", " | xml_escape }}", | |
"url": "{{ site.baseurl }}{{ post.url | xml_escape }}", | |
"content": {{ post.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }} | |
}{% assign added = true %}{% endunless %}{% endfor %}{% for post in site.people %}{% unless post.excluded_in_search %}{% if added %},{% endif %}{% assign added = false %} | |
"{{ site.title | slugify }}-{{ post.url | slugify }}": { | |
"id": "{{ site.title | slugify }}-{{ post.url | slugify }}", | |
"title": "{{ site.title }}: {{ post.name }} - {{ post.title | xml_escape }}", | |
"categories": "{{ site.github_username }},{{ site.institution }},{{ post.categories | join: ", " | xml_escape }}", | |
"url": "{{ site.baseurl }}{{ post.url | xml_escape }}", | |
"content": {{ post.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }} | |
}{% assign added = true %}{% endunless %}{% endfor %} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: home | |
permalink: / | |
--- | |
<!-- This template discovers and parses the data.json files from the GitHub Organization --> | |
<!-- https://github.com/USRSE/find-an-rse/blob/master/pages/index.md--> | |
## Find a Research Software Engineer | |
<formaction="{{ site.baseurl }}/" method="get"> | |
<inputtype="search" name="q" id="search-input" placeholder="Find an RSE?" style="margin-top:5px" autofocus> | |
<inputtype="submit" value="Search" style="display: none;"> | |
</form> | |
<p><spanid="search-process">Loading</span> results <spanid="search-query-container" style="display: none;">for "<strongid="search-query"></strong>"</span></p> | |
<ulid="search-results"></ul> | |
<scriptsrc="{{ site.baseurl }}/assets/js/lunr.min.js"></script> | |
<scriptsrc="{{ site.baseurl }}/assets/vendor/jquery/jquery.min.js" ></script> | |
<script> | |
(function(){ | |
window.data={} | |
$.getJSON("https://api.github.com/orgs/{{ site.github_username }}/repos",{ | |
format: "json" | |
}).done(function(data){ | |
console.log("Found repos starting with {{ site.prefix }}:") | |
$.each(data,function(key,value){ | |
if(value.name.startsWith("{{ site.prefix }}")){ | |
console.log(value.name); | |
vardataurl="{{ site.domain }}/"+value.name+'/data.json' | |
console.log(dataurl) | |
$.getJSON(dataurl,{ | |
format: "json" | |
}).done(function(pages,status){ | |
if(status=="success"){ | |
$.each(pages,function(key,value){ | |
window.data[key]=value; | |
}); | |
} | |
}); | |
} | |
}) | |
}); | |
functionloadSearch(){ | |
console.log(window.data) | |
varfileref=document.createElement('script') | |
fileref.setAttribute("type","text/javascript") | |
fileref.setAttribute("src","{{ site.baseurl }}/assets/js/search.js") | |
document.getElementsByTagName("head")[0].appendChild(fileref) | |
} | |
setTimeout(loadSearch,1000); | |
})(); | |
</script> |