Skip to content

Commit c923203

Browse files
committed
build lessons
1 parent 7a01043 commit c923203

6 files changed

Lines changed: 156 additions & 21 deletions

File tree

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,23 @@ and to meet some of our community members.
4646
## Where to Contribute
4747

4848
1. If you wish to change this lesson,
49-
please work in <https://github.com/swcarpentry/FIXME>,
50-
which can be viewed at <https://swcarpentry.github.io/FIXME>.
49+
please work in <https://github.com/dune/FIXME>,
50+
which can be viewed at <https://dune.github.io/FIXME>.
5151

52-
2. If you wish to change the example lesson,
52+
2. If you wish to change the Carpentries example lesson,
5353
please work in <https://github.com/carpentries/lesson-example>,
5454
which documents the format of our lessons
5555
and can be viewed at <https://carpentries.github.io/lesson-example>.
5656

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

63-
4. If you wish to change CSS style files, tools,
63+
4. If you wish to change DUNE CSS style files, tools,
6464
or HTML boilerplate for lessons or workshops stored in `_includes` or `_layouts`,
65-
please work in <https://github.com/carpentries/styles>.
65+
please work in <https://github.com/dune/lesson-template>.
6666

6767
## What to Contribute
6868

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: Local Setup Instructions
3+
teaching: 30
4+
exercises: 0
5+
questions:
6+
- How can I set up a local server to check my lesson
7+
objectives:
8+
- Learn how to set up locally
9+
keypoints:
10+
- This is the hard part, need to get ruby
11+
---
12+
13+
14+
## Instructions for local setup to build your lessons - very useful
15+
16+
17+
> #### Note:
18+
> The Carpentries provide excellent instructions and examples at: [https://carpentries.github.io/lesson-example/setup.html](https://carpentries.github.io/lesson-example/setup.html).
19+
> Carpentries has moved on to an 'R' based system which we are not using. We are still using this older format.
20+
{: .callout}
21+
22+
23+
## Do local setup for local rendering (optional)
24+
25+
Follow the instructions [https://carpentries.github.io/lesson-example/setup.html#setup-for-local-rendering-of-the-lessons-optional](https://carpentries.github.io/lesson-example/setup.html#setup-for-local-rendering-of-the-lessons-optional) for setup on your local machine - in principle this is optional but in practice it is really helpful. You are going to need ruby and pyYAML. I used conda on a mac but they have instructions for Windows, Mac and UNIX.
26+
27+
> #### Alert!!!
28+
> At this point you should stop following their instructions and start using our github template to avoid overwriting DUNE specific items.
29+
{: .callout}
30+
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: How to make a Lesson for DUNE
3+
teaching: 30
4+
exercises: 0
5+
questions:
6+
- How can I make a lesson like this from scratch using the DUNE template
7+
objectives:
8+
- Learn how to set up locally to build a lesson and to deploy it.
9+
keypoints:
10+
- If you can do basic markdown, you can do this.
11+
---
12+
13+
14+
## Here I describe how I built this lesson. You can follow along.
15+
16+
17+
18+
> #### Note:
19+
> Check out the [previous episode]({{ site.baseurl }}/00-Local-Setup-For-Local-Build.html)to set up a local server and to do local builds.
20+
{: .callout}
21+
22+
## First you need to decide on a name for your new lesson.
23+
24+
> #### Note:
25+
> Because github insists on using gh_pages for deployment, it is good to use your own github account for initial (and ongoing) development and pull over to /DUNE/ for the official version rather than using branches in the /DUNE/ github area.
26+
{: .callout}
27+
28+
## Do local setup for local rendering (optional)
29+
30+
Then follow the instructions [https://carpentries.github.io/lesson-example/setup.html#setup-for-local-rendering-of-the-lessons-optional](https://carpentries.github.io/lesson-example/setup.html#setup-for-local-rendering-of-the-lessons-optional) for setup on your local machine - in principle this is optional but in practice it is really helpful. You are going to need ruby and pyYAML. I used conda on a mac but they have instructions for Windows, Mac and UNIX.
31+
32+
> #### Alert!!!
33+
> At this point you should stop following their instructions and start using our template to avoid overwriting DUNE specific items.
34+
{: .callout}
35+
36+
## Then import this template.
37+
38+
- Use the [GitHub’s importer](https://github.com/new/import) to make a copy of this repo in your own GitHub account. (Note: This is like a GitHub Fork, but not connected to the upstream changes)
39+
40+
- Put the URL of this repository, that is https://github.com/DUNE/lesson-template.git in the “Your old repository’s clone URL” box.
41+
42+
- Select the owner for your new repository (you).
43+
44+
- Set the name you chose for your lesson repository.
45+
46+
- Make sure the repository is public.
47+
48+
> #### Note:
49+
> Please import to your own account and new lesson, work there and then move it over to `/DUNE/` once you have a decent draft in place.
50+
{: .callout}
51+
52+
53+
The difference from the carpentries is the addition of the DUNE logo and stuff specific to our lessons.
54+
55+
56+
## now make a local copy on the gh-pages branch and edit away
57+
~~~
58+
git clone -b gh-pages <your new repository>
59+
~~~
60+
{: .language-bash}
61+
62+
You need to look at the following pages.
63+
64+
- `_config.yml ` to set the title and other parameters for the lesson
65+
- `AUTHORS` to tell people who is doing this
66+
- `CITATION` how to cite the page - often just the URL
67+
- `LICENSE` you can keep it as is
68+
- `LICENSE.md`
69+
- `README.md`
70+
- `reference.md`
71+
- `setup.md` This is currently the full setup for new users.
72+
73+
Then throw your individual modules into `_episodes` with leading numbers to set the order. The code will follow the ordering of the files in `_episodes`.
74+
75+
There are very nice examples and a formatting tutorial at: [https://carpentries.github.io/lesson-example/](https://carpentries.github.io/lesson-example/)
76+
77+
You can throw supplemental stuff into `_extras`.
78+
79+
## You can then build your site locally either as a server or just a local site.
80+
81+
### local site
82+
83+
~~~
84+
make site
85+
~~~
86+
{: .language-bash}
87+
88+
This does a lot of setup - it's pulling in a lot of ruby "gem" files.
89+
90+
Your local site will be in _sites/index.html
91+
92+
#### Checking
93+
94+
~~~
95+
make lesson-check
96+
~~~
97+
{: .language-bash}
98+
99+
will tell you about all the FIXME's you haven't fixed and missing formatting syntax.
100+
101+
### local server
102+
103+
~~~
104+
make serve
105+
~~~
106+
{: .language-bash}
107+
108+
will launch a web server and a site at: `http://127.0.0.1:4000`
109+
110+
You need to reload the web site to see your changes.
111+
112+
> ### Note:
113+
These will hang around until you kill them so if you try to launch twice so look for processes with:
114+
{: .callout}
115+
116+
117+
~~~
118+
ps -ef | grep jekyll
119+
~~~
120+
{: .language-bash}

_episodes/01_How_to_make_a_lesson.md

Whitespace-only changes.

_extras/TutorialsMasterList.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

_extras/discuss.md

Whitespace-only changes.

0 commit comments

Comments
 (0)