Skip to content

Commit

Permalink
refactor: ♻️ set project details as a callout block
Browse files Browse the repository at this point in the history
  • Loading branch information
lwjohnst86 committed Sep 11, 2024
1 parent d5a1b14 commit 214a2f3
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions R/admin.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,19 @@ admin_create_project <- function(path) {

admin_list_projects_as_md <- function(type = "approved") {
project_description_template <- "
\n
### {id}: {project_title}
\n
{project_description}
\n
- Lead author: {full_name}, {job_position} at {affiliation}
- GitHub repository: [github.com/steno-aarhus/{id}](https://github.com/steno-aarhus/{id})
{doi}
"
\n
::: {{.callout-note appearance='minimal' icon='false' collapse='true'}}
\n
### {id}: {project_title}
\n
{project_description}
\n
- Lead author: {full_name}, {job_position} at {affiliation}
- GitHub repository: [github.com/steno-aarhus/{id}](https://github.com/steno-aarhus/{id})
{doi}
:::
\n
"
admin_read_projects(type) |>
purrr::map(\(project) format_doi_as_md_list(project)) |>
purrr::map(\(project) glue::glue_data(project, project_description_template)) %>%
Expand Down

0 comments on commit 214a2f3

Please sign in to comment.