Skip to content

Commit f417da5

Browse files
committed
Committing default files
0 parents  commit f417da5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2672
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata

blog.Rproj

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: Default
4+
SaveWorkspace: Default
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: UTF-8
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX
14+
15+
BuildType: Website

config.toml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
baseurl = "/"
2+
languageCode = "en-us"
3+
title = "A Hugo website"
4+
theme = "hugo-lithium-theme"
5+
googleAnalytics = ""
6+
disqusShortname = ""
7+
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
8+
9+
[permalinks]
10+
post = "/:year/:month/:day/:slug/"
11+
12+
[[menu.main]]
13+
name = "About"
14+
url = "/about/"
15+
[[menu.main]]
16+
name = "GitHub"
17+
url = "https://github.com/rstudio/blogdown"
18+
[[menu.main]]
19+
name = "Twitter"
20+
url = "https://twitter.com/rstudio"
21+
22+
[params]
23+
description = "A website built through Hugo and blogdown."
24+
25+
# options for highlight.js (version, additional languages, and theme)
26+
highlightjsVersion = "9.11.0"
27+
highlightjsCDN = "//cdn.bootcss.com"
28+
highlightjsLang = ["r", "yaml"]
29+
highlightjsTheme = "github"
30+
31+
MathJaxCDN = "//cdn.bootcss.com"
32+
MathJaxVersion = "2.7.1"
33+
34+
[params.logo]
35+
url = "logo.png"
36+
width = 50
37+
height = 50
38+
alt = "Logo"
39+

content/about.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "About"
3+
date: "2016-05-05T21:48:51-07:00"
4+
---
5+
6+
This is a "hello world" example website for the [**blogdown**](https://github.com/rstudio/blogdown) package. The theme was forked from [@jrutheiser/hugo-lithium-theme](https://github.com/jrutheiser/hugo-lithium-theme) and modified by [Yihui Xie](https://github.com/yihui/hugo-lithium-theme).
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "Lorem Ipsum"
3+
date: 2015-01-01T13:09:13-06:00
4+
---
5+
6+
**Lorem ipsum** dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore _magna aliqua_. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: "Hello R Markdown"
3+
author: "Frida Gomam"
4+
date: 2015-07-23T21:13:14-05:00
5+
categories: ["R"]
6+
tags: ["R Markdown", "plot", "regression"]
7+
---
8+
9+
```{r setup, include=FALSE}
10+
knitr::opts_chunk$set(collapse = TRUE)
11+
```
12+
13+
# R Markdown
14+
15+
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
16+
17+
You can embed an R code chunk like this:
18+
19+
```{r cars}
20+
summary(cars)
21+
fit <- lm(dist ~ speed, data = cars)
22+
fit
23+
```
24+
25+
# Including Plots
26+
27+
You can also embed plots. See Figure \@ref(fig:pie) for example:
28+
29+
```{r pie, fig.cap='A fancy pie chart.', tidy=FALSE}
30+
par(mar = c(0, 1, 0, 1))
31+
pie(
32+
c(280, 60, 20),
33+
c('Sky', 'Sunny side of pyramid', 'Shady side of pyramid'),
34+
col = c('#0292D8', '#F7EA39', '#C4B632'),
35+
init.angle = -50, border = NA
36+
)
37+
```
+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: "Hello R Markdown"
3+
author: "Frida Gomam"
4+
date: 2015-07-23T21:13:14-05:00
5+
categories: ["R"]
6+
tags: ["R Markdown", "plot", "regression"]
7+
---
8+
9+
10+
11+
<div id="r-markdown" class="section level1">
12+
<h1>R Markdown</h1>
13+
<p>This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <a href="http://rmarkdown.rstudio.com" class="uri">http://rmarkdown.rstudio.com</a>.</p>
14+
<p>You can embed an R code chunk like this:</p>
15+
<pre class="r"><code>summary(cars)
16+
## speed dist
17+
## Min. : 4.0 Min. : 2.00
18+
## 1st Qu.:12.0 1st Qu.: 26.00
19+
## Median :15.0 Median : 36.00
20+
## Mean :15.4 Mean : 42.98
21+
## 3rd Qu.:19.0 3rd Qu.: 56.00
22+
## Max. :25.0 Max. :120.00
23+
fit &lt;- lm(dist ~ speed, data = cars)
24+
fit
25+
##
26+
## Call:
27+
## lm(formula = dist ~ speed, data = cars)
28+
##
29+
## Coefficients:
30+
## (Intercept) speed
31+
## -17.579 3.932</code></pre>
32+
</div>
33+
<div id="including-plots" class="section level1">
34+
<h1>Including Plots</h1>
35+
<p>You can also embed plots. See Figure <a href="#fig:pie">1</a> for example:</p>
36+
<pre class="r"><code>par(mar = c(0, 1, 0, 1))
37+
pie(
38+
c(280, 60, 20),
39+
c(&#39;Sky&#39;, &#39;Sunny side of pyramid&#39;, &#39;Shady side of pyramid&#39;),
40+
col = c(&#39;#0292D8&#39;, &#39;#F7EA39&#39;, &#39;#C4B632&#39;),
41+
init.angle = -50, border = NA
42+
)</code></pre>
43+
<div class="figure"><span id="fig:pie"></span>
44+
<img src="/post/2015-07-23-r-rmarkdown_files/figure-html/pie-1.png" alt="A fancy pie chart." width="672" />
45+
<p class="caption">
46+
Figure 1: A fancy pie chart.
47+
</p>
48+
</div>
49+
</div>
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: "A Plain Markdown Post"
3+
date: "2016-12-30T21:49:57-07:00"
4+
---
5+
6+
This is a post written in plain Markdown (`*.md`) instead of R Markdown (`*.Rmd`). The major differences are:
7+
8+
1. You cannot run any R code in a plain Markdown document, whereas in an R Markdown document, you can embed R code chunks (```` ```{r} ````);
9+
2. A plain Markdown post is rendered through [Blackfriday](https://gohugo.io/overview/configuration/), and an R Markdown document is compiled by [**rmarkdown**](http://rmarkdown.rstudio.com) and [Pandoc](http://pandoc.org).
10+
11+
There are many differences in syntax between Blackfriday's Markdown and Pandoc's Markdown. For example, you can write a task list with Blackfriday but not with Pandoc:
12+
13+
- [x] Write an R package.
14+
- [ ] Write a book.
15+
- [ ] ...
16+
- [ ] Profit!
17+
18+
Similarly, Blackfriday does not support LaTeX math and Pandoc does. I have added the MathJax support to this theme ([hugo-lithium-theme](https://github.com/yihui/hugo-lithium-theme)) but there is a caveat for plain Markdown posts: you have to include math expressions in a pair of backticks (inline: `` `$ $` ``; display style: `` `$$ $$` ``), e.g., `$S_n = \sum_{i=1}^n X_i$`.^[This is because we have to protect the math expressions from being interpreted as Markdown. You may not need the backticks if your math expression does not contain any special Markdown syntax such as underscores or asterisks, but it is always a safer choice to use backticks. When you happen to have a pair of literal dollar signs inside the same element, you can escape one dollar sign, e.g., `\$50 and $100` renders "\$50 and $100".] For R Markdown posts, you do not need the backticks, because Pandoc can identify and process math expressions.
19+
20+
When creating a new post, you have to decide whether the post format is Markdown or R Markdown, and this can be done via the `ext` argument of the function `blogdown::new_post()`, e.g.
21+
22+
```r
23+
blogdown::new_post("Post Title", ext = '.Rmd')
24+
```

index.Rmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
site: blogdown:::blogdown_site
3+
---

public/.gitkeep

Whitespace-only changes.
+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta name="generator" content="Hugo 0.30.2" />
7+
8+
9+
<title>Lorem Ipsum - A Hugo website</title>
10+
<meta property="og:title" content="Lorem Ipsum - A Hugo website">
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
<link rel="stylesheet" href="/css/fonts.css" media="all">
23+
<link rel="stylesheet" href="/css/main.css" media="all">
24+
25+
26+
27+
</head>
28+
<body>
29+
<div class="wrapper">
30+
<header class="header">
31+
<nav class="nav">
32+
<a href="/" class="nav-logo">
33+
<img src="/images/logo.png"
34+
width="50"
35+
height="50"
36+
alt="Logo">
37+
</a>
38+
39+
<ul class="nav-links">
40+
41+
<li><a href="/about/">About</a></li>
42+
43+
<li><a href="https://github.com/rstudio/blogdown">GitHub</a></li>
44+
45+
<li><a href="https://twitter.com/rstudio">Twitter</a></li>
46+
47+
</ul>
48+
</nav>
49+
50+
</header>
51+
52+
53+
<main class="content" role="main">
54+
55+
<article class="article">
56+
57+
<span class="article-duration">1 min read</span>
58+
59+
60+
<h1 class="article-title">Lorem Ipsum</h1>
61+
62+
63+
<span class="article-date">2015/01/01</span>
64+
65+
66+
<div class="article-content">
67+
<p><strong>Lorem ipsum</strong> dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore <em>magna aliqua</em>. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
68+
69+
</div>
70+
</article>
71+
72+
73+
74+
75+
</main>
76+
77+
<footer class="footer">
78+
<ul class="footer-links">
79+
<li>
80+
<a href="/index.xml" type="application/rss+xml" target="_blank">RSS feed</a>
81+
</li>
82+
<li>
83+
<a href="https://gohugo.io/" class="footer-links-kudos">Made with <img src="/images/hugo-logo.png" width="22" height="22"></a>
84+
</li>
85+
</ul>
86+
</footer>
87+
88+
</div>
89+
90+
91+
92+
93+
94+
</body>
95+
</html>
96+

0 commit comments

Comments
 (0)