From f218d062d90d410d3219ae5eefb07dfafcb7761a Mon Sep 17 00:00:00 2001 From: "Gavin S. Davies" Date: Tue, 12 Nov 2024 12:54:59 -0600 Subject: [PATCH 1/6] have the logo point to dune_site - defined in _config.yml - update alt text too --- _includes/navbar.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/navbar.html b/_includes/navbar.html index d0b9e5a..323d4f7 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -33,8 +33,8 @@ {% elsif site.carpentry == "dune" %} - - + + {% elsif site.carpentry == "lab" %} From 22a5887091c1af971beafc0abbbb14e620e7b5d6 Mon Sep 17 00:00:00 2001 From: "Gavin S. Davies" Date: Tue, 12 Nov 2024 13:10:36 -0600 Subject: [PATCH 2/6] fix callouts to use right style - use .caution to callout alerts with more oomph. --- _episodes/01-How-to-make-a-lesson.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/_episodes/01-How-to-make-a-lesson.md b/_episodes/01-How-to-make-a-lesson.md index d9ebb04..a3fd0ca 100644 --- a/_episodes/01-How-to-make-a-lesson.md +++ b/_episodes/01-How-to-make-a-lesson.md @@ -15,13 +15,13 @@ keypoints: -> #### Note: -> 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. +> ## Note +> 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. {: .callout} ## First you need to decide on a name for your new lesson. -> #### Note: +> ## Note > 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. {: .callout} @@ -29,13 +29,17 @@ keypoints: 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. -> #### Alert!!! +> ## Alert > At this point you should stop following their instructions and start using our template to avoid overwriting DUNE specific items. -{: .callout} +{: .caution} ## Then import this template. -- 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) +- Use [GitHub’s importer](https://github.com/new/import) to make a copy of this repo in your own GitHub account. + +> ## GitHub Import +> This is like a GitHub Fork, but is not connected to the upstream changes. +{: .callout} - Put the URL of this repository, that is https://github.com/DUNE/lesson-template.git in the “Your old repository’s clone URL” box. @@ -45,7 +49,7 @@ Then follow the instructions [https://carpentries.github.io/lesson-example/setup - Make sure the repository is public. -> #### Note: +> ## Import to your GitHub account > 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. {: .callout} @@ -136,7 +140,7 @@ will launch a web server and a site at: `http://127.0.0.1:4000` You may need to reload the web site to see your changes. -> ### Note: +> ## Note > These will hang around until you kill them so if you try to launch twice you can't. Look for processes with: {: .callout} From 28776cadcebaf76109471c1dc8669b065c8f379b Mon Sep 17 00:00:00 2001 From: "Gavin S. Davies" Date: Tue, 12 Nov 2024 13:10:54 -0600 Subject: [PATCH 3/6] add a keypoint --- _episodes/01-How-to-make-a-lesson.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_episodes/01-How-to-make-a-lesson.md b/_episodes/01-How-to-make-a-lesson.md index a3fd0ca..bca5cc8 100644 --- a/_episodes/01-How-to-make-a-lesson.md +++ b/_episodes/01-How-to-make-a-lesson.md @@ -7,7 +7,8 @@ questions: objectives: - Learn how to set up locally to build a lesson and to deploy it. keypoints: -- If you can do basic markdown, you can do this. +- If you can do basic markdown, you can do this. +- Import the template to your own GitHub account when developing new lessons --- From 6097b5267676a57876da16730b06fc6e0b989394 Mon Sep 17 00:00:00 2001 From: "Gavin S. Davies" Date: Tue, 12 Nov 2024 13:14:33 -0600 Subject: [PATCH 4/6] formatting fixes --- _episodes/01-How-to-make-a-lesson.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_episodes/01-How-to-make-a-lesson.md b/_episodes/01-How-to-make-a-lesson.md index bca5cc8..81dff88 100644 --- a/_episodes/01-How-to-make-a-lesson.md +++ b/_episodes/01-How-to-make-a-lesson.md @@ -42,7 +42,7 @@ Then follow the instructions [https://carpentries.github.io/lesson-example/setup > This is like a GitHub Fork, but is not connected to the upstream changes. {: .callout} -- Put the URL of this repository, that is https://github.com/DUNE/lesson-template.git in the “Your old repository’s clone URL” box. +- 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. - Select the owner for your new repository (you). @@ -66,7 +66,7 @@ git clone -b gh-pages You need to look at the following pages. -- `_config.yml ` to set the title and other parameters for the lesson +- `_config.yml` to set the title and other parameters for the lesson - `AUTHORS` to tell people who is doing this - `CITATION` how to cite the page - often just the URL - `LICENSE` you can keep it as is @@ -167,7 +167,7 @@ git push ~~~ {: .language-bash} -Wait a couple of minutes and you shouild see your page appear at: +Wait a couple of minutes and you should see your page appear at: `https://.github.io/` @@ -180,21 +180,21 @@ Ok, once you have your site in decent shape you can import it back to Once you have it checked out you can use the import function to make an official dune site. -- 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) +- 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) -- Put the URL of this repository, that is `https://github.com/.git` in the “Your old repository’s clone URL” box. +- Put the URL of this repository, that is `https://github.com/.git` in the `The URL for your source repository*` URL box. -- Select the owner for your new repository `DUNE` +- Select the owner for your new repository: `DUNE` -- Set the name you chose for your lesson repository `` +- Set the name you chose for your lesson repository: `` - Make sure the repository is public. ### Maintaining your site -- try to make changes on your local copy - others can also do things in their local copies +- Try to make changes on your local copy - others can also do things in their local copies -- use pull requests to merge changes into the official DUNE site where possible +- Use pull requests to merge changes into the official DUNE site where possible -- you can make minor patches directly on the main site but generally, it's better to work locally. +- You can make minor patches directly on the main site but generally, it's better to work locally. From b8ab2f0b3f0369f3d96fafc32334ff397fa2ec51 Mon Sep 17 00:00:00 2001 From: "Gavin S. Davies" Date: Tue, 12 Nov 2024 13:15:27 -0600 Subject: [PATCH 5/6] grep for `jekyll serve` specifically since that is the command that is running. - add an alternative one-liner to find and kill these processes. --- _episodes/01-How-to-make-a-lesson.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/_episodes/01-How-to-make-a-lesson.md b/_episodes/01-How-to-make-a-lesson.md index 81dff88..b1ff4e1 100644 --- a/_episodes/01-How-to-make-a-lesson.md +++ b/_episodes/01-How-to-make-a-lesson.md @@ -147,9 +147,18 @@ You may need to reload the web site to see your changes. ~~~ -ps -ef | grep jekyll +ps -ef | grep 'jekyll serve' ~~~ {: .language-bash} +You can identify the process number from the second column that is printed and kill that process. +Alternatively this can be achieved with a one line command: +~~~ +ps -ef | grep '[j]ekyll serve' | awk '{print $2}' +~~~ +{: .language-bash} +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. + + ### Publishing your draft site to `.github.io/` From d4deec24522a09f50b34d53d750db77986f032e9 Mon Sep 17 00:00:00 2001 From: "Gavin S. Davies" Date: Tue, 12 Nov 2024 13:20:27 -0600 Subject: [PATCH 6/6] minor formatting tweaks --- _episodes/00-Local-Setup-For-Local-Build.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/_episodes/00-Local-Setup-For-Local-Build.md b/_episodes/00-Local-Setup-For-Local-Build.md index 3173dab..02ad166 100644 --- a/_episodes/00-Local-Setup-For-Local-Build.md +++ b/_episodes/00-Local-Setup-For-Local-Build.md @@ -14,7 +14,7 @@ keypoints: ## Instructions for local setup to build your lessons - very useful -> #### Note: +> ## Carpentries instructions > The Carpentries provide excellent instructions and examples at: [https://carpentries.github.io/lesson-example/setup.html](https://carpentries.github.io/lesson-example/setup.html). > Carpentries has moved on to an 'R' based system which we are not using. We are still using this older format. {: .callout} @@ -24,7 +24,6 @@ keypoints: 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. -> #### Alert!!! +> ## Alert > At this point you should stop following their instructions and start using our github template to avoid overwriting DUNE specific items. -{: .callout} - +{: .caution}