jekyll-theme-simple-texture
jekyll-theme-simple-texture copied to clipboard
add MathJax for LaTeX support
@HHONG-WM
Sorry for the wait!
Just had a look, a small tweak is needed. Basically, what I'm trying to change:
- Rename MathJax.html to math-jax.html for file naming consistency
- Move MathJax to post.html, not blog.html. I assume you only need this support inside the blog post, not the blog page itself.
- Create a configuration key to control it, so that most people won't load this extra JS file.
Tried to tweak a bit directly on GitHub, but only managed to remove but not to add. Below is needed, could you please add it in your branch? Thanks
- Add confugration key
load_math_jax
in both of the_config.yml
files:
jekyll-theme-simple-texture/_config.yml
jekyll-theme-simple-texture/starter-kit/_config.yml
# Site Settings
encoding: UTF-8
exclude: ["*.gem", "*.gemspec", "Gemfile", "Gemfile.lock", "node_modules", "Rakefile", "starter-kit", "vendor"]
lang: en # Language code as defined in _data/i18n.yml. en, en-gb, en-us, zh, zh-cn, zh-tw etc.
permalink: /blog/:year/:month/:day/:title/
whitelist: [jekyll-feed, jekyll-redirect-from, jekyll-seo-tag, jekyll-sitemap]
plugins:
- jekyll-feed
- jekyll-redirect-from
- jekyll-seo-tag
- jekyll-sitemap
markdown: kramdown
kramdown:
auto_id_prefix: 'heading-'
smart_quotes: ["apos", "apos", "quot", "quot"]
toc_levels: 1..3
sass:
style: compressed
# Site Data
url: # the base hostname & protocol for your site, e.g. http://example.com
baseurl: # the subpath of your site, e.g. /blog
title: Simple Texture
description: "A gem-based responsive simple texture styled Jekyll theme."
keywords: 'jekyll,theme,gem-based,blog'
author:
name:
job_title:
location:
email:
social_links:
- name: facebook
url:
- name: github
url: https://github.com/yizeng/jekyll-theme-simple-texture
- name: instagram
url:
- name: linkedin
url:
- name: stackoverflow
url:
- name: twitter
url:
- name: vk
url:
home:
section1: <h1>Simple Texutre</h1>
section2: <h2>A gem-based responsive simple texture styled Jekyll theme</h2>
section3: <div class="social-links"><a class="ico-github btn" href="https://github.com/yizeng/jekyll-theme-simple-texture" title="View on GitHub"></a></div>
blog:
cc_license: http://creativecommons.org/licenses/by-sa/4.0/ # A link to CC License of your choice.
cc_license_image: /assets/images/theme/cc-by-sa.png # An image of your CC License.
footer_content: A gem-based responsive simple texture styled <a href="http://jekyllrb.com/">Jekyll</a> theme.
disqus:
shortname: # e.g. yizeng
public_key: # e.g. ULZ0b9TFefCUJHKQd4JCKv2v3u27YoG7YG8zXPewkWrT333Z0Se9YnxLzoV6VM8W
google_tag_manager: # e.g. 'GTM-KCQJXZ8F'
addthis_public_id: # AddThis sharing plugin. See http://www.addthis.com/. E.g. ra-53329e27694534j5
load_math_jax: # true to turn it on.
paths:
home: /
blog: /blog/
categories: /blog/categories/
tags: /blog/tags/
-
Inside
jekyll-theme-simple-texture/_layouts/post.html
add the following at the end (with the correct spacing (4 spaces)):{% if site.load_math_jax %} {% include common/math-jax.html %} {% endif %}
-
Have a test around to see if it still works as you intended