rstudio / pagedown

Paginate the HTML Output of R Markdown with CSS for Print
https://pagedown.rbind.io
Other
892 stars 128 forks source link

Editing div.date to allow for hyperlinked image #312

Open alapo opened 1 year ago

alapo commented 1 year ago

I am trying to edit the pagedown resume template to allow for a clickable PDF icon that brings the user to a PDF of a published article. I am able to accomplish this using the following code

CV$pubs %<>% # trying to add the PDF icon below the year
  dplyr::mutate(
    PDF = case_when(
        # If there is a PDF link present
    is.na(PDF) == FALSE ~ paste0("[![PDF](raw/pdf-icon.svg){width=3%}](", PDF, ")"),
    # If there isnt don't paste anything
    is.na(PDF) == TRUE ~ " "
  ))

  glue_template_pubs <- "
### {Title}

{Authors} \n  *{Journal}*. \n {DOI}. {PDF}

N/A

{Year}

\n\n\n"

This results in a small PDF icon being placed at the end of article text.

My Remote Image

My question is how can I modify the div.date css code in order for this figure to show up below the year. An example is shown below

My Remote Image pdf-icon