Skip to content

Commit 169e504

Browse files
committed
add the sophia/RCR video
1 parent ca23634 commit 169e504

File tree

11 files changed

+138
-28
lines changed

11 files changed

+138
-28
lines changed

docs/index.html

Lines changed: 65 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<!--radix_placeholder_meta_tags-->
8888
<title>RStudio &amp; Version Control: Git, GitHub &amp; RStudio</title>
8989

90-
<meta property="description" itemprop="description" content="Makin&#39; it work!!"/>
90+
<meta property="description" itemprop="description" content="RStudio users can leverage git Version control to enhance reproducibility."/>
9191

9292
<link rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/"/>
9393
<link rel="icon" type="image/png" href="libs-local/rfun_logo.png"/>
@@ -96,21 +96,21 @@
9696
<!-- https://developers.facebook.com/docs/sharing/webmasters#markup -->
9797
<meta property="og:title" content="RStudio &amp; Version Control: Git, GitHub &amp; RStudio"/>
9898
<meta property="og:type" content="article"/>
99-
<meta property="og:description" content="Makin&#39; it work!!"/>
99+
<meta property="og:description" content="RStudio users can leverage git Version control to enhance reproducibility."/>
100100
<meta property="og:locale" content="en_US"/>
101101
<meta property="og:site_name" content="RStudio &amp; Version Control"/>
102102

103103
<!-- https://dev.twitter.com/cards/types/summary -->
104104
<meta property="twitter:card" content="summary"/>
105105
<meta property="twitter:title" content="RStudio &amp; Version Control: Git, GitHub &amp; RStudio"/>
106-
<meta property="twitter:description" content="Makin&#39; it work!!"/>
106+
<meta property="twitter:description" content="RStudio users can leverage git Version control to enhance reproducibility."/>
107107
<meta property="twitter:site" content="@duke_data"/>
108108

109109
<!--/radix_placeholder_meta_tags-->
110110
<!--radix_placeholder_rmarkdown_metadata-->
111111

112112
<script type="text/json" id="radix-rmarkdown-metadata">
113-
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","site"]}},"value":[{"type":"character","attributes":{},"value":["Git, GitHub & RStudio"]},{"type":"character","attributes":{},"value":["Makin' it work!!"]},{"type":"character","attributes":{},"value":["distill::distill_website"]}]}
113+
{"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","description","site"]}},"value":[{"type":"character","attributes":{},"value":["Git, GitHub & RStudio"]},{"type":"character","attributes":{},"value":["RStudio users can leverage git Version control to enhance reproducibility."]},{"type":"character","attributes":{},"value":["distill::distill_website"]}]}
114114
</script>
115115
<!--/radix_placeholder_rmarkdown_metadata-->
116116
<!--radix_placeholder_navigation_in_header-->
@@ -449,8 +449,15 @@
449449
top: 0;
450450
}
451451

452+
/* adjust viewport for navbar height */
453+
/* helps vertically center bootstrap (non-distill) content */
454+
.min-vh-100 {
455+
min-height: calc(100vh - 100px) !important;
456+
}
457+
452458
</style>
453459

460+
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
454461
<link href="site_libs/font-awesome-5.1.0/css/all.css" rel="stylesheet"/>
455462
<link href="site_libs/font-awesome-5.1.0/css/v4-shims.css" rel="stylesheet"/>
456463
<script src="site_libs/headroom-0.9.4/headroom.min.js"></script>
@@ -558,19 +565,21 @@
558565
var results = fuse.search(query, searchOptions);
559566
callback(results
560567
.map(function(result) { return result.item; })
561-
.filter(function(item) { return !!item.description; })
562568
);
563569
},
564570
templates: {
565571
suggestion: function(suggestion) {
572+
var img = suggestion.preview && Object.keys(suggestion.preview).length > 0
573+
? `<img src="${offsetURL(suggestion.preview)}"</img>`
574+
: '';
566575
var html = `
567576
<div class="search-item">
568577
<h3>${suggestion.title}</h3>
569578
<div class="search-item-description">
570-
${suggestion.description}
579+
${suggestion.description || ''}
571580
</div>
572581
<div class="search-item-preview">
573-
<img src="${suggestion.preview ? offsetURL(suggestion.preview) : ''}"</img>
582+
${img}
574583
</div>
575584
</div>
576585
`;
@@ -594,6 +603,10 @@ <h3>${suggestion.title}</h3>
594603

595604
<style type="text/css">
596605

606+
.nav-search {
607+
font-size: x-small;
608+
}
609+
597610
/* Algolioa Autocomplete */
598611

599612
.algolia-autocomplete {
@@ -668,6 +681,7 @@ <h3>${suggestion.title}</h3>
668681
}
669682

670683
.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item h3 {
684+
font-size: 1rem;
671685
margin-block-start: 0;
672686
margin-block-end: 5px;
673687
}
@@ -895,6 +909,11 @@ <h3>${suggestion.title}</h3>
895909
text-decoration: underline;
896910
}
897911

912+
d-article details {
913+
grid-column: text;
914+
margin-bottom: 0.8em;
915+
}
916+
898917
@media(min-width: 768px) {
899918

900919
d-article pre,
@@ -1051,6 +1070,17 @@ <h3>${suggestion.title}</h3>
10511070
margin-left: 1em; text-indent: -1em;
10521071
}
10531072

1073+
/* Citation hover box */
1074+
1075+
.tippy-box[data-theme~=light-border] {
1076+
background-color: rgba(250, 250, 250, 0.95);
1077+
}
1078+
1079+
.tippy-content > p {
1080+
margin-bottom: 0;
1081+
padding: 2px;
1082+
}
1083+
10541084

10551085
/* Tweak 1000px media break to show more text */
10561086

@@ -1716,7 +1746,7 @@ <h3>${suggestion.title}</h3>
17161746
var layout = $(this).attr('data-layout');
17171747

17181748
// apply layout to markdown level block elements
1719-
var elements = $(this).children().not('div.sourceCode, pre, script');
1749+
var elements = $(this).children().not('details, div.sourceCode, pre, script');
17201750
elements.each(function(i, el) {
17211751
var layout_div = $('<div class="' + layout + '"></div>');
17221752
if (layout_div.hasClass('shaded')) {
@@ -1832,6 +1862,20 @@ <h3>${suggestion.title}</h3>
18321862
$('.appendix-bottom').appendTo('d-appendix').children().unwrap();
18331863
$('.appendix-bottom').remove();
18341864

1865+
// hoverable references
1866+
$('span.citation[data-cites]').each(function() {
1867+
var refHtml = $('#ref-' + $(this).attr('data-cites')).html();
1868+
window.tippy(this, {
1869+
allowHTML: true,
1870+
content: refHtml,
1871+
maxWidth: 500,
1872+
interactive: true,
1873+
interactiveBorder: 10,
1874+
theme: 'light-border',
1875+
placement: 'bottom-start'
1876+
});
1877+
});
1878+
18351879
// clear polling timer
18361880
clearInterval(tid);
18371881

@@ -1991,8 +2035,11 @@ <h3>${suggestion.title}</h3>
19912035
</script>
19922036

19932037
<!--/radix_placeholder_distill-->
1994-
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
1995-
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
2038+
<script src="site_libs/header-attrs-2.8/header-attrs.js"></script>
2039+
<script src="site_libs/popper-2.6.0/popper.min.js"></script>
2040+
<link href="site_libs/tippy-6.2.7/tippy.css" rel="stylesheet" />
2041+
<link href="site_libs/tippy-6.2.7/tippy-light-border.css" rel="stylesheet" />
2042+
<script src="site_libs/tippy-6.2.7/tippy.umd.min.js"></script>
19962043
<script src="site_libs/anchor-4.2.2/anchor.min.js"></script>
19972044
<script src="site_libs/bowser-1.9.3/bowser.min.js"></script>
19982045
<script src="site_libs/webcomponents-2.0.0/webcomponents.js"></script>
@@ -2008,7 +2055,7 @@ <h3>${suggestion.title}</h3>
20082055
<!--radix_placeholder_front_matter-->
20092056

20102057
<script id="distill-front-matter" type="text/json">
2011-
{"title":"Git, GitHub & RStudio","description":"Makin' it work!!","authors":[]}
2058+
{"title":"Git, GitHub & RStudio","description":"RStudio users can leverage git Version control to enhance reproducibility.","authors":[]}
20122059
</script>
20132060

20142061
<!--/radix_placeholder_front_matter-->
@@ -2038,28 +2085,30 @@ <h3>${suggestion.title}</h3>
20382085
<h1>Git, GitHub &amp; RStudio</h1>
20392086
<!--radix_placeholder_categories-->
20402087
<!--/radix_placeholder_categories-->
2041-
<p>Makin’ it work!!</p>
2088+
<p>RStudio users can leverage git Version control to enhance reproducibility.</p>
20422089
</div>
20432090

20442091

20452092
<div class="d-article">
20462093
<p>The <a href="https://usethis.r-lib.org/"><code>usethis</code></a> package and the RStudio IDE will help you orchestrate your version control repositories as RStudio projects.</p>
20472094
<iframe width="560" height="315" src="https://www.youtube.com/embed/r5_v5f6128M" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
20482095
</iframe>
2096+
<iframe height="560" width="315" src="https://warpwire.duke.edu/w/t0oFAA/" frameborder="0" scrolling="0" allow="autoplay; encrypted-media; fullscreen; picture-in-picture;" allowfullscreen>
2097+
</iframe>
20492098
<h3 id="setup">Setup</h3>
20502099
<p>To get started, make a free GitHub.com account. Make sure you have the latest versions of R, RStudio, and usethis. Then, setup your RStudio configuration using two key documents: <a href="https://usethis.r-lib.org/articles/articles/usethis-setup.html">Setup</a>, and <a href="https://usethis.r-lib.org/articles/articles/git-credentials.html">Managing Git(Hub) Credentials</a>.</p>
20512100
<h3 id="tips">Tips</h3>
20522101
<h4 id="clone-or-fork-from-github">Clone or fork from GitHub</h4>
20532102
<div class="layout-chunk" data-layout="l-body">
20542103
<div class="sourceCode">
2055-
<pre><code><span class='fu'>usethis</span><span class='fu'>::</span><span class='fu'><a href='https://usethis.r-lib.org/reference/create_from_github.html'>create_from_github</a></span><span class='op'>(</span><span class='st'>"https://github.com/data-and-visualization/git-tutorial"</span><span class='op'>)</span>
2104+
<pre class="sourceCode r"><code class="sourceCode r"><span class='fu'>usethis</span><span class='fu'>::</span><span class='fu'><a href='https://usethis.r-lib.org/reference/create_from_github.html'>create_from_github</a></span><span class='op'>(</span><span class='st'>"https://github.com/data-and-visualization/git-tutorial"</span><span class='op'>)</span>
20562105
</code></pre>
20572106
</div>
20582107
</div>
20592108
<h4 id="create-the-github-repo-from-local">Create the GitHub repo from local</h4>
20602109
<div class="layout-chunk" data-layout="l-body">
20612110
<div class="sourceCode">
2062-
<pre><code><span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://usethis.r-lib.org'>usethis</a></span><span class='op'>)</span>
2111+
<pre class="sourceCode r"><code class="sourceCode r"><span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://usethis.r-lib.org'>usethis</a></span><span class='op'>)</span>
20632112
<span class='fu'><a href='https://usethis.r-lib.org/reference/use_git.html'>use_git</a></span><span class='op'>(</span><span class='op'>)</span> <span class='co'># initialize a git repo</span>
20642113
<span class='fu'><a href='https://usethis.r-lib.org/reference/use_git_ignore.html'>use_git_ignore</a></span><span class='op'>(</span><span class='op'>)</span>
20652114
<span class='fu'>use_readme.Rmd</span><span class='op'>(</span><span class='op'>)</span>
@@ -2071,7 +2120,7 @@ <h4 id="create-the-github-repo-from-local">Create the GitHub repo from local</h4
20712120
<h4 id="set-up-git-and-manage-github-credentials">set-up git and manage GitHub credentials</h4>
20722121
<div class="layout-chunk" data-layout="l-body">
20732122
<div class="sourceCode">
2074-
<pre><code><span class='co'># Sign-in to your GitHub account</span>
2123+
<pre class="sourceCode r"><code class="sourceCode r"><span class='co'># Sign-in to your GitHub account</span>
20752124
<span class='co'># Read: https://usethis.r-lib.org/articles/articles/git-credentials.html</span>
20762125
<span class='co'># Read: https://usethis.r-lib.org/articles/articles/usethis-setup.html</span>
20772126
<span class='fu'>usethis</span><span class='fu'>::</span><span class='fu'><a href='https://usethis.r-lib.org/reference/github-token.html'>create_github_token</a></span><span class='op'>(</span><span class='op'>)</span>
@@ -2090,7 +2139,7 @@ <h4 id="publish-your-code-in-a-binder.org-container">Publish your code in a bind
20902139
<p>Use the <a href="https://karthik.github.io/holepunch/"><code>holepunch</code> package</a></p>
20912140
<div class="layout-chunk" data-layout="l-body">
20922141
<div class="sourceCode">
2093-
<pre><code><span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://github.com/karthik/holepunch'>holepunch</a></span><span class='op'>)</span>
2142+
<pre class="sourceCode r"><code class="sourceCode r"><span class='kw'><a href='https://rdrr.io/r/base/library.html'>library</a></span><span class='op'>(</span><span class='va'><a href='https://github.com/karthik/holepunch'>holepunch</a></span><span class='op'>)</span>
20942143

20952144
<span class='fu'><a href='https://rdrr.io/pkg/holepunch/man/write_compendium_description.html'>write_compendium_description</a></span><span class='op'>(</span><span class='op'>)</span>
20962145
<span class='fu'><a href='https://rdrr.io/pkg/holepunch/man/write_dockerfile.html'>write_dockerfile</a></span><span class='op'>(</span><span class='op'>)</span>

docs/resources.html

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,15 @@
446446
top: 0;
447447
}
448448

449+
/* adjust viewport for navbar height */
450+
/* helps vertically center bootstrap (non-distill) content */
451+
.min-vh-100 {
452+
min-height: calc(100vh - 100px) !important;
453+
}
454+
449455
</style>
450456

457+
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
451458
<link href="site_libs/font-awesome-5.1.0/css/all.css" rel="stylesheet"/>
452459
<link href="site_libs/font-awesome-5.1.0/css/v4-shims.css" rel="stylesheet"/>
453460
<script src="site_libs/headroom-0.9.4/headroom.min.js"></script>
@@ -555,19 +562,21 @@
555562
var results = fuse.search(query, searchOptions);
556563
callback(results
557564
.map(function(result) { return result.item; })
558-
.filter(function(item) { return !!item.description; })
559565
);
560566
},
561567
templates: {
562568
suggestion: function(suggestion) {
569+
var img = suggestion.preview && Object.keys(suggestion.preview).length > 0
570+
? `<img src="${offsetURL(suggestion.preview)}"</img>`
571+
: '';
563572
var html = `
564573
<div class="search-item">
565574
<h3>${suggestion.title}</h3>
566575
<div class="search-item-description">
567-
${suggestion.description}
576+
${suggestion.description || ''}
568577
</div>
569578
<div class="search-item-preview">
570-
<img src="${suggestion.preview ? offsetURL(suggestion.preview) : ''}"</img>
579+
${img}
571580
</div>
572581
</div>
573582
`;
@@ -591,6 +600,10 @@ <h3>${suggestion.title}</h3>
591600

592601
<style type="text/css">
593602

603+
.nav-search {
604+
font-size: x-small;
605+
}
606+
594607
/* Algolioa Autocomplete */
595608

596609
.algolia-autocomplete {
@@ -665,6 +678,7 @@ <h3>${suggestion.title}</h3>
665678
}
666679

667680
.algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item h3 {
681+
font-size: 1rem;
668682
margin-block-start: 0;
669683
margin-block-end: 5px;
670684
}
@@ -892,6 +906,11 @@ <h3>${suggestion.title}</h3>
892906
text-decoration: underline;
893907
}
894908

909+
d-article details {
910+
grid-column: text;
911+
margin-bottom: 0.8em;
912+
}
913+
895914
@media(min-width: 768px) {
896915

897916
d-article pre,
@@ -1048,6 +1067,17 @@ <h3>${suggestion.title}</h3>
10481067
margin-left: 1em; text-indent: -1em;
10491068
}
10501069

1070+
/* Citation hover box */
1071+
1072+
.tippy-box[data-theme~=light-border] {
1073+
background-color: rgba(250, 250, 250, 0.95);
1074+
}
1075+
1076+
.tippy-content > p {
1077+
margin-bottom: 0;
1078+
padding: 2px;
1079+
}
1080+
10511081

10521082
/* Tweak 1000px media break to show more text */
10531083

@@ -1713,7 +1743,7 @@ <h3>${suggestion.title}</h3>
17131743
var layout = $(this).attr('data-layout');
17141744

17151745
// apply layout to markdown level block elements
1716-
var elements = $(this).children().not('div.sourceCode, pre, script');
1746+
var elements = $(this).children().not('details, div.sourceCode, pre, script');
17171747
elements.each(function(i, el) {
17181748
var layout_div = $('<div class="' + layout + '"></div>');
17191749
if (layout_div.hasClass('shaded')) {
@@ -1829,6 +1859,20 @@ <h3>${suggestion.title}</h3>
18291859
$('.appendix-bottom').appendTo('d-appendix').children().unwrap();
18301860
$('.appendix-bottom').remove();
18311861

1862+
// hoverable references
1863+
$('span.citation[data-cites]').each(function() {
1864+
var refHtml = $('#ref-' + $(this).attr('data-cites')).html();
1865+
window.tippy(this, {
1866+
allowHTML: true,
1867+
content: refHtml,
1868+
maxWidth: 500,
1869+
interactive: true,
1870+
interactiveBorder: 10,
1871+
theme: 'light-border',
1872+
placement: 'bottom-start'
1873+
});
1874+
});
1875+
18321876
// clear polling timer
18331877
clearInterval(tid);
18341878

@@ -1988,8 +2032,11 @@ <h3>${suggestion.title}</h3>
19882032
</script>
19892033

19902034
<!--/radix_placeholder_distill-->
1991-
<script src="site_libs/header-attrs-2.6/header-attrs.js"></script>
1992-
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
2035+
<script src="site_libs/header-attrs-2.8/header-attrs.js"></script>
2036+
<script src="site_libs/popper-2.6.0/popper.min.js"></script>
2037+
<link href="site_libs/tippy-6.2.7/tippy.css" rel="stylesheet" />
2038+
<link href="site_libs/tippy-6.2.7/tippy-light-border.css" rel="stylesheet" />
2039+
<script src="site_libs/tippy-6.2.7/tippy.umd.min.js"></script>
19932040
<script src="site_libs/anchor-4.2.2/anchor.min.js"></script>
19942041
<script src="site_libs/bowser-1.9.3/bowser.min.js"></script>
19952042
<script src="site_libs/webcomponents-2.0.0/webcomponents.js"></script>

0 commit comments

Comments
 (0)