-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy path_sample_meta_and_options.Rmd
75 lines (57 loc) · 2.01 KB
/
_sample_meta_and_options.Rmd
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
---
title: "Title"
description: |
A short description of the post.
author:
- name: First Last
url: https://twitter.com/XXXYYYYZZZ
date: "`r Sys.Date()`"
output:
distill::distill_article:
self_contained: false
toc: true
toc_depth: 3
repository_url: "https://github.com/nflverse/open-source-football"
categories:
- Figures
- nflfastR
- Another categorie
---
<!-- ####################################################################### -->
<!-- Please keep the following chunk as is at the top of your document.
It will set some global chunk options. -->
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = TRUE,
message = FALSE,
warning = FALSE,
dpi = 300,
tidy = 'styler'
)
```
<!-- ####################################################################### -->
When creating a plot with a code chunk please consider using the whole page width
and just choose an appropriate height (in inches) with a chunk as follows
```{r, layout="l-page", fig.height=X.Y}
# code
```
If you want to use a plot as preview of your post, just add the option `preview=TRUE`
like
```{r, layout="l-page", fig.height=X.Y, preview=TRUE}
# code
```
<!-- ####################################################################### -->
<!-- Place at end of document
Please keep this hunk as is at end of your document.
It will create a hyperlink to the source file. -->
```{r gh-source, results='asis', echo=FALSE}
'%>%' <- magrittr::`%>%`
fld <- fs::path_wd() %>% fs::path_split() %>% purrr::pluck(1) %>% tibble::as_tibble() %>% dplyr::slice_tail(n = 1)
fn <- fs::path_wd() %>% fs::dir_ls() %>% fs::path_filter("*.Rmd") %>% fs::path_rel()
glue::glue('<a href="https://github.com/nflverse/open-source-football/blob/master/_posts/{fld}/{fn}"
style="font-family:Consolas;color:blue;background-color:#f8f8f8;align:right;font-size:75%;"
>View source code on GitHub
</a>'
)
```
<!-- ####################################################################### -->