Liquid includes file enables JavaScript sourcing of MathJax on Jekyll built Pages
Bash Variables
_module_name='includes-mathjax'
_module_https_url="https://github.com/liquid-utilities/${_module_name}.git"
_module_relative_path="_includes/modules/${_module_name}"
Bash Submodule Commands
cd "<your-git-project-path>"
git checkout gh-pages
mkdir -vp "_includes/modules"
git submodule add\
-b master --name "${_module_name}"\
"${_module_https_url}" "${_module_relative_path}"
Suggested additions for your ReadMe.md
file so everyone has a good time with submodules
Clone with the following to avoid incomplete downloads
git clone --recurse-submodules <url-for-your-project>
Update/upgrade submodules via
git submodule update --init --merge --recursive
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{%- include head.html -%}
<body>
{%- include modules/includes-mathjax/includes-mathjax.html -%}
{%- include header.html -%}
<main class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
</div>
</main>
{%- include footer.html -%}
</body>
</html>
_posts/2019-04-02-points-00-preface.md
---
layout: post
title: "Points 00 Preface"
date: 2019-04-02 06:05:58 -0700
categories: graph
mathjax: true
---
> _Unwrapped_ Graph of Nodes Example
$$
\color{#000}{\fbox{ w }}{
\color{#2E8B57}{ \xleftarrow[]{\color{#000}{X}} }}
\color{#00A}{ \fbox{ u } }{
\color{#2E8B57}{ \xrightarrow[]{\color{#000}{X}} }}
\color{#000}{\fbox{ v }}
\\
\color{#000}{\fbox{ u }}{
\color{#FF0000}{ \xleftarrow[]{\color{#000}{O}} }}
\color{#00A}{ \fbox{ v } }{
\color{#2E8B57}{ \xrightarrow[]{\color{#000}{X}} }}
\color{#000}{\fbox{ w }}
\\
\color{#000}{\fbox{ v }}{
\color{#2E8B57}{ \xleftarrow[]{\color{#000}{X}} }}
\color{#00A}{ \fbox{ w } }{
\color{#FF0000}{ \xrightarrow[]{\color{#000}{O}} }}
\color{#000}{\fbox{ u }}
$$
git add .gitmodules
git add _includes/modules/includes-mathjax
## Add any changed files too
git commit -F- <<'EOF'
:heavy_plus_sign: Adds `liquid-utilities/includes-mathjax#1` submodule
**Additions**
- `.gitmodules`, tracks submodules AKA Git within Git _fanciness_
- `README.md`, updates installation and updating guidance
- `_includes/modules/includes-mathjax`, injects JavaScript sourcing of MathJax
EOF
git push origin gh-pages
π Excellent π your site is now ready to begin unitizing code from this repository!
Some but not all configurations have been made available from site _config.yml
and page/post FrontMatter contexts
_config.yml
mathjax:
version: "2.7.5"
config: "MMLorHTML.js"
jax:
- "input/TeX"
- "input/MathML"
- "output/HTML-CSS"
- "output/NativeMML"
extensions:
- "tex2jax.js"
- "mml2jax.js"
- "MathMenu.js"
- "MathZoom.js"
TeX:
extensions:
- "AMSmath.js"
- "AMSsymbols.js"
- "noErrors.js"
- "noUndefined.js"
Pull Requests are most welcomed to add features and/or fix bugs.
Resources that where helpful in building this project so far
Legal bits of Open Source software
Includes MathJax ReadMe documenting how things like this could be utilized
Copyright (C) 2019 S0AndS0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation; version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.