Quantcast
Channel: Recent Gists from vsoch
Viewing all articles
Browse latest Browse all 30

Data.json served at https://github.com/USRSE/community-template/blob/master/pages/data.json

$
0
0
data.json
---
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 %}
}
index.html
---
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>

Viewing all articles
Browse latest Browse all 30

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>