Getting Started
Requirements
- Node.js at least v0.12.0
- bower -
npm install -g bower - Hexo 2.8.3 - either globally or locally installed
Set up
- Clone the repository
npm installbower install- add node_modules/.bin to
PATHto use the locally installed Hexo
Creating new slides
To create new slides, create a Jade 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
----
sectionelement denotes a single slide -
:cxxfilter allows in-line inclusion of C++ sample -
+snippetmixing 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 Quick Start
Create a new post
$ hexo new "My New Post"More info: Writing
Run server
$ hexo serverMore info: Server
Generate static files
$ hexo generateMore info: Generating
Deploy to remote sites
$ hexo deployMore info: Deployment