Skip to content

Commit cf720c8

Browse files
committed
add gitadd.sh and info on how to publish
1 parent d73f582 commit cf720c8

2 files changed

Lines changed: 88 additions & 3 deletions

File tree

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

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,33 @@ Then throw your individual modules into `_episodes` with leading numbers to set
7474

7575
There are very nice examples and a formatting tutorial at: [https://carpentries.github.io/lesson-example/](https://carpentries.github.io/lesson-example/)
7676

77+
All lessons need to have a header that describes them
78+
79+
~~~
80+
---
81+
title: How to make a Lesson for DUNE
82+
teaching: 30
83+
exercises: 0
84+
questions:
85+
- How can I make a lesson like this from scratch using the DUNE template
86+
objectives:
87+
- Learn how to set up locally to build a lesson and to deploy it.
88+
keypoints:
89+
- If you can do basic markdown, you can do this.
90+
91+
92+
... body of the lesson ...
93+
94+
~~~
95+
96+
{: .source}
97+
98+
In particular, check out
99+
100+
- [Organization](https://carpentries.github.io/lesson-example/03-organization/index.html)
101+
- [Formatting](https://carpentries.github.io/lesson-example/04-formatting/index.html)
102+
- [Style Guide](https://carpentries.github.io/lesson-example/06-style-guide/index.html)
103+
77104
You can throw supplemental stuff into `_extras`.
78105

79106
## You can then build your site locally either as a server or just a local site.
@@ -107,14 +134,62 @@ make serve
107134

108135
will launch a web server and a site at: `http://127.0.0.1:4000`
109136

110-
You need to reload the web site to see your changes.
137+
You may need to reload the web site to see your changes.
111138

112139
> ### Note:
113-
These will hang around until you kill them so if you try to launch twice so look for processes with:
140+
> These will hang around until you kill them so if you try to launch twice you can't. Look for processes with:
114141
{: .callout}
115142

116143

117144
~~~
118145
ps -ef | grep jekyll
119146
~~~
120-
{: .language-bash}
147+
{: .language-bash}
148+
149+
### Publishing your draft site to `<yourname>.github.io/<yoursite>`
150+
151+
Ok, so now you should be able to push your site to github.io
152+
153+
We have provided a `gitadd.sh` script that adds the most common **source** files so you don't mistakenly publish all of the html you just generated.
154+
155+
~~~
156+
# make certain you're up to date with the main repo
157+
git pull
158+
# make certain you are in your gh-pages branch
159+
source gitadd.sh
160+
git commit -m " I DID SOMETHING"
161+
git push
162+
~~~
163+
{: .language-bash}
164+
165+
Wait a couple of minutes and you shouild see your page appear at:
166+
167+
`https://<yourname>.github.io/<yoursite>`
168+
169+
170+
Ok, once you have your site in decent shape you can import it back to
171+
172+
`https://github.com/DUNE/<yoursite>`
173+
174+
### Making it official
175+
176+
Once you have it checked out you can use the import function to make an official dune site.
177+
178+
- 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)
179+
180+
- Put the URL of this repository, that is `https://github.com/<yourname/<yoursite>.git` in the “Your old repository’s clone URL” box.
181+
182+
- Select the owner for your new repository `DUNE`
183+
184+
- Set the name you chose for your lesson repository `<yoursite>`
185+
186+
- Make sure the repository is public.
187+
188+
### Maintaining your site
189+
190+
- try to make changes on your local copy - others can also do things in their local copies
191+
192+
- use pull requests to merge changes into the official DUNE site where possible
193+
194+
- you can make minor patches directly on the main site but generally, it's better to work locally.
195+

gitadd.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# script to only add stuff you should be changing to github
2+
# you can add other items if you are sure what you are doing but this is good for basic content changes
3+
4+
git add *.md
5+
git add gitadd.sh
6+
git add AUTHORS CITATION
7+
git add _config.yml
8+
git add _episodes/*.md
9+
git add _extras/*.md
10+
git add fig/*

0 commit comments

Comments
 (0)