Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: vinbarnes/showoff
base: cd8a591a5c
head fork: vinbarnes/showoff
compare: b1dd42d71a
Checking mergeability… Don't worry, you can still create the pull request.
  • 9 commits
  • 4 files changed
  • 0 commit comments
  • 4 contributors
3  README.rdoc
@@ -503,11 +503,12 @@ Then restart showoff, and navigate to <tt>/pdf</tt> (e.g. http://localhost/pdf)
== Markdown Engine
It is possible to configure the markdown engine of your choice to use
-with showoff. The following engines come preconfigured:
+with showoff. The following engines are available:
* redcarpet (default)
* bluecloth
* maruku
+* kramdown
* rdiscount
Configuring an engine (or overriding it's default configuration) allows you to access special features of that engine.
2  example/something.css
@@ -1,4 +1,4 @@
-/* customr css and js files included at the top level of your presentation will
+/* custom css and js files included at the top level of your presentation will
* will be included in your presentation */
.title-slide h1 {
8 lib/showoff.rb
@@ -36,6 +36,7 @@ class ShowOff < Sinatra::Application
set :page_size, "Letter"
set :pres_template, nil
set :showoff_config, nil
+ set :encoding, nil
def initialize(app=nil)
@@ -61,7 +62,8 @@ def initialize(app=nil)
showoff_json = JSON.parse(
settings.showoff_config = showoff_json
- # Set options for template and page size
+ # Set options for encoding, template and page size
+ settings.encoding = showoff_json["encoding"]
settings.page_size = showoff_json["page-size"] || "Letter"
settings.pres_template = showoff_json["templates"]
@@ -145,6 +147,10 @@ def empty?
def process_markdown(name, content, static=false, pdf=false)
+ if settings.encoding and content.respond_to?(:force_encoding)
+ content.force_encoding(settings.encoding)
+ end
# if there are no !SLIDE markers, then make every H1 define a new slide
unless content =~ /^\<?!SLIDE/m
content = content.gsub(/^# /m, "<!SLIDE>\n# ")
3  lib/showoff_utils.rb
@@ -425,6 +425,9 @@ def self.setup(dir_name)
when 'bluecloth'
Tilt.prefer Tilt::BlueClothTemplate, "markdown"
+ when 'kramdown'
+ Tilt.prefer Tilt::KramdownTemplate, "markdown"
Tilt.prefer Tilt::RedcarpetTemplate, "markdown"

No commit comments for this range

Something went wrong with that request. Please try again.