KISS with HEXO

Oleksandr Tryshchenko @ DataArt
tryshchenko.com

The long way

Output:

  • Categories
  • Tags
  • Pagination
  • Post page
  • Pages
  • Low Coupling
  • Configurable
  • Exposed API

Encapsulation!

  • Migrators
  • Renderers
  • Deployers
  • Helpers

Migration process

Migrators

  • RSS
  • WordPress
  • Jekyll
  • OctoPress
  • Joomla

Migrators...

Renderers

Renderers

  • Pluggable
  • Sync / Async
  • HTML / CSS / JS
  hexo.extend.renderer 	.register(name, output, (data, opts) => { // ... }, sync);	  
  const ejs = require('ejs'); hexo.extend.renderer 	.register('ejs', 'html', (data, opts) => { options.filename = data.path; return ejs.render(data.text, options); }, true);  

Deployers

another yet animation

Deployers

  • RSYNC
  • Git
  • Heroku
  • OpenShift
  • FTPSync

API

  • Filters
  • Processors

Filters (Lyfecycle Hooks)

  • Before / after post render
  • After init / before exit
  • Before / after generation

Filters (Events)

  • Template locals
  • New post path
  • Post permalink

Rich Ecosystem

Out of the box

  • CLI
  • Themes support
  • i18n
  • Environments

CLI

  • Scafold Project
  • Post generation
  • Generate static
  • Publishing / Deployment
  • Migration

Demo

Credits

  • Photos taken from Unsplash.
  • Animations were taken from giphy.com

Thank You!

Send me a Pigeon