I am terrible at saving / remembering which recipes we have used and liked. My spouse has grown tired of me asking for the link to the same recipe again and again.
This is a quick attempt to save cooking recipes to a simple website I can control. And on the plus side, versus saving links in a browser or Notepad, this means I can access the recipes from anywhere.
Show the code
library(googlesheets4)library(gt)library(dplyr)library(gtExtras)library(fontawesome)fontawesome::fa_html_dependency()## List of 10## $ name : chr "font-awesome"## $ version : chr "6.4.0"## $ src :List of 1## ..$ file: chr "fontawesome"## $ meta : NULL## $ script : NULL## $ stylesheet: chr [1:2] "css/all.min.css" "css/v4-shims.min.css"## $ head : NULL## $ attachment: NULL## $ package : chr "fontawesome"## $ all_files : logi TRUE## - attr(*, "class")= chr "html_dependency"# Only need to use this when setting it up for the first time on a computer#gs4_auth()google_sheets_path <-'https://docs.google.com/spreadsheets/d/10cvArLbAus_PMVRZfFh6z8MEQE2OWnzIMIVTSV-WR5c/edit?usp=sharing'sheet <-read_sheet(google_sheets_path)sheet <- sheet %>%mutate(Recipe =paste0("[", Recipe, "](", Website, ")")) %>%select(-Website)gt_table <-gt(sheet) %>%tab_header('Recipes we like') %>%cols_width( Recipe ~pct(25),`Kids Rating`~pct(20),`Adult Rating`~pct(20), Notes ~pct(35) ) %>%fmt_markdown(columns =c(Recipe)) %>% gtExtras::gt_fa_rating(`Kids Rating`, icon='thumbs-up', color ='red') %>% gtExtras::gt_fa_rating(`Adult Rating`, icon='thumbs-up', color ='blue')%>% gtExtras::gt_theme_espn()gt_table