We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Giscus widget displays "An error occurred: giscus is not installed on this repository" when the repo YAML key is supplied with a quarto variable.
repo
Inspecting the Giscus iframe reveals the src is
src
https://giscus.app/en/widget?origin=http%3A%2F%2Flocalhost%3A5093%2F&session=&theme=light&reactionsEnabled=1&emitMetadata=0&inputPosition=top&repo=%7B%7B%26lt%3B+var+repo_name+%26gt%3B%7D%7D&repoId=&category=General&categoryId=&strict=0&description=&backLink=http%3A%2F%2Flocalhost%3A5093%2F&term=index
Of note is %7B%7B%26lt%3B+var+repo_name+%26gt%3B%7D%7D, which indicates that Giscus is passed the repo value before Quarto resolves the variable.
%7B%7B%26lt%3B+var+repo_name+%26gt%3B%7D%7D
I consider this a bug because in other instances, (e.g. hrefs), variable-containing strings in _quarto.yml are properly resolved.
_quarto.yml
_quarto.yml:
project: type: website comments: giscus: repo: "{{< var repo_name >}}" #repo: ekiefl/quarto-website-test
index.qmd:
index.qmd
--- --- # {{< var repo_name >}}
_variables.yml:
_variables.yml
repo_name: ekiefl/quarto-website-test
Then run quarto preview.
quarto preview
Variable resolves and the widget renders.
Variable reference is treated literally and the widget receives the wrong src.
No response
Quarto 1.6.39 [✓] Checking environment information... Quarto cache location: /Users/evan/Library/Caches/quarto [✓] Checking versions of quarto binary dependencies... Pandoc version 3.4.0: OK Dart Sass version 1.70.0: OK Deno version 1.46.3: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.6.39 Path: /Applications/quarto/bin [✓] Checking tools....................OK TinyTeX: v2025.01 Chromium: (not installed) [✓] Checking LaTeX....................OK Using: TinyTex Path: /Users/evan/Library/TinyTeX/bin/universal-darwin Version: 2024 [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.12.2 (Conda) Path: /opt/miniconda3/bin/python Jupyter: (None) Jupyter is not available in this Python installation. Install with conda install jupyter [✓] Checking R installation...........OK Version: 4.4.2 Path: /Library/Frameworks/R.framework/Resources LibPaths: - /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library knitr: 1.48 rmarkdown: 2.28 [✓] Checking Knitr engine render......OK
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug description
Giscus widget displays "An error occurred: giscus is not installed on this repository" when the
repo
YAML key is supplied with a quarto variable.Inspecting the Giscus iframe reveals the
src
ishttps://giscus.app/en/widget?origin=http%3A%2F%2Flocalhost%3A5093%2F&session=&theme=light&reactionsEnabled=1&emitMetadata=0&inputPosition=top&repo=%7B%7B%26lt%3B+var+repo_name+%26gt%3B%7D%7D&repoId=&category=General&categoryId=&strict=0&description=&backLink=http%3A%2F%2Flocalhost%3A5093%2F&term=index
Of note is
%7B%7B%26lt%3B+var+repo_name+%26gt%3B%7D%7D
, which indicates that Giscus is passed therepo
value before Quarto resolves the variable.I consider this a bug because in other instances, (e.g. hrefs), variable-containing strings in
_quarto.yml
are properly resolved.Steps to reproduce
_quarto.yml
:index.qmd
:_variables.yml
:Then run
quarto preview
.Expected behavior
Variable resolves and the widget renders.
Actual behavior
Variable reference is treated literally and the widget receives the wrong
src
.Your environment
No response
Quarto check output
The text was updated successfully, but these errors were encountered: