-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a01043
commit c923203
Showing
6 changed files
with
156 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Local Setup Instructions | ||
teaching: 30 | ||
exercises: 0 | ||
questions: | ||
- How can I set up a local server to check my lesson | ||
objectives: | ||
- Learn how to set up locally | ||
keypoints: | ||
- This is the hard part, need to get ruby | ||
--- | ||
|
||
|
||
## Instructions for local setup to build your lessons - very useful | ||
|
||
|
||
> #### Note: | ||
> 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} | ||
|
||
|
||
## Do local setup for local rendering (optional) | ||
|
||
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!!! | ||
> At this point you should stop following their instructions and start using our github template to avoid overwriting DUNE specific items. | ||
{: .callout} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
title: How to make a Lesson for DUNE | ||
teaching: 30 | ||
exercises: 0 | ||
questions: | ||
- How can I make a lesson like this from scratch using the DUNE template | ||
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. | ||
--- | ||
|
||
|
||
## Here I describe how I built this lesson. You can follow along. | ||
|
||
|
||
|
||
> #### 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: | ||
> 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} | ||
|
||
## Do local setup for local rendering (optional) | ||
|
||
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!!! | ||
> At this point you should stop following their instructions and start using our template to avoid overwriting DUNE specific items. | ||
{: .callout} | ||
|
||
## 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) | ||
|
||
- Put the URL of this repository, that is https://github.com/DUNE/lesson-template.git in the “Your old repository’s clone URL” box. | ||
|
||
- Select the owner for your new repository (you). | ||
|
||
- Set the name you chose for your lesson repository. | ||
|
||
- Make sure the repository is public. | ||
|
||
> #### Note: | ||
> 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} | ||
|
||
|
||
The difference from the carpentries is the addition of the DUNE logo and stuff specific to our lessons. | ||
|
||
|
||
## now make a local copy on the gh-pages branch and edit away | ||
~~~ | ||
git clone -b gh-pages <your new repository> | ||
~~~ | ||
{: .language-bash} | ||
|
||
You need to look at the following pages. | ||
|
||
- `_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 | ||
- `LICENSE.md` | ||
- `README.md` | ||
- `reference.md` | ||
- `setup.md` This is currently the full setup for new users. | ||
|
||
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`. | ||
|
||
There are very nice examples and a formatting tutorial at: [https://carpentries.github.io/lesson-example/](https://carpentries.github.io/lesson-example/) | ||
|
||
You can throw supplemental stuff into `_extras`. | ||
|
||
## You can then build your site locally either as a server or just a local site. | ||
|
||
### local site | ||
|
||
~~~ | ||
make site | ||
~~~ | ||
{: .language-bash} | ||
|
||
This does a lot of setup - it's pulling in a lot of ruby "gem" files. | ||
|
||
Your local site will be in _sites/index.html | ||
|
||
#### Checking | ||
|
||
~~~ | ||
make lesson-check | ||
~~~ | ||
{: .language-bash} | ||
|
||
will tell you about all the FIXME's you haven't fixed and missing formatting syntax. | ||
|
||
### local server | ||
|
||
~~~ | ||
make serve | ||
~~~ | ||
{: .language-bash} | ||
|
||
will launch a web server and a site at: `http://127.0.0.1:4000` | ||
|
||
You need to reload the web site to see your changes. | ||
|
||
> ### Note: | ||
These will hang around until you kill them so if you try to launch twice so look for processes with: | ||
{: .callout} | ||
|
||
|
||
~~~ | ||
ps -ef | grep jekyll | ||
~~~ | ||
{: .language-bash} |
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.