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

Is therer anyway to include mathjax since there is no layout folder in minima? #100

Closed
youngji-cho opened this issue Jan 15, 2017 · 1 comment

Comments

@youngji-cho
Copy link

I have learn that to add mathjax, I have to include mathjax scrpit in " layouts" folder. "http://stackoverflow.com/questions/10987992/using-mathjax-with-jekyll"

In minima version, there is no "layout"folder.
http://stackoverflow.com/questions/38891463/jekyll-default-installation-doesnt-have-layouts-directory

Is there any way to include mathjax in minima?

@DirtyF
Copy link
Member

DirtyF commented Jan 15, 2017

By default you don't see _layouts, _includes folders because the theme uses the ones stored in the gem. In order to customize a theme, you'll need to override theme's files or add new ones.

To know that, you must able to study the theme's files, for minima an easy way is to look at the code on this repository.

I don't know MathJax, but I would:

  • store JS scripts in assets/js/ or use Mathjax CDN
  • create an include to insert the script tag in _includes/mathjax.html
  • copy and edit _layouts/post.html and insert something like
{% if page.math != false %}
 {% include mathjax.html %}
{% endif %}

So that everytime you need to use Mathjax in a post, you add this in the post Front Matter:

math: true

@DirtyF DirtyF closed this as completed Jul 5, 2017
@jekyll jekyll locked and limited conversation to collaborators Apr 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants