-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path_ZZ_move_HTML-docs_to_blog-dir.Rmd
81 lines (58 loc) · 1.91 KB
/
_ZZ_move_HTML-docs_to_blog-dir.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
76
77
78
79
80
---
title: "Link Documentation to blogdown Static Directory"
---
**README**: This documentation should only have to be done once. It creates a symbolic link from the Rfun website's static directory (blogdown's static directory) to the HTML documentation generated here by using RStudio's "Build website feature".
```{r}
library(fs)
library(here)
library(glue)
```
```{r}
dir_ls()
```
## `pwd()`
```{r}
#docstoo <- dir_create("docs2")
#dir_copy("docs", here())
here()
```
## Source dir
```{r}
source_dir <- "_book"
```
## Target dir
```{r}
#file_copy("docs", "docs2")
#dir_copy("docs", "docs2")
#dir_copy("docs", here("docs2"))
#dir_delete("docs2")
#here()
#dir_copy(here("docs"), here("docs2"))
up_1_dir <- ".."
#dir_workDesktop_funky1 <- "R"
#dir_workDesktop_funky2 <- "github"
dir_blogdown_target <- "libjohn.github.io"
#dir_blogdown_static_target <- "static"
dir_map_docs_target <- "openrefine"
target_dircopy_location <- glue(up_1_dir,
#dir_workDesktop_funky1,
#dir_workDesktop_funky2,
dir_blogdown_target,
#dir_blogdown_static_target,
dir_map_docs_target,
.sep = "/")
#target_dircopy_location
here(target_dircopy_location)
#dir_copy(here("docs"), here(target_dircopy_location))
#file_move(here(target_dircopy_location, "docs"),
# here(target_dircopy_location, "map"))
```
## Create Link
This next chunk will create a symbolic link from the local dir to target location (`target_dircopy_location`)
## Make Link / Procedure
To run, **and to avoid** unnecessary **messiness**, append `{r}` to the code chunk below. Then run the chunk.
But, **only need to run this once!** Because, this creates a symbolic link from the source to the target.
```
link_create(here(source_dir),
here(target_dircopy_location))
```