ptsteadman / hexo-theme-corporate

A professional Hexo theme based on Metronic's "Corporate Frontend" framework.
http://hexotest.computerlab.io
MIT License
183 stars 67 forks source link

Add codes highlighting #2

Closed jin-qin closed 8 years ago

jin-qin commented 8 years ago

I've added codes highlighting, used some files from default theme "landscape", and import those files into 'theme-styles.styl'

Then we can enable highlighting in '_config.yml' (in the root of blog directory). And we don't need to use code blocks, just write codes following for example:

# include <iostream>

using namespace std;
int main()
{
&ensp;&ensp;&ensp;&ensp;cout<<"Hello world!"<<endl;
&ensp;&ensp;&ensp;&ensp;return 0;
}

And it will display:

#include <iostream>
using namespace std;
int main()
{
    cout<<"Hello world!"<<endl;
    return 0;
}
ptsteadman commented 8 years ago

Great, I'll add some information about the feature to the README.