
Create a post like this in the _posts
directory that follows the convention YYYY-MM-DD-name-of-post.ext
and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. Finally rebuild the site with bundle exec jekyll server
.
Jekyll also offers powerful support for code snippets:
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
or
var a = 1;
var b = 2;
function sum (num1,num2){
return num1+num2;
}
var result = sum(a,b);
Using LaTex:
In the frontmatter of the article add this :
usemathjax: true
After that, simply wrap the math symbols of your article with two double-dollar sign $$:
For Example :
- use this
$$E=mc^2$$
You should be able to see it in your post as: \(E=mc^2\)
use $$mean = \frac{\displaystyle\sum_{i=1}^{n} x_{i}}{n}$$
to write :
- Use
k_{n+1} = n^2 + k_n^2 - k_{n-1}
to write