github-pagesjekyll-theme

How do I change the fonts used in a github pages theme?


I'm using the primer theme from github pages, and would like to change all the fonts in the theme.

I've tried to follow the instructions provided in other posts and the theme's page, i.e., to create an assets/css/style.scss file and add:

---
---

@import "{{ site.theme }}";
body {
  font-family: "Times New Roman", Times, serif;
}

However, I don't see any changes in the font used on my github page. What am I doing wrong? Or is there a simpler way to do this?


Solution

  • I solved it using:

    ---
    ---
    
    @import "{{ site.theme }}";
    .markdown-body {
      font-family: 'Times New Roman', Times, serif;
    }