Code samples from file
To insert code sample from file we need to copy our sample somewere to _includes
directory and use include
and highlight
liquids to refer it.
For example to show _includes/source/main.cpp
C++ file content we can write
{% highlight cpp %} {% include source/main.cpp %} {% endhighlight %}
which results in
#include <iostream>
using std::cout;
int main(int argc, char * argv[])
{
cout << "hello from c++!\n";
return 0;
}