Duo, A Simple Jekyll Theme
Syntax Highlighting Test Case
# stdlib
require 'pathname'
# The containing module for Rouge
module Rouge
class << self
def reload!
Object.send :remove_const, :Rouge
load __FILE__
end
# Highlight some text with a given lexer and formatter.
#
# @example
# Rouge.highlight('@foo = 1', 'ruby', 'html')
# Rouge.highlight('var foo = 1;', 'js', 'terminal256')
#
# # streaming - chunks become available as they are lexed
# Rouge.highlight(large_string, 'ruby', 'html') do |chunk|
# $stdout.print chunk
# end
def highlight(text, lexer, formatter, &b)
lexer = Lexer.find(lexer) unless lexer.respond_to? :lex
raise "unknown lexer #{lexer}" unless lexer
formatter = Formatter.find(formatter) unless formatter.respond_to? :format
raise "unknown formatter #{formatter}" unless formatter
formatter.format(lexer.lex(text), &b)
end
end
end
Duo is a simple Jekyll theme. You can use duo for a single-page site or a simple blog.
- Demo Page: https://chibicode.github.io/duo/
- Example Page: My React tutorial.
- GitHub Repo: chibicode/duo
Get Started
# Download and Install
git clone https://github.com/chibicode/duo.git
bundle install
# Run
bundle exec jekyll serve
# open http://localhost:4000/duo
Next Steps
See: Customize Duo.
Like or Retweet Appreciated :)
Just published: Duo, A Simple Jekyll Theme. https://t.co/G2kffR9e4U @jekyllrb
— Shu Uesugi (@chibicode) October 25, 2017
-
Oct 13, 2017
Customize Duo
-
Oct 12, 2017
HTML Test Case
-
Oct 11, 2017
Syntax Highlighting Test Case
-
Oct 10, 2017
Japanese Test Case
-
Oct 9, 2017
Responsive Youtube Example
-
Duo, A Simple Jekyll Theme