quarto-dev / quarto-dev/quarto-cli

Inlined JavaScript adds 20K to every HTML file

Open
#11,994 0 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Jan 30, 2025.

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

Description

I was trying to figure out why my documentation site, rendered by Quarto, was taking up around 60MB when rendered to HTML. I found that every .html file (all 273 of them) has the same JavaScript inlined at the bottom of them, adding up to around 20K for each file, or roughly 10% of the total rendered site size.

It seems to be coming from here: https://github.com/quarto-dev/quarto-cli/blob/1dc41fab2e7839c36f55aa0ba21d93c9c9a43ffa/src/resources/formats/html/templates/quarto-html.ejs

It would be nice if this could be refactored and either included in one of the other JS files we already load, or even if it were in its own file, we would only have to have one copy of it in the project, and it would be cacheable.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.