quarto-dev / quarto-dev/quarto-cli

inline R in blog yaml isn't executed on listing page

Open
#1,505 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

listings
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I have a blog post with a description that contains inline r (to estimate reading time)

it renders nicely for the post itself
image

but not in the listing page!
image

here's the yml of my post's index.qmd:

---
draft: false
title: A nice blog post
description: |
  Reading time: `r ifelse(file.size("index.qmd")/2000 <= 1, '<1 minute', paste0(round(file.size("index.qmd")/2000), ' minutes'))`
---

Any idea of how I can fix the listing?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided index.qmd, comparing the post page with its listing page. Trace how the description is rendered in each context; done means the inline R expression in the description is handled consistently on both pages.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.