1

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?

Resu
  • 187
  • 1
  • 12
  • 1
    This approach works for me for the Slate theme. My `style.scss` looks just like the one in your question. – Alan M Jan 01 '22 at 22:33

2 Answers2

1

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

Suzuna Minami
  • 391
  • 2
  • 11
  • 1
    I don't have such a file on my repo (my earlier link is the github theme's repo). Are u suggesting to create another file `_sass/primer-base/index.scss` in my repo with an additional statement `@import "../../assets/css/style.scss"` inside (with previous import statements also copied over)? I've tried out ur suggestion but had no success with it. – Resu Apr 21 '21 at 23:50
1

I solved it using:

---
---

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