rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 334 forks source link

unable to embed Rmd file in html output #763

Open plantarum opened 4 months ago

plantarum commented 4 months ago

I read that we can include the Rmd source file along with the html when generating our blogdown site:

https://bookdown.org/yihui/rmarkdown-cookbook/embed-rmd.html#

output:
  html_document:
    code_download: true

I tried that on a post, using the following header:

---
layout: post
categories: 
- tutorials
excerpt: "Ecospat Analysis Workflow, with Terra"
date: "2023-07-28"
updated: 2024-05-10
tags: 
- R
- sdm
title: "Niche Quantification with Ecospat and Terra"
slug: ecospat-terra
bibliography: ../../plantarum.json
link-citations: true
output:
  html_document:
    code_download: true
---

The resulting page is here:

https://plantarum.ca/2023/07/28/ecospat-terra/

There's no link to download the Rmd file. Do I need to add a link to the markdown, or change the template to include this?

Thanks,

Tyler

yihui commented 3 months ago

The html_document output format is not supported. Please see documentation here: https://bookdown.org/yihui/blogdown/output-format.html#customize-the-r-markdown-output-format