Skip to content

Commit b309d91

Browse files
committed
get Gavin's changes
Merge branch 'gh-pages' of https://github.com/DUNE/lesson-template into gh-pages
2 parents 0834adb + b9bb807 commit b309d91

3 files changed

Lines changed: 39 additions & 26 deletions

File tree

_episodes/00-Local-Setup-For-Local-Build.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ keypoints:
1414
## Instructions for local setup to build your lessons - very useful
1515

1616

17-
> #### Note:
17+
> ## Carpentries instructions
1818
> The Carpentries provide excellent instructions and examples at: [https://carpentries.github.io/lesson-example/setup.html](https://carpentries.github.io/lesson-example/setup.html).
1919
> Carpentries has moved on to an 'R' based system which we are not using. We are still using this older format.
2020
{: .callout}
@@ -24,7 +24,6 @@ keypoints:
2424

2525
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.
2626

27-
> #### Alert!!!
27+
> ## Alert
2828
> At this point you should stop following their instructions and start using our github template to avoid overwriting DUNE specific items.
29-
{: .callout}
30-
29+
{: .caution}

_episodes/01-How-to-make-a-lesson.md

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,50 @@ questions:
77
objectives:
88
- Learn how to set up locally to build a lesson and to deploy it.
99
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
1112
---
1213

1314

1415
## Here I describe how I built this lesson. You can follow along.
1516

1617

1718

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.
2021
{: .callout}
2122

2223
## First you need to decide on a name for your new lesson.
2324

24-
> #### Note:
25+
> ## Note
2526
> 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.
2627
{: .callout}
2728

2829
## Do local setup for local rendering (optional)
2930

3031
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.
3132

32-
> #### Alert!!!
33+
> ## Alert
3334
> At this point you should stop following their instructions and start using our template to avoid overwriting DUNE specific items.
34-
{: .callout}
35+
{: .caution}
3536

3637
## Then import this template.
3738

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.
3940

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.
4146

4247
- Select the owner for your new repository (you).
4348

4449
- Set the name you chose for your lesson repository.
4550

4651
- Make sure the repository is public.
4752

48-
> #### Note:
53+
> ## Import to your GitHub account
4954
> 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.
5055
{: .callout}
5156

@@ -61,7 +66,7 @@ git clone -b gh-pages <your new repository>
6166

6267
You need to look at the following pages.
6368

64-
- `_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
6570
- `AUTHORS` to tell people who is doing this
6671
- `CITATION` how to cite the page - often just the URL
6772
- `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`
136141

137142
You may need to reload the web site to see your changes.
138143

139-
> ### Note:
144+
> ## Note
140145
> These will hang around until you kill them so if you try to launch twice you can't. Look for processes with:
141146
{: .callout}
142147

143148

144149
~~~
145-
ps -ef | grep jekyll
150+
ps -ef | grep 'jekyll serve'
146151
~~~
147152
{: .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+
148162

149163
### Publishing your draft site to `<yourname>.github.io/<yoursite>`
150164

@@ -163,7 +177,7 @@ git push
163177
~~~
164178
{: .language-bash}
165179

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:
167181

168182
`https://<yourname>.github.io/<yoursite>`
169183

@@ -176,21 +190,21 @@ Ok, once you have your site in decent shape you can import it back to
176190

177191
Once you have it checked out you can use the import function to make an official dune site.
178192

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)
180194

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.
182196

183-
- Select the owner for your new repository `DUNE`
197+
- Select the owner for your new repository: `DUNE`
184198

185-
- Set the name you chose for your lesson repository `<yoursite>`
199+
- Set the name you chose for your lesson repository: `<yoursite>`
186200

187201
- Make sure the repository is public.
188202

189203
### Maintaining your site
190204

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
192206

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
194208

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.
196210

_includes/navbar.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/cp-logo-blue.svg %}" alt="The Carpentries logo" />
3434
</a>
3535
{% elsif site.carpentry == "dune" %}
36-
<a href="{{ site.carpentries_site }}" class="pull-left">
37-
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/DUNElogo_color.jpeg %}" alt="The Carpentries logo" />
36+
<a href="{{ site.dune_site }}" class="pull-left">
37+
<img class="navbar-logo" src="{{ relative_root_path }}{% link /assets/img/DUNElogo_color.jpeg %}" alt="The DUNE logo" />
3838
</a>
3939
{% elsif site.carpentry == "lab" %}
4040
<a href="{{ relative_root_path }}{% link index.md %}" class="pull-left">

0 commit comments

Comments
 (0)