You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _episodes/00-Local-Setup-For-Local-Build.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ keypoints:
14
14
## Instructions for local setup to build your lessons - very useful
15
15
16
16
17
-
> #### Note:
17
+
> ##Carpentries instructions
18
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
19
> Carpentries has moved on to an 'R' based system which we are not using. We are still using this older format.
20
20
{: .callout}
@@ -24,7 +24,6 @@ keypoints:
24
24
25
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
26
27
-
> ####Alert!!!
27
+
> ## Alert
28
28
> At this point you should stop following their instructions and start using our github template to avoid overwriting DUNE specific items.
Copy file name to clipboardExpand all lines: _episodes/01-How-to-make-a-lesson.md
+34-20Lines changed: 34 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,45 +7,50 @@ questions:
7
7
objectives:
8
8
- Learn how to set up locally to build a lesson and to deploy it.
9
9
keypoints:
10
-
- If you can do basic markdown, you can do this.
10
+
- If you can do basic markdown, you can do this.
11
+
- Import the template to your own GitHub account when developing new lessons
11
12
---
12
13
13
14
14
15
## Here I describe how I built this lesson. You can follow along.
15
16
16
17
17
18
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.
19
+
> ## Note
20
+
> 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
21
{: .callout}
21
22
22
23
## First you need to decide on a name for your new lesson.
23
24
24
-
> ####Note:
25
+
> ## Note
25
26
> 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
27
{: .callout}
27
28
28
29
## Do local setup for local rendering (optional)
29
30
30
31
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
32
-
> ####Alert!!!
33
+
> ## Alert
33
34
> At this point you should stop following their instructions and start using our template to avoid overwriting DUNE specific items.
34
-
{: .callout}
35
+
{: .caution}
35
36
36
37
## Then import this template.
37
38
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
+
- Use [GitHub’s importer](https://github.com/new/import) to make a copy of this repo in your own GitHub account.
39
40
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
+
> ## GitHub Import
42
+
> This is like a GitHub Fork, but is not connected to the upstream changes.
43
+
{: .callout}
44
+
45
+
- Put the URL of this repository, that is `https://github.com/DUNE/lesson-template.git` in the `The URL for your source repository*` URL box.
41
46
42
47
- Select the owner for your new repository (you).
43
48
44
49
- Set the name you chose for your lesson repository.
45
50
46
51
- Make sure the repository is public.
47
52
48
-
> #### Note:
53
+
> ##Import to your GitHub account
49
54
> 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.
-`_config.yml` to set the title and other parameters for the lesson
69
+
-`_config.yml` to set the title and other parameters for the lesson
65
70
-`AUTHORS` to tell people who is doing this
66
71
-`CITATION` how to cite the page - often just the URL
67
72
-`LICENSE` you can keep it as is
@@ -136,15 +141,24 @@ will launch a web server and a site at: `http://127.0.0.1:4000`
136
141
137
142
You may need to reload the web site to see your changes.
138
143
139
-
> ###Note:
144
+
> ## Note
140
145
> These will hang around until you kill them so if you try to launch twice you can't. Look for processes with:
141
146
{: .callout}
142
147
143
148
144
149
~~~
145
-
ps -ef | grep jekyll
150
+
ps -ef | grep 'jekyll serve'
146
151
~~~
147
152
{: .language-bash}
153
+
You can identify the process number from the second column that is printed and kill that process.
154
+
Alternatively this can be achieved with a one line command:
155
+
~~~
156
+
ps -ef | grep '[j]ekyll serve' | awk '{print $2}'
157
+
~~~
158
+
{: .language-bash}
159
+
The `awk` command grabs the second column, the PID. The `[j]` is a trick to stop it from also passing the `grep` process to kill also.
160
+
161
+
148
162
149
163
### Publishing your draft site to `<yourname>.github.io/<yoursite>`
150
164
@@ -163,7 +177,7 @@ git push
163
177
~~~
164
178
{: .language-bash}
165
179
166
-
Wait a couple of minutes and you shouild see your page appear at:
180
+
Wait a couple of minutes and you should see your page appear at:
167
181
168
182
`https://<yourname>.github.io/<yoursite>`
169
183
@@ -176,21 +190,21 @@ Ok, once you have your site in decent shape you can import it back to
176
190
177
191
Once you have it checked out you can use the import function to make an official dune site.
178
192
179
-
- 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)
193
+
- Use [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)
180
194
181
-
- Put the URL of this repository, that is `https://github.com/<yourname/<yoursite>.git` in the “Your old repository’s clone URL” box.
195
+
- Put the URL of this repository, that is `https://github.com/<yourname/<yoursite>.git` in the `The URL for your source repository*`URL box.
182
196
183
-
- Select the owner for your new repository `DUNE`
197
+
- Select the owner for your new repository:`DUNE`
184
198
185
-
- Set the name you chose for your lesson repository `<yoursite>`
199
+
- Set the name you chose for your lesson repository:`<yoursite>`
186
200
187
201
- Make sure the repository is public.
188
202
189
203
### Maintaining your site
190
204
191
-
-try to make changes on your local copy - others can also do things in their local copies
205
+
-Try to make changes on your local copy - others can also do things in their local copies
192
206
193
-
-use pull requests to merge changes into the official DUNE site where possible
207
+
-Use pull requests to merge changes into the official DUNE site where possible
194
208
195
-
-you can make minor patches directly on the main site but generally, it's better to work locally.
209
+
-You can make minor patches directly on the main site but generally, it's better to work locally.
0 commit comments