Skip to content

Commit

Permalink
Add files from bin/lesson_initialize.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaiacs committed May 6, 2017
1 parent 05c5ae8 commit 6cbc024
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 11 deletions.
23 changes: 12 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,22 @@ and to meet some of our community members.

## Where to Contribute

1. If you wish to change this example lesson,
please work in <https://github.com/swcarpentry/lesson-example>.
This lesson documents the format of our lessons,
1. If you wish to change this lesson,
please work in <https://github.com/swcarpentry/FIXME>,
which can be viewed at <https://swcarpentry.github.io/FIXME>.

2. If you wish to change the example lesson,
please work in <https://github.com/swcarpentry/lesson-example>,
which documents the format of our lessons
and can be viewed at <https://swcarpentry.github.io/lesson-example>.

2. If you wish to change the template used for workshop websites,
3. If you wish to change the template used for workshop websites,
please work in <https://github.com/swcarpentry/workshop-template>.
The home page of that repository explains how to set up workshop websites,
while the extra pages in <https://swcarpentry.github.io/workshop-template>
provide more background on our design choices.

3. If you wish to change CSS style files, tools,
4. If you wish to change CSS style files, tools,
or HTML boilerplate for lessons or workshops stored in `_includes` or `_layouts`,
please work in <https://github.com/swcarpentry/styles>.

Expand Down Expand Up @@ -102,8 +106,7 @@ you may want to look at
[How to Contribute to an Open Source Project on GitHub][how-contribute].
In brief:

1. The published copy of the lesson is in the [episodes][episodes] directory
in the `gh-pages` branch of the repository
1. The published copy of the lesson is in the `gh-pages` branch of the repository
(so that GitHub will regenerate it automatically).
Please create all branches from that,
and merge the [master repository][repo]'s `gh-pages` branch into your `gh-pages` branch
Expand Down Expand Up @@ -137,14 +140,12 @@ You can also [reach us by email][contact].
[dc-lessons]: http://datacarpentry.org/lessons/
[dc-site]: http://datacarpentry.org/
[discuss-list]: http://lists.software-carpentry.org/listinfo/discuss
[example-site]: https://swcarpentry.github.io/lesson-example/
[github]: http://github.com
[github-flow]: https://guides.github.com/introduction/flow/
[github-join]: https://github.com/join
[how-contribute]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
[issues]: https://github.com/swcarpentry/lesson-example/issues/
[repo]: https://github.com/swcarpentry/lesson-example/
[issues]: https://github.com/swcarpentry/FIXME/issues/
[repo]: https://github.com/swcarpentry/FIXME/
[swc-issues]: https://github.com/issues?q=user%3Aswcarpentry
[swc-lessons]: http://software-carpentry.org/lessons/
[swc-site]: http://software-carpentry.org/
[episodes]: _episodes
36 changes: 36 additions & 0 deletions aio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: page
permalink: /aio/
---
<script>
window.onload = function() {
var lesson_episodes = [
{% for episode in site.episodes %}
"{{ episode.url}}"{% unless forloop.last %},{% endunless %}
{% endfor %}
];
var xmlHttp = []; /* Required since we are going to query every episode. */
for (i=0; i < lesson_episodes.length; i++) {
xmlHttp[i] = new XMLHttpRequest();
xmlHttp[i].episode = lesson_episodes[i]; /* To enable use this later. */
xmlHttp[i].onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var article_here = document.getElementById(this.episode);
var parser = new DOMParser();
var htmlDoc = parser.parseFromString(this.responseText,"text/html");
var htmlDocArticle = htmlDoc.getElementsByTagName("article")[0];
article_here.innerHTML = htmlDocArticle.innerHTML;
}
}
episode_url = "{{ page.root }}" + lesson_episodes[i];
xmlHttp[i].open("GET", episode_url);
xmlHttp[i].send(null);
}
}
</script>
{% comment %}
Create anchor for each one of the episodes.
{% endcomment %}
{% for episode in site.episodes %}
<article id="{{ episode.url }}"></article>
{% endfor %}

0 comments on commit 6cbc024

Please sign in to comment.