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

1.2k views Asked by At

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?

2

There are 2 answers

0
Resu On BEST ANSWER

I solved it using:

---
---

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

Try adding @import "../../assets/css/styles.scss"; inside primer/_sass/primer-base/index.scss