How can I set different fonts for code / main article? #1463
-
Hello, @nunocoracao I've been looking at the discussions to make some change in my hugo blog. Is there any way I can set the fonts for main article and font for code snippets ? @font-face {
font-family: font;
src: url('/fonts/font.ttf');
}
html {
font-family: font;
} By the way, the theme you made is really great 👍 It's the best hugo theme I saw so far ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @ddoddii , thanks. |
Beta Was this translation helpful? Give feedback.
Hello @ddoddii , thanks.
There is no quick way to pull this off and it's very unlikely that any theme will support it. In order to achieve that you will need to override the theme - check Hugo docs - and hack the css for each individual article with specific fonts. Also you can try and leverage tailwind for it.