-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEMPLATE.html
118 lines (116 loc) · 4.39 KB
/
TEMPLATE.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html>
<head>
<title>Author Carpentry</title>
<link rel="stylesheet" href="css/site.css">
</head>
<body>
<header>
<a href="http://authorcarpentry.github.io"><img src="img/AClogo.jpg" alt="Author Carpentry logo"></a>
</header>
<nav>
<ul>
<li>
<a href=".">Lesson</a>
</li>
<li>
<a href="00-getting-started.html">Topic 1</a>
</li>
<li>
<a href="01-working-with-openrefine.html">Topic 2</a>
</li>
<li>
<a href="mailto:[email protected]">Contact Us</a>
</li>
</ul>
</nav>
<section>
<h2 id="using-this-template">
Using this template
</h2>
<h3 id="copying-this-template">
Copying this template
</h3>
<p>
If you want to generate a new Author Carpentry lesson, use the Github import feature. Click the + sign in the upper right corner of the Github window, next to your user account logo. Select “Import a Repository”. For the URL enter https://github.com/AuthorCarpentry/lesson-template and choose the location and name for the new lesson. If you’re generating an authorized AuthorCarpentry lesson, select “AuthorCarpentry” as the owner. If want to independently use this template to make a lesson, select your Github username or other organization as the owner. We’re using the “Import a Repository” tool instead of forking because Github doesn’t allow multiple forks under the same owner. If you’re developing an independent lesson in your account, feel free to use Fork instead.
</p>
<h3 id="modifying-this-template-for-a-new-lesson">
Modifying this template for a new lesson
</h3>
<p>
Set up
</p>
<ul>
<li>
Download and install mkpage 1.0+ from https://github.com/caltechlibrary/mkpage
</li>
<li>
Clone a copy of the repository to your local machine. You can use the GitHub Desktop application or the command line command using ‘git clone https://github.com/AuthorCarpentry/lesson-name’
</li>
</ul>
<p>
Add Content
</p>
<ul>
<li>
Edit README.md with information about this lesson
</li>
<li>
Add individual .md files with lesson topics in repository with leading
</li>
<li>
numbers like: 00-topic1.md; 01-topic2.md
</li>
<li>
Edit nav.md to set links in the navigation bar
</li>
</ul>
<p>
View Lesson
</p>
<ul>
<li>
In your terminal, type ./mk-website.bash to generate .html files
</li>
<li>
To preview the lesson, type ws and point your web browser to http://localhost:8000/.<br />
</li>
<li>
When you’re happy with the lesson, type ./publish_website.bash to send
</li>
<li>
changes to github (script does a git commit and git push)
</li>
</ul>
<h2 id="modifying-template-for-a-workshop-containing-multiple-lessons">
Modifying template for a workshop containing multiple lessons
</h2>
<h3 id="optional-importing-new-changes-from-the-template">
Optional-Importing new changes from the template
</h3>
<p>
Because we’re generating a new copy of the template, there’s no was within Github to automatically adopt new template modifications (such as images or updated text). However, you can import modifications using the command line version of Git. Clone the repository to your personal computer (use git clone or GitHub Desktop). Open up your command line application (such as Terminal on a Mac) and cd to the directory where you put the cloned repository. Then type
</p>
<pre class="shell"><code> git remote add template https://github.com/AuthorCarpentry/lesson-template
git fetch template
git merge -s recursive -Xours -m "Merge in template changes" template/gh-pages</code></pre>
<p>
This will pull information from the template and merge any changes into the lesson. You only need to use the last two commands to merge future changes. This merge will work automatically in most cases and preserve the customizations you’ve made to the lesson. In some cases this automatic merge will fail and you should look at the changes to determine the reason for the clash. When you’re happy with the updates type
</p>
<pre class="shell"><code> git commit
git push</code></pre>
<p>
or use GitHub Desktop to send the changes up to GitHub.
</p>
</section>
<footer>
<span>© Author Carpentry</span>
<span><a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img
alt="Creative Commons License" style="vertical-align: middle;"
src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a></span>
<span>This work is licensed under a <a rel="license"
href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution
4.0 International License</a></span>
</footer>
</body>
</html>