11 Jan 2018
I had some issues with the links pointing to the main page in the sidebar. They would always point to the current page. I fixed this by changing site.baseurl
to site.url
in the definition of these two links (title and Home) in the file _includes/sidebar.html
.
Also, as I was looking for a solution to that problem, I found that all url’s in Jekyll should really be defined as { { site.baseurl } }{ { post.url } }
, and the variable baseurl
should be left empty, instead of /
. I found this page to be pretty useful.
11 Jan 2018
As described in a previous post, I am following the instructions posted on that
blog post.
First, we add the collecttags.html
file on _includes
.
Next, we add that file in the header, head.html
.
After that step, we can display the tags in the front matter of each post. In
addition, a link was created to a webpage listing all posts using that tag.
Next, we need to define those pages. In the blog post linked above, the author
provides a Python script to generate these pages automatically. The addition of
the cloud of tags work just as described.
09 Jan 2018
For this blog, I am using the poole/hyde
example. Unfortunately, this repo does not seem to be maintained anymore, and
the list of pull requests has grown steadily since 2015. The main modifications I
had to make to run this blog are:
- in
_config.yml
:
- change the markdown to
kramdown
- remove
relative_permalinks: true
- add the gems
jekyll-paginate, jekyll-seo-tag, jekyll-sitemap, jekyll-gist
- in the
_includes/head.html
- replace the ` { { site.baseurl }} ` with a simple slash
I also added Mathjax. I found online different approaches to do that. What seems
to work was to add the Mathjax script in the header of the html pages. Building
on the original organization, this meant adding the script to the file
_includes/head.html
. Following this discussion on
github, I added the following
lines,
<!-- Mathjax -->
<script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "all" } } }); </script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true
}
});
</script>
<script
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
Let’s check that it works inline $x^2 + y^2 = z^2$. It also works in displayMath
mode,
\[ \mathbb{P}(A|B) = \frac{\mathbb{P}(B|A) \mathbb{P}(A)}{\mathbb{P}(B)} \]
08 Jan 2018
If you want to serve this blog on your local machine, in the main directory,
type
There are a few features that I would like to add to this blog.
- I would like to manage tags. This is handled in Jekyll with the gem
jekyll-tagging, but unfortunately this gem is not available on GitHub. However
it is possible to regenerate the tagging capacity in Jekyll, for instance
by following that link.
- I would also need to have a summary page listing all posts. This is described
in this blog post.
- And of course, I will need support for
MathJax.
A few useful references for markdowns syntax: