diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-05-08 11:50:20 +0000 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-05-08 11:50:20 +0000 |
commit | f2522c947519588234cab463a32b1bd1994475e6 (patch) | |
tree | c2e79ada96842fe2a669266d1d83979f4f8291e2 | |
parent | bump dependencies (diff) | |
download | blog-f2522c947519588234cab463a32b1bd1994475e6.tar.gz blog-f2522c947519588234cab463a32b1bd1994475e6.zip |
README.md: update
The MathJax notes were moved to egor-tensin/jekyll-theme README.
-rw-r--r-- | README.md | 81 |
1 files changed, 11 insertions, 70 deletions
@@ -6,8 +6,8 @@ Hosted on [GitHub Pages] at https://egor-tensin.github.io/blog/. [GitHub Pages]: https://pages.github.com -Prerequisites -------------- +Development +----------- [Jekyll] is used to build a set of static HTML pages from a collection of templates and resources. @@ -19,38 +19,21 @@ be installed by executing in the project's root directory. -[Jekyll]: https://jekyllrb.com/ -[Bundler]: http://bundler.io/ - -Usage ------ - -To run a local web server, execute +To run a local web server, run bundle exec jekyll serve --watch --drafts --config _config.yml,_config_dev.yml -in the project's root directory. You can then review your changes at http://localhost:4000/. -If you can't get Jekyll to properly `--watch` for file modifications on -Windows, try adding `--force_polling` to `jekyll`s options: +Or you can use [jekyll-docker] to set up a development environment in Docker +and not bother with installing everything locally. - bundle exec jekyll serve --watch --force_polling --drafts --config _config.yml,_config_dev.yml +[jekyll-theme] is used as a remote Jekyll theme. -It might still not work though, but you can always re-run `jekyll` manually. - -Note that `_config_dev.yml` is included to rewrite some of the `site` fields -from `_config.yml` during development. -In particular, it - -* sets `minified_externals` to `false` so that the properly formatted versions -of external CSS stylesheets and JavaScript files are included instead of the -`min`ified versions, -* sets `include_comments` to `false` to exclude the Disqus comments section -from the posts, -* sets `baseurl` to an empty string so that the website can be accessed from -local web server's root directory (i.e. from http://localhost:4000/ instead of -http://localhost:4000/blog/). +[Jekyll]: https://jekyllrb.com/ +[Bundler]: http://bundler.io/ +[jekyll-docker]: https://github.com/egor-tensin/jekyll-docker +[jekyll-theme]: https://github.com/egor-tensin/jekyll-theme ### Access via file:// @@ -58,46 +41,7 @@ Jekyll doesn't provide native support for generating a static website which can be browsed without running an instance of Jekyll's web server. One easy workaround is to `wget` the website and convert the links: - wget --convert-links --recursive http://localhost:4000/ - -### Typesetting math - -[MathJax] can be used to typeset mathematics using LaTeX. -To use MathJax, set `mathjax` to `true` in page's front matter. -Then you can do things like this: - -``` -This is an inline formula: $$y = kx + b$$. -This is a formula in a separate block: - -$$ -y = kx + b -$$ -``` - -[MathJax]: https://www.mathjax.org/ - -#### GitHub workarounds - -MathJax version 3 is used, which is unsupported by Kramdown (which produces -`<script type="math/tex; ..."` tags, suitable only for MathJax 2. -This is why `math_engine` is set to `null` in _config.yml, making Kramdown -output block formulas wrapped in `$$` and inline formulas in `$` respectively -([inside `<span class="kdmath">` elements][kramdown issue]). -Because if this, MathJax is additionally customized to recognize `$` as an -inline formula delimiter in _includes/common/mathjax.html. - -GitHub Pages [helpfully overrides] the `math_engine` setting in your -_config.yml, hardcoding it to `mathjax` instead of `null` (there's a related -[pull request]). -I couldn't find a better way than to override the setting in the markdown -document itself using - - {::options math_engine="+nil+" /} - -[kramdown issue]: https://github.com/gettalong/kramdown/issues/342 -[helpfully overrides]: https://help.github.com/en/articles/configuring-jekyll -[pull request]: https://github.com/github/pages-gem/pull/644 + wget --no-verbose --recursive --convert-links --adjust-extension -- http://localhost:4000/ License ------- @@ -105,7 +49,4 @@ License Distributed under the MIT License. See [LICENSE.txt] for details. -This website is build upon the Twitter Bootstrap framework, which is also MIT -Licensed and copyright 2015 Twitter. - [LICENSE.txt]: LICENSE.txt |