-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTEMPLATE.html
More file actions
113 lines (93 loc) · 4.61 KB
/
TEMPLATE.html
File metadata and controls
113 lines (93 loc) · 4.61 KB
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
<!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="01-getting-started.html">Day 1: Getting Started</a></li>
<li><a href="02-markdown.html">Day 2: Intro to Markdown/Document Appearance</a></li>
<li><a href="03-dynamic.html">Day 3: Dynamic Documents</a></li>
<li><a href="04-publishing.html">Day 4: Publishing</a></li>
<li><a href="mailto:authorcarpentry@library.caltech.edu">Contact Us</a></li>
</ul>
</nav>
<section>
<h2>Using this template</h2>
<h3>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
<a href="https://github.com/AuthorCarpentry/lesson-template">https://github.com/AuthorCarpentry/lesson-template</a> 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>Modifying this template for a new lesson</h3>
<p>Set up</p>
<ul>
<li>Download and install mkpage from <a href="https://github.com/caltechlibrary/mkpage">https://github.com/caltechlibrary/mkpage</a></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 <a href="https://github.com/AuthorCarpentry/lesson-name'">https://github.com/AuthorCarpentry/lesson-name'</a></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
<a href="http://localhost:8000/">http://localhost:8000/</a>.<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>Modifying template for a workshop containing multiple lessons</h2>
<h3>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><code class="language-shell"> 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><code class="language-shell"> git commit
git push
</code></pre>
<p>or use GitHub Desktop to send the changes up to GitHub.</p>
</section>
<footer>
<span>© Lesson Contributors</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>