- Node.js at least v0.12.0
- bower -
npm install -g bower
- Hexo 2.8.3 - either globally or locally installed
- Clone the repository
npm install
bower install
- add node_modules/.bin to
PATH
to use the locally installed Hexo
To create new slides, create a [Jade][http://jade-lang.com] file in source/slides using the following front-matter:
layout: slides
title: Overview of C++
path: /slides/01_overview
date: 2015-02-27 01:29:34
tags: slides
---
-
section
element denotes a single slide -
:cxx
filter allows in-line inclusion of C++ sample -
+snippet
mixing allows inclusion of a snippet from a file. To include the lifetime snippet from 03_resources/lifetime.cxx in the current slide use:+snippet('03_resources/lifetime.cxx', 'lifetime')
And the lifetime snippet is defined like:
//@{ lifetime void print(const void* instance, const char* type, const char* msg) { std::cout << type << ":\t" << instance << ":\t" << msg << std::endl; } struct Lifetime { Lifetime() { print(this, "Lifetime", "lives"); } ~Lifetime() { print(this, "Lifetime", "dies"); } }; //@} lifetime
$ hexo new "My New Post"
More info: Writing
$ hexo server
More info: Server
$ hexo generate
More info: Generating
$ hexo deploy
More info: Deployment