forked from LibraryCarpentry/lc-git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05-github-pages.html
565 lines (525 loc) · 30.5 KB
/
05-github-pages.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
<!DOCTYPE html>
<!-- START: inst/pkgdown/templates/layout.html --><!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><title>Library Carpentry: Introduction to Git: GitHub Pages</title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" type="text/css" href="assets/styles.css"><script src="assets/scripts.js" type="text/javascript"></script><!-- mathjax --><script type="text/x-mathjax-config">
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
},
tex2jax: {
inlineMath: [['\\(', '\\)']],
displayMath: [ ['$$','$$'], ['\\[', '\\]'] ],
processEscapes: true
}
});
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><!-- Responsive Favicon for The Carpentries --><link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="manifest" href="site.webmanifest"><link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5"><meta name="msapplication-TileColor" content="#da532c"><meta name="theme-color" content="#ffffff"></head><body>
<header id="top" class="navbar navbar-expand-md navbar-light bg-white top-nav library"><a class="visually-hidden-focusable skip-link" href="#main-content">Skip to main content</a>
<div class="container-fluid top-nav-container">
<div class="col-md-6">
<div class="large-logo">
<img alt="Library Carpentry" src="assets/images/library-logo.svg"></div>
</div>
<div class="selector-container">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle bordered-button" type="button" id="dropdownMenu1" data-bs-toggle="dropdown" aria-expanded="false">
<i aria-hidden="true" class="icon" data-feather="eye"></i> Learner View <i data-feather="chevron-down"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1"><li><button class="dropdown-item" type="button" onclick="window.location.href='instructor/05-github-pages.html';">Instructor View</button></li>
</ul></div>
</div>
</div>
<hr></header><nav class="navbar navbar-expand-xl navbar-light bg-white bottom-nav library" aria-label="Main Navigation"><div class="container-fluid nav-container">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
<span class="menu-title">Menu</span>
</button>
<div class="nav-logo">
<img class="small-logo" alt="Library Carpentry" src="assets/images/library-logo-sm.svg"></div>
<div class="lesson-title-md">
Library Carpentry: Introduction to Git
</div>
<div class="search-icon-sm">
<!-- TODO: do not show until we have search
<i role="img" aria-label="search button" data-feather="search"></i>
-->
</div>
<div class="desktop-nav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0"><li class="nav-item">
<span class="lesson-title">
Library Carpentry: Introduction to Git
</span>
</li>
<li class="nav-item">
<a class="nav-link" href="key-points.html">Key Points</a>
</li>
<li class="nav-item">
<a class="nav-link" href="reference.html#glossary">Glossary</a>
</li>
<li class="nav-item">
<a class="nav-link" href="profiles.html">Learner Profiles</a>
</li>
<li class="nav-item dropdown">
<button class="nav-link dropdown-toggle" id="navbarDropdown" data-bs-toggle="dropdown" aria-expanded="false">
More <i data-feather="chevron-down"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown"><li><a class="dropdown-item" href="discuss.html">Discussion</a></li><li><a class="dropdown-item" href="reference.html">FIXME</a></li>
</ul></li>
</ul></div>
<form class="d-flex col-md-2 search-form">
<fieldset disabled><input class="form-control me-2 searchbox" type="search" placeholder="Search" aria-label="Search"><button class="btn btn-outline-success tablet-search-button" type="submit">
<i class="search-icon" data-feather="search" role="img" aria-label="search button"></i>
</button>
</fieldset></form>
</div><!--/div.container-fluid -->
</nav><div class="col-md-12 mobile-title">
Library Carpentry: Introduction to Git
</div>
<aside class="col-md-12 lesson-progress"><div style="width: 79%" class="percentage">
79%
</div>
<div class="progress library">
<div class="progress-bar library" role="progressbar" style="width: 79%" aria-valuenow="79" aria-label="Lesson Progress" aria-valuemin="0" aria-valuemax="100">
</div>
</div>
</aside><div class="container">
<div class="row">
<!-- START: inst/pkgdown/templates/navbar.html -->
<div id="sidebar-col" class="col-lg-4">
<div id="sidebar" class="sidebar">
<nav aria-labelledby="flush-headingEleven"><button role="button" aria-label="close menu" alt="close menu" aria-expanded="true" aria-controls="sidebar" class="collapse-toggle">
<i class="search-icon" data-feather="x" role="img"></i>
</button>
<div class="sidebar-inner">
<div class="row mobile-row">
<div class="col">
<div class="sidenav-view-selector">
<div class="accordion accordion-flush" id="accordionFlush9">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingNine">
<button class="accordion-button collapsed" id="instructor" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseNine" aria-expanded="false" aria-controls="flush-collapseNine">
<i id="eye" aria-hidden="true" class="icon" data-feather="eye"></i> Learner View
</button>
</h2>
<div id="flush-collapseNine" class="accordion-collapse collapse" aria-labelledby="flush-headingNine" data-bs-parent="#accordionFlush2">
<div class="accordion-body">
<a href="instructor/05-github-pages.html">Instructor View</a>
</div>
</div>
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
</div><!--div.sidenav-view-selector -->
</div><!--/div.col -->
<hr></div><!--/div.mobile-row -->
<div class="accordion accordion-flush" id="accordionFlush11">
<div class="accordion-item">
<button id="chapters" class="accordion-button show" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseEleven" aria-expanded="false" aria-controls="flush-collapseEleven">
<h2 class="accordion-header chapters" id="flush-headingEleven">
EPISODES
</h2>
</button>
<div id="flush-collapseEleven" class="accordion-collapse show collapse" aria-labelledby="flush-headingEleven" data-bs-parent="#accordionFlush11">
<div class="accordion-body">
<div class="accordion accordion-flush" id="accordionFlush1">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading1">
<a href="index.html">Summary and Setup</a>
</div><!--/div.accordion-header-->
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush2">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading2">
<a href="01-what-is-git.html">1. What is Git/GitHub?</a>
</div><!--/div.accordion-header-->
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush3">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading3">
<a href="02-getting-started.html">2. Getting started with Git</a>
</div><!--/div.accordion-header-->
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush4">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading4">
<a href="03-sharing.html">3. Sharing your work</a>
</div><!--/div.accordion-header-->
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush5">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading5">
<a href="04-review.html">4. Review</a>
</div><!--/div.accordion-header-->
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlushcurrent">
<div class="accordion-item">
<div class="accordion-header" id="flush-headingcurrent">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapsecurrent" aria-expanded="true" aria-controls="flush-collapsecurrent">
<span class="visually-hidden">Current Chapter</span>
<span class="current-chapter">
5. GitHub Pages
</span>
</button>
</div><!--/div.accordion-header-->
<div id="flush-collapsecurrent" class="accordion-collapse collapse show" aria-labelledby="flush-headingcurrent" data-bs-parent="#accordionFlushcurrent">
<div class="accordion-body">
<ul><li><a href="#github-pages">GitHub Pages</a></li>
</ul></div><!--/div.accordion-body-->
</div><!--/div.accordion-collapse-->
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
</div>
</div>
</div>
<hr class="half-width"><div class="accordion accordion-flush resources" id="accordionFlush12">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingTwelve">
<button class="accordion-button collapsed" id="resources" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseTwelve" aria-expanded="false" aria-controls="flush-collapseTwelve">
RESOURCES
</button>
</h2>
<div id="flush-collapseTwelve" class="accordion-collapse collapse" aria-labelledby="flush-headingTwelve" data-bs-parent="#accordionFlush12">
<div class="accordion-body">
<ul><li>
<a href="key-points.html">Key Points</a>
</li>
<li>
<a href="reference.html#glossary">Glossary</a>
</li>
<li>
<a href="profiles.html">Learner Profiles</a>
</li>
<li><a href="discuss.html">Discussion</a></li><li><a href="reference.html">FIXME</a></li>
</ul></div>
</div>
</div>
</div>
<hr class="half-width resources"><a href="aio.html">See all in one page</a>
<hr class="d-none d-sm-block d-md-none"><div class="d-grid gap-1">
</div>
</div><!-- /div.accordion -->
</div><!-- /div.sidebar-inner -->
</nav></div><!-- /div.sidebar -->
</div><!-- /div.sidebar-col -->
<!-- END: inst/pkgdown/templates/navbar.html-->
<!-- START: inst/pkgdown/templates/content-instructor.html -->
<div class="col-xl-8 col-lg-12 primary-content">
<nav class="lesson-content mx-md-4" aria-label="Previous and Next Chapter"><!-- content for small screens --><div class="d-block d-sm-block d-md-none">
<a class="chapter-link" href="04-review.html"><i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>Previous</a>
<a class="chapter-link float-end" href="index.html">Next<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
</div>
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
<a class="chapter-link" href="04-review.html" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
Previous: Review
</a>
<a class="chapter-link float-end" href="index.html" rel="next">
Home
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
</div>
<hr></nav><main id="main-content" class="main-content"><div class="container lesson-content">
<h1>GitHub Pages</h1>
<p> Last updated on 2023-04-21 |
<a href="https://github.com/librarycarpentry/lc-git/edit/main/episodes/05-github-pages.md" class="external-link">Edit this page <i aria-hidden="true" data-feather="edit"></i></a></p>
<div class="text-end">
<button role="button" aria-pressed="false" tabindex="0" id="expand-code" class="pull-right"> Expand All Solutions <i aria-hidden="true" data-feather="plus"></i></button>
</div>
<div class="overview card">
<h2 class="card-header">Overview</h2>
<div class="row g-0">
<div class="col-md-4">
<div class="card-body">
<div class="inner">
<h3 class="card-title">Questions</h3>
<ul><li>What is GitHub Pages?</li>
<li>How can I use GitHub Pages to collaborate and share my work?</li>
</ul></div>
</div>
</div>
<div class="col-md-8">
<div class="card-body">
<div class="inner bordered">
<h3 class="card-title">Objectives</h3>
<ul><li>create a GitHub Pages branch and push a file to it</li>
<li>with a partner, experiment with collaborating on a GitHub Pages
website</li>
<li>apply the workflow between local and remote repositories to
collaborate on a website</li>
</ul></div>
</div>
</div>
</div>
</div>
<section id="github-pages"><h2 class="section-heading">GitHub Pages<a class="anchor" aria-label="anchor" href="#github-pages"></a>
</h2>
<hr class="half-width"><p>GitHub Pages is a simple service to publish a website directly on
GitHub from a Git repository. You add some files and folders to a
repository and GitHub Pages turns it into a website. You can use HTML
directly if you like, but they also provide Jekyll, which renders
Markdown into HTML and makes it really easy to setup a blog or a
template-based website.</p>
<div class="section level3">
<h3 id="why-github-pages-is-awesome">Why GitHub Pages is awesome!<a class="anchor" aria-label="anchor" href="#why-github-pages-is-awesome"></a></h3>
<p>GitHub Pages allows you to version control your website. This is
useful for a lot of different reasons. It allows you to keep a record of
what changes you have made. It allows people to reference your website
at a particular point in time and (if you make your source open) to see
what it was like at that particular point in time. This is very useful
for academic citations. Most people have had the experience of following
up a reference to a website and either getting a 404 error or seeing
something completely different. Although using versions on your site
doesn’t guarantee this won’t happen, it does make it easier to manage
old versions of your site.</p>
<p>GitHub Pages also mean that you can collaborate on a website with a
lot of people without everyone having to communicate endlessly back and
forwards about what changes need to be made, or have been made already.
You can create ‘issues’ (things that need discussing or fixing), list
things to do in the future, and allow other people visiting your website
to quickly suggest, and help implement changes through pull
requests.</p>
</div>
<div class="section level3">
<h3 id="enable-github-pages">Enable GitHub Pages<a class="anchor" aria-label="anchor" href="#enable-github-pages"></a></h3>
<p>GitHub Pages is turned off by default for all new repositories, and
can be turned on in the settings menu for any repository.</p>
<p>Let’s set up a new site by enabling GitHub Pages for our project.</p>
<p>Go to the Pages section of your repository’s Settings:</p>
<figure><img src="fig/github-repo-settings-pages.png" alt="GitHub repository's Pages settings" class="figure mx-auto d-block"></figure><div class="section level4">
<h4 id="source-branch-required">Source branch (required)<a class="anchor" aria-label="anchor" href="#source-branch-required"></a></h4>
<p>Pages needs to know the branch in your repository from which you want
to serve your site. This can be any branch, including
<code>main</code>.</p>
<p>Select then save the source branch:</p>
<figure><img src="fig/github-repo-settings-pages-branch.png" alt="GitHub Pages source branch menu" class="figure mx-auto d-block"></figure><figure><img src="fig/github-repo-settings-pages-save.png" alt="GitHub Pages source branch save" class="figure mx-auto d-block"></figure></div>
<div class="section level4">
<h4 id="theme-optional">Theme (optional)<a class="anchor" aria-label="anchor" href="#theme-optional"></a></h4>
<p>GitHub Pages provides different themes to visually style and organize
your site’s content. Choosing a theme is optional, and themes can be
interchanged quickly.</p>
<figure><img src="fig/github-repo-settings-pages-theme.png" alt="GitHub Pages choose theme" class="figure mx-auto d-block"></figure><p>See the <a href="https://docs.github.com/en/pages/getting-started-with-github-pages/adding-a-theme-to-your-github-pages-site-with-the-theme-chooser" class="external-link">GitHub
Pages documentation</a> for further information on using themes.</p>
</div>
</div>
<div class="section level3">
<h3 id="view-your-site">View your site<a class="anchor" aria-label="anchor" href="#view-your-site"></a></h3>
<p>If we now visit
<code>https://some-librarian.github.io/hello-world/</code>, we should
see the contents of the index.md file that created earlier. Usually it’s
available instantly, but it can take a few seconds and in the worst case
a few minutes if GitHub are very busy.</p>
<div id="challenge-contributing-to-a-page-owned-by-someone-else-slightly-easier-way" class="callout challenge">
<div class="callout-square">
<i class="callout-icon" data-feather="zap"></i>
</div>
<div id="challenge-contributing-to-a-page-owned-by-someone-else-slightly-easier-way" class="callout-inner">
<h3 class="callout-title">Challenge: Contributing to a page owned by
someone else (slightly easier way)<a class="anchor" aria-label="anchor" href="#challenge-contributing-to-a-page-owned-by-someone-else-slightly-easier-way"></a>
</h3>
<div class="callout-content">
<p>To practice using Git, GitHub pages and Markdown we can contribute to
a GitHub pages site. Pair up in groups of two (or more if needed) and do
the exercises below together.</p>
<ol style="list-style-type: decimal"><li><p>Go to <a href="https://github.com/some-librarian/hello-world" class="external-link">https://github.com/some-librarian/hello-world</a>,
where “some-librarian” is the username of your exercise
partner.</p></li>
<li><p>Click on “Fork” in the upper right part of the screen to create a
copy of the repository on your account. Once you have a fork > of
your partner’s repository, you can edit the files in your own fork
directly.</p></li>
<li><p>Click the “index.md” file, then click the edit pencil
icon:</p></li>
</ol><figure><img src="fig/github-edit-pencil.png" alt="GitHub edit pencil" class="figure mx-auto d-block"></figure><ol start="4" style="list-style-type: decimal"><li><p>Now is good chance to try some Markdown syntax. Try some of the
examples at <a href="https://guides.github.com/features/mastering-markdown/" class="external-link">Mastering
Markdown</a>. You can preview how it will look before you commit
changes.</p></li>
<li><p>Once you are ready to commit, enter a short commit message,
select “Create a new branch for this commit and start a pull request”
and press “Propose file change” to avoid commiting directly to the main
branch.</p></li>
</ol><figure><img src="fig/github-commit-pr.png" alt="Commit and create pull request" class="figure mx-auto d-block"></figure><ol start="6" style="list-style-type: decimal"><li><p>You can now go to the repository on your account and click “New
Pull Request” button, where you can select base branches repositories,
review the changes and add an additional explanation before sending the
pull request (this is especially useful if you make a single pull
request for multiple commits).</p></li>
<li><p>Your partner should now see a pull request under the “Pull
requests” tab and can accept (“Merge pull request”) the changes there.
Try this.</p></li>
</ol><p>This whole process of making a fork and a pull request might seem a
bit cumbersome. Try to think of why it was needed? And why it’s called
“pull request”?</p>
</div>
</div>
</div>
<div id="accordionSolution1" class="accordion challenge-accordion accordion-flush">
<div class="accordion-item">
<button class="accordion-button solution-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSolution1" aria-expanded="false" aria-controls="collapseSolution1">
<h4 class="accordion-header" id="headingSolution1">
Show me the solution
</h4>
</button>
<div id="collapseSolution1" class="accordion-collapse collapse" data-bs-parent="#accordionSolution1" aria-labelledby="headingSolution1">
<div class="accordion-body">
<p>We made a fork and a pull request because we did not have permission
to edit (or commit) the repository directly. A fork is a copy of the
repository that we <em>can</em> edit. By making a pull request we ask
the owner of the repository if they would like to accept (pull in) the
changes from our fork (our copy) into their version. The owner can then
review the changes and choose to accept or reject them.</p>
<p>You can open pull requests on any repository you find on GitHub. If
you are a group of people who plan to collaborate closely, on the other
hand, it’s more practical to grant everyone access to commit directly
instead.</p>
</div>
</div>
</div>
</div>
<blockquote>
<h2 id="optional-challenge-contributing-to-a-page-owned-by-someone-else-slightly-more-complicated-way">Optional
challenge: Contributing to a page owned by someone else (slightly more
complicated way)</h2>
<p>Instead of making edits on the GitHub website you can ‘clone’ the
fork to your local machine and work there.</p>
</blockquote>
<div id="discussion1" class="callout discussion">
<div class="callout-square">
<i class="callout-icon" data-feather="message-circle"></i>
</div>
<div class="callout-inner">
<h3 class="callout-title">Challenge<a class="anchor" aria-label="anchor" href="#discussion1"></a>
</h3>
<div class="callout-content">
<p>Try following the rest of the steps in this guide under <a href="https://www.thinkful.com/learn/github-pull-request-tutorial/Writing-a-Good-Commit-Message#Time-to-Submit-Your-First-PR" class="external-link">“Time
to Submit Your First PR”</a>.</p>
<p>(If you followed step 1 and 2 in the previous challenge, you already
have a fork and you can skip the creation of a new fork. Start instead
at the section titled “Cloning a fork.” You can submit multiple pull
requests using the same fork.)</p>
</div>
</div>
</div>
<div id="optional-challenge-adding-an-html-page" class="callout discussion">
<div class="callout-square">
<i class="callout-icon" data-feather="message-circle"></i>
</div>
<div id="optional-challenge-adding-an-html-page" class="callout-inner">
<h3 class="callout-title">Optional challenge: Adding an HTML page<a class="anchor" aria-label="anchor" href="#optional-challenge-adding-an-html-page"></a>
</h3>
<div class="callout-content">
<p>GitHub Pages is not limited to Markdown. If you know some HTML, try
adding an HTML page to your repository. You could do this on the command
line or directly on GitHub. The steps below are for working directly on
GitHub:</p>
<ol style="list-style-type: decimal"><li>To add a new file directly on GitHub, press the “Create new file”
button.</li>
</ol><figure><img src="fig/github-create-new-file.png" alt="Create new file on GitHub" class="figure mx-auto d-block"></figure><ol start="2" style="list-style-type: decimal"><li><p>Name it ‘test.html’, add some HTML and click “Commit new
file”.</p></li>
<li><p>Try opening
<code>https://some-librarian.github.io/hello-world/test</code> (replace
“some-librarian” with your username). Notice that the HTML extension is
not included.</p></li>
</ol></div>
</div>
</div>
<div id="keypoints1" class="callout keypoints">
<div class="callout-square">
<i class="callout-icon" data-feather="key"></i>
</div>
<div class="callout-inner">
<h3 class="callout-title">Keypoints<a class="anchor" aria-label="anchor" href="#keypoints1"></a>
</h3>
<div class="callout-content">
<ul><li>GitHub Pages offer an automated way to create a website that is
version controlled and accessible for collaboration</li>
<li>Collaborating on a GitHub Pages website uses the same Git/GitHub
workflow you learned for collaborating via a GitHub repository</li>
</ul></div>
</div>
</div>
</div>
</section></div> <!-- / div.lesson-content -->
</main><!-- / main#main-content.main-content --><nav class="bottom-pagination mx-md-4" aria-label="Previous and Next Chapter"><div class="d-block d-sm-block d-md-none">
<a class="chapter-link" href="04-review.html"><i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>Previous</a>
<a class="chapter-link float-end" href="index.html">Next<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
</div>
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
<a class="chapter-link" href="04-review.html" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
Previous: Review
</a>
<a class="chapter-link float-end" href="index.html" rel="next">
Home
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
</div>
</nav></div> <!-- / div.primary-content.col-xs-12 -->
<!-- END: inst/pkgdown/templates/content-instructor.html-->
</div><!--/div.row-->
<footer class="row footer mx-md-3"><hr><div class="col-md-6">
<p>This lesson is subject to the <a href="CODE_OF_CONDUCT.html">Code of Conduct</a></p>
<p>
<a href="https://github.com/librarycarpentry/lc-git/edit/main/episodes/05-github-pages.md" class="external-link">Edit on GitHub</a>
| <a href="https://github.com/librarycarpentry/lc-git/blob/main/CONTRIBUTING.md" class="external-link">Contributing</a>
| <a href="https://github.com/librarycarpentry/lc-git/" class="external-link">Source</a></p>
<p><a href="https://github.com/librarycarpentry/lc-git/blob/main/CITATION" class="external-link">Cite</a> | <a href="mailto:[email protected]">Contact</a> | <a href="https://carpentries.org/about/" class="external-link">About</a></p>
</div>
<div class="col-md-6">
<p>Materials licensed under <a href="LICENSE.html">CC-BY 4.0</a> by the authors</p>
<p><a href="https://creativecommons.org/licenses/by-sa/4.0/" class="external-link">Template licensed under CC-BY 4.0</a> by <a href="https://carpentries.org" class="external-link">The Carpentries</a></p>
<p>Built with <a href="https://github.com/carpentries/sandpaper/tree/0.13.0" class="external-link">sandpaper (0.13.0)</a>,
<a href="https://github.com/carpentries/pegboard/tree/0.6.1" class="external-link">pegboard (0.6.1)</a>,
and <a href="https://github.com/carpentries/varnish/tree/0.3.0" class="external-link">varnish (0.3.0)</a>.</p>
</div>
</footer></div> <!-- / div.container -->
<div id="to-top">
<a href="#top">
<i class="search-icon" data-feather="arrow-up" role="img" aria-label="Back to top"></i><br><span class="d-none d-sm-none d-md-none d-lg-none d-xl-block">Back</span> To Top
</a>
</div>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "TrainingMaterial",
"@id": "https://librarycarpentry.github.io/lc-git/05-github-pages.html",
"dct:conformsTo": "https://bioschemas.org/profiles/TrainingMaterial/1.0-RELEASE",
"description": "A Carpentries Lesson teaching foundational data and coding skills to researchers worldwide",
"keywords": "software, data, lesson, The Carpentries",
"name": "GitHub Pages",
"creativeWorkStatus": "active",
"url": "https://librarycarpentry.github.io/lc-git/05-github-pages.html",
"identifier": "https://librarycarpentry.github.io/lc-git/05-github-pages.html",
"dateCreated": "2018-04-12",
"dateModified": "2023-04-21",
"datePublished": "2023-09-19"
}
</script><script>
feather.replace();
</script><!-- Matomo
2022-11-07: we have gotten a notification that we have an overage for our
tracking and I'm pretty sure this has to do with Workbench usage.
Considering that I am not _currently_ using this tracking because I do not
yet know how to access the data, I am turning this off for now.
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setDomains", ["*.preview.carpentries.org","*.datacarpentry.github.io","*.datacarpentry.org","*.librarycarpentry.github.io","*.librarycarpentry.org","*.swcarpentry.github.io", "*.carpentries.github.io"]]);
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://carpentries.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://cdn.matomo.cloud/carpentries.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
End Matomo Code --></body></html><!-- END: inst/pkgdown/templates/layout.html-->