Working with Jekyll
This blog post has been created to remind myself the complete process to install an initial functionin bundle and how to mantain it.
Create the initial bundle
The following step are the ordered list of the commands that need to be exectued to get a new and fresh version on the initial bundle.
- If a suddend close of the command line occours, reinstall a new bundle and substitute the old folder into the fresh one.
- jekyll new Your New Blog
- cd your new blog
- gem install bundler
- (bundle add webrick)
- bundle install
- bundle exec jekyll serve
Create and modify posts
To modify posts simply add an .md
file to the _post
directory.
Create new sections in the head bar
In _site
folder copy About folder and change name at the new directory.
I don’t have _includes foldes in the default jekyll website creation?
Find additional forlders _includes:
Basically Jekyll wants you to use themes, so you can’t see _layouts (evidenzia parola), _includes
, _sass
, _assets
anymore.
To use previous behaviour simply copy from the gemfile:
open $(bundle show minima)
Copy the 4 folders into your jekyll directory
Ref:
- https://stackoverflow.com/questions/38891463/jekyll-default-installation-doesnt-have-layouts-directory
How to remove the subscribe via RSS from home
Include MathJax
Here’s a brief summary:
- In the
_config.yml
, add the following lines:
- On the top of the posts that you’d like to add mathjax support (it’s called the YAML ‘‘front matter’’) , add the following line:
- Add these lines to
_includes/head.html
:
- After that, simply wrap the math symbols with two double-dollar sign
$$
for page equations and\\(
\\)
for in-line math:
You should be able to see it in your post as: \(E=mc^2\)
A note on Matrices rendering:
Matrices are rendering if all the correct keywords are in the equations.
\[\hat{y_3}= \left[\begin{array}{rr} 4 & 8 \end{array}\right] \left[\begin{array}{r} 24 \\ 4 \\ \end{array}\right] = 128 > 0\]Ref:
- http://webdocs.cs.ualberta.ca/~zichen2/blog/coding/setup/2019/02/17/how-to-add-mathjax-support-to-jekyll.html
- https://alanduan.me/random/mathjax/
- https://docs.mathjax.org/en/latest/basic/mathematics.html
Mathjax inline mode not rendering
You can enable the $ … $
-style inline mode by inserting the following code into the <head>
section of your HTML before MathJax is being loaded. This way, you can invent new delimiters, too.
Ref:
- https://tex.stackexchange.com/questions/27633/mathjax-inline-mode-not-rendering
Learn how to write in Jekyll markdown
_posts
: by using ` to delimit the word to highlight the effect will be showed
Include pieces of code:
Useful cheat-sheet
Check out the Jekyll cheat-sheet
My page shows fine locally but on github the theme is gone: Deploy GitHub Pages
- Please follow the instructions of the following source:
- To do this we have to use command line, and authentication will be required: make sure you follow the instruction to obtain a Token:
-
Add to
config.yml
remote theme: /directory
-
To render MathJax in Posts add at the top of each post:
-
To not rendere future Posts online add this to the
config.yml
file:future: false
-
If pictures doesn’t render in Posts set the right directory:
How to include links:
Check out the Jekyll docs for more info on how to get the most out of Jekyll. File all bugs/feature requests at Jekyll’s GitHub repo. If you have questions, you can ask them on Jekyll Talk.