You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: posts/new_blog_who_dis/index.qmd
+5-16Lines changed: 5 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -60,13 +60,11 @@ On the other hand, my Jekyll blog directory looks like has markdown files under
60
60
61
61
So the first task is to convert all my markdown blog posts into their own sub-folder under a *posts* directory. I would also like to grab any and all meta data out of the posts while doing so.
posts_raw<-data.frame(post_loc=posts, # full filepath
72
70
post_name= basename(posts) # just the file name
@@ -92,19 +90,14 @@ posts_info <- posts_raw |>
92
90
str_remove_all("[[:punct:]]") |>
93
91
str_trim() |>
94
92
str_c(collapse=", "),
95
-
) |>
96
-
select(post, title, date, categories, author)
97
-
```
98
-
99
-
```{r}
100
-
tail(posts_info)
93
+
)
101
94
```
102
95
103
96
I then did a bunch of text cleaning of my tags/categories, but honestly I ended up rewriting them manually anyway, so I'm going to ignore that code for now.
104
97
105
98
With all the post information, and most of the meta data, now I could write the new post structure and files.
106
99
107
-
```{r}
100
+
```r
108
101
fill_between<-function(x) {
109
102
x_log= str_detect(x, "---")
110
103
@@ -137,13 +130,9 @@ posts_all <- posts_info |>
137
130
select(dir_title, new_post_txt)
138
131
```
139
132
140
-
```{r}
141
-
head(posts_all)
142
-
```
143
-
144
133
Now with the posts written in the way I wanted them, I just had to create the new sub-folders, and write the posts out into individual index.qmd files.
0 commit comments