a post with math
This theme supports rendering beautiful math in inline and display modes using MathJax 3 engine. You just need to surround your math expression with $$
, like $$ E = mc^2 $$
. If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$.
To use display mode, again surround your expression with $$
and place it as a separate paragraph. Here is an example:
a post with code
This theme implements a built-in Jekyll feature, the use of Rouge, for syntax highlighting. It supports more than 100 languages. This example is in C++. All you have to do is wrap your code in markdown code tags:
```c++
code code code
```
int main(int argc, char const \*argv[])
{
string myString;
cout << "input a string: ";
getline(cin, myString);
int length = myString.length();
char charArray = new char * [length];
charArray = myString;
for(int i = 0; i < length; ++i){
cout << charArray[i] << " ";
}
return 0;
}
For displaying code in a list item, you have to be aware of the indentation, as stated in this Stackoverflow answer. You must indent your code by (3 * bullet_indent_level) spaces. This is because kramdown (the markdown engine used by Jekyll) indentation for the code block in lists is determined by the column number of the first non-space character after the list item marker. For example:
a post with images
This is an example post with image galleries.
Images can be made zoomable.
Simply add data-zoomable
to <img>
tags that you want to make zoomable.
The rest of the images in this post are all zoomable, arranged into different mini-galleries.
a post with formatting and links
Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy.
This post has no title specified in the YAML Front Matter. Jekyll should auto-generate a title from the filename.
title: Hello World date: 2013-12-24 17:49:32 tags:
Welcome to Hexo! This is your very first post. Check documentation to learn how to use.
Antidisestablishmentarianism
Title should not overflow the content area
A few things to check for:
- Non-breaking text in the title, content, and comments should have no adverse effects on layout or functionality.
- Check the browser window / tab title.
- If you are a theme developer, check that this text does not break anything.
The following CSS properties will help you support non-breaking text.
-ms-word-wrap: break-word;
word-wrap: break-word;
Edge Case: Invalid syntax highlight languages
Good highlighting:
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
Good (but dumb) highlighting:
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end
Bad highlighting:
str = ARGV.first
if str
str = str.b[/\A_(.*)_\z/, 1]
if str and Gem::Version.correct?(str)
version = str
ARGV.shift
end
end