Skip to content

Commit fc6a32d

Browse files
committed
show dir structure in readme
1 parent ea5c41c commit fc6a32d

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,20 @@ writeLines(
9898
con = file.path(website, "posts", "blog-template.html")
9999
)
100100

101-
cat("website", list.files(website, recursive = TRUE), sep = "\n- ")
102-
#> website
103-
#> - about-me.html
104-
#> - index.html
105-
#> - posts/blog-template.html
101+
cat(
102+
"website",
103+
list.files(website, recursive = TRUE),
104+
sep = "\n- "
105+
)
106106
```
107107

108108
</details>
109109

110+
website
111+
- about-me.html
112+
- index.html
113+
- posts/blog-template.html
114+
110115
You can generate a new `ExTera` around this directory like so
111116

112117
``` r
@@ -117,9 +122,9 @@ tera
117122
#> ── ExTera ──
118123
#>
119124
#> Template library:
120-
#> • posts/blog-template.html
121125
#> • about-me.html
122126
#> • index.html
127+
#> • posts/blog-template.html
123128
```
124129

125130
## Rendering basics
@@ -201,8 +206,8 @@ tera
201206
#> ── ExTera ──
202207
#>
203208
#> Template library:
204-
#> • posts/blog-template.html
205209
#> • index.html
210+
#> • posts/blog-template.html
206211
#> • star-wars
207212
#> • about-me.html
208213

README.qmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ initialize an `ExTera` by specifying the directory with a glob containing the
7171
`*` wildcard to indicate any number of subfolders and template files. Suppose,
7272
for example, that you have a `website` directory that looks like this:
7373

74-
```{r}
74+
```{r collapse = FALSE, comment = ""}
7575
#| label: directory
7676
#| code-fold: true
7777
website <- file.path(tempdir(), "website")
@@ -94,7 +94,11 @@ writeLines(
9494
con = file.path(website, "posts", "blog-template.html")
9595
)
9696
97-
cat("website", list.files(website, recursive = TRUE), sep = "\n- ")
97+
cat(
98+
"website",
99+
list.files(website, recursive = TRUE),
100+
sep = "\n- "
101+
)
98102
```
99103

100104
You can generate a new `ExTera` around this directory like so

0 commit comments

Comments
 (0)