qibogang / qibogang.github.io

The gang site :)
https://qibogang.github.io
0 stars 0 forks source link

Change font style in markdowns #26

Open MatteoRobbiati opened 1 year ago

MatteoRobbiati commented 1 year ago

It should be great to have a better font style for the rendered markdown. I would like to see something like this. At the moment the tutorial style is based on the available Web-Safe css fonts. Maybe some plugin for the text format exists which can be used together with next-mdx-remote.

alecandido commented 1 year ago

The mega-repo of web fonts is: https://fonts.google.com/

But please, even if extremely comfortable, do not use directly the CSS or HTML that Google fonts is suggesting, because it will result in an extra external load on the client.

Once more, better to bundle everything in our site, and self-host fonts as well.

This is done extremely easily using npm package from https://fontsource.org/ (btw, by Vercel as well, I didn't remember xD). Essentially, they packaged Google fonts in npm packages, to be simple to use, but self-hosted as well :)