Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added math equations and google fonts support #111

Merged
merged 2 commits into from
Apr 15, 2022
Merged

Added math equations and google fonts support #111

merged 2 commits into from
Apr 15, 2022

Conversation

6cdh
Copy link
Contributor

@6cdh 6cdh commented Feb 27, 2021

I added the support of math equations and Google fonts. Both Mathjax and Katex are supported.

To enable Mathjax, edit config.toml to set mathjax = true or only set it in the front matter for a specific post. Katex as well.
Both should not be enabled at the same time.

$$ is used for math block and $ for inline math. For example:

$$
E = mc^2
$$

or $E=mc^2$.

There is no cost if disabled.

Google fonts can be used for custom font-family. For example, edit config.toml:

[params.assets]
googleFonts = ["Quicksand", "Open Sans"]
customCSS = ["css/custom.css"]

/static/css/custom.css:

body,
button,
input,
select,
textarea {
  font-family: Quicksand, "Open Sans", Helvetica, Tahoma, Arial, STXihei, sans-serif;
}

There is no cost if googleFonts is an empty list.

@ribice ribice merged commit 35dce88 into ribice:master Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants