html file made from a Quarto document (.qmd) not working well for others than me

411 Views Asked by At

I am new to R and I'm having a problem sharing my R Quarto document with others (who don't use R). I would most like to share it as a html file but it comes out quite different when someone else opens it on their computer.

There already is a html file with my work (along with the .qmd file) in my folder (created by rendering the .qmd), but when I sent it to another person who opened it on their computer, it came out very differently from how it is when I open it. The font was different and the plots didn't show. Is there something I have to do before sharing a html file such as this with someone else or is there something the recipient has to do differently (they just clicked on the file they got sent and it opened)?

This is the header in my .qmd file (as shown in R):

---
title: "netkonnun_b"
format: html
editor: visual
---

Screenshots: 1) when I open it 2) when someone else opens it

1

There are 1 best solutions below

0
On

You should make you html shareble including something like:

---
title: "your_title"
author: "author"
date: "`r Sys.Date()`"
format:
    html:
      toc-title: Table of contents
      toc: true
      toc-depth: 2
      number-sections: true
      highlight-style: github
      toc-location: body
      cap-location: top
      page-layout: full
      embed-resources: true
      self-contained-math: true
      toc-expand: true
editor: visual
---

embed-resources: true and self-contained-math: true are responsible for making it shareble.