I am trying to convert xaringan slide to pdf file using the following code found in this page
--- title: "Lecture" subtitle: "subtitle" author: "Instructor" institute: "University" output: xaringan::moon_reader: css: [default, metropolis, metropolis-fonts, "styles.css"] lib_dir: libs seal: false nature: highlightStyle: arta highlightLines: true countIncrementalSlides: false titleSlideClass: [top, left] --- class: title-slide, top, left, inverse background-image: url(aaa.jpeg) background-size: cover # *`r rmarkdown::metadata$title`* ## *`r rmarkdown::metadata$subtitle`* ### `r rmarkdown::metadata$author` ### `r rmarkdown::metadata$institute` ### `r rmarkdown::metadata$date` ### `r Sys.Date()` ```{css, echo=FALSE} <style> .remark-slide-content.hljs-default { border-top: 40px solid #23373B; } .remark-slide-content > h1 { font-size: 35px; margin-top: -85px; } ``` --- # Why people are constantly switching? --- remotes::install_github('rstudio/pagedown') pagedown::chrome_print('lecture_1.html') ``` But I got the following error message:
Error in force(expr) : Failed to generate output. Reason: Cannot navigate to invalid URL
My question is how to fix the issue and where is the more proper location of my command (can I put the code on the slide or should I put it on a separate window panel in Rstudio)?