mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-25 14:29:36 +01:00
chore: add useKatex option
This commit is contained in:
parent
f6860c8a75
commit
d5d6b2bf50
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3,3 +3,4 @@
|
|||||||
/.editorconfig export-ignore
|
/.editorconfig export-ignore
|
||||||
/.travis.yml export-ignore
|
/.travis.yml export-ignore
|
||||||
**/*.js.snap export-ignore
|
**/*.js.snap export-ignore
|
||||||
|
/static/css export-ignore
|
@ -9,6 +9,7 @@ module.exports = {
|
|||||||
disqusShortname: '',
|
disqusShortname: '',
|
||||||
postsPerPage: 4,
|
postsPerPage: 4,
|
||||||
googleAnalyticsId: 'UA-73379983-2',
|
googleAnalyticsId: 'UA-73379983-2',
|
||||||
|
useKatex: false,
|
||||||
menu: [
|
menu: [
|
||||||
{
|
{
|
||||||
label: 'Articles',
|
label: 'Articles',
|
||||||
|
@ -45,16 +45,4 @@ Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac tu
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### KaTeX Demo
|
|
||||||
|
|
||||||
$$
|
|
||||||
f_{\alpha}(x) = \dfrac{x^2}{(x^2+x_{max}-x)^\alpha}
|
|
||||||
$$
|
|
||||||
|
|
||||||
Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui.
|
|
||||||
|
|
||||||
$$
|
|
||||||
\alpha = \dfrac{t}{t_{max}}*\dfrac{\log(v)}{\log(v_{max})}
|
|
||||||
$$
|
|
||||||
|
|
||||||
Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
|
Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus.
|
@ -1,5 +1,4 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
require('./src/assets/scss/init.scss');
|
require('./src/assets/scss/init.scss');
|
||||||
|
require('./static/css/prismjs/theme.min.css');
|
||||||
exports.onClientEntry = () => {};
|
|
||||||
|
@ -29,6 +29,13 @@ module.exports = {
|
|||||||
name: 'media'
|
name: 'media'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
resolve: 'gatsby-source-filesystem',
|
||||||
|
options: {
|
||||||
|
name: 'css',
|
||||||
|
path: `${__dirname}/static/css`
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
resolve: 'gatsby-source-filesystem',
|
resolve: 'gatsby-source-filesystem',
|
||||||
options: {
|
options: {
|
||||||
@ -193,6 +200,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'gatsby-plugin-flow',
|
'gatsby-plugin-flow'
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
3
gatsby-ssr.js
Normal file
3
gatsby-ssr.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
exports.onRenderBody = require('./gatsby/on-render-body.js');
|
22
gatsby/on-render-body.js
Normal file
22
gatsby/on-render-body.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const React = require('react');
|
||||||
|
const siteConfig = require('../config.js');
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-webpack-loader-syntax, import/no-unresolved
|
||||||
|
const katexStylesheet = require('!css-loader!../static/css/katex/katex.min.css');
|
||||||
|
|
||||||
|
const onRenderBody = ({ setHeadComponents }) => {
|
||||||
|
const { useKatex } = siteConfig;
|
||||||
|
|
||||||
|
if (useKatex) {
|
||||||
|
setHeadComponents([
|
||||||
|
React.createElement('style', {
|
||||||
|
key: 'katex-inline-stylesheet',
|
||||||
|
dangerouslySetInnerHTML: { __html: katexStylesheet.toString() }
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = onRenderBody;
|
@ -1,6 +1,4 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
@import "normalize-scss";
|
@import "normalize-scss";
|
||||||
@import "~katex/dist/katex.min.css";
|
|
||||||
@import "~prismjs/themes/prism-solarizedlight.css";
|
|
||||||
@import "base/generic";
|
@import "base/generic";
|
BIN
static/css/katex/fonts/KaTeX_AMS-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_AMS-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_AMS-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_AMS-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_AMS-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_AMS-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Bold.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Bold.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Bold.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Bold.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Bold.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Bold.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Caligraphic-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Fraktur-Bold.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Fraktur-Bold.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Fraktur-Bold.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Fraktur-Bold.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Fraktur-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Fraktur-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Fraktur-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Fraktur-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Fraktur-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Bold.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Bold.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Bold.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Bold.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Bold.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Bold.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-BoldItalic.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-BoldItalic.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-BoldItalic.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-BoldItalic.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Italic.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Italic.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Italic.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Italic.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Italic.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Italic.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Main-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Main-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Math-BoldItalic.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Math-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Math-BoldItalic.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Math-BoldItalic.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Math-BoldItalic.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Math-BoldItalic.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Math-Italic.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Math-Italic.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Math-Italic.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Math-Italic.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Math-Italic.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Math-Italic.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Bold.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Bold.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Bold.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Bold.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Bold.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Bold.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Italic.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Italic.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Italic.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Italic.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Italic.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Italic.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_SansSerif-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_SansSerif-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Script-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Script-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Script-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Script-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Script-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Script-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size1-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Size1-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size1-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Size1-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size1-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Size1-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size2-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Size2-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size2-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Size2-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size2-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Size2-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size3-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Size3-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size3-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Size3-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size3-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Size3-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size4-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Size4-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size4-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Size4-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Size4-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Size4-Regular.woff2
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Typewriter-Regular.ttf
Normal file
BIN
static/css/katex/fonts/KaTeX_Typewriter-Regular.ttf
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Typewriter-Regular.woff
Normal file
BIN
static/css/katex/fonts/KaTeX_Typewriter-Regular.woff
Normal file
Binary file not shown.
BIN
static/css/katex/fonts/KaTeX_Typewriter-Regular.woff2
Normal file
BIN
static/css/katex/fonts/KaTeX_Typewriter-Regular.woff2
Normal file
Binary file not shown.
1
static/css/katex/katex.min.css
vendored
Normal file
1
static/css/katex/katex.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
static/css/prismjs/theme.min.css
vendored
Normal file
1
static/css/prismjs/theme.min.css
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
code[class*=language-],pre[class*=language-]{color:#657b83;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{background:#073642}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{background:#073642}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background-color:#fdf6e3}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#93a1a1}.token.punctuation{color:#586e75}.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#268bd2}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string,.token.url{color:#2aa198}.token.entity{color:#657b83;background:#eee8d5}.token.atrule,.token.attr-value,.token.keyword{color:#859900}.token.class-name,.token.function{color:#b58900}.token.important,.token.regex,.token.variable{color:#cb4b16}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}
|
Loading…
Reference in New Issue
Block a user