Class: Nesta::Page
- Inherits:
-
FileModel
- Object
- FileModel
- Nesta::Page
- Defined in:
- lib/nesta-contentfocus-extensions/page.rb
Instance Method Summary collapse
- #convert_to_html(format, scope, text) ⇒ Object
- #intro_image ⇒ Object
- #markdown_options ⇒ Object
- #syntax_highlight_options ⇒ Object
Instance Method Details
#convert_to_html(format, scope, text) ⇒ Object
4 5 6 7 8 |
# File 'lib/nesta-contentfocus-extensions/page.rb', line 4 def convert_to_html(format, scope, text) text = (text) if @format == :haml template = Tilt[format].new(nil, 1, ) { text } template.render(scope) end |
#intro_image ⇒ Object
10 11 12 |
# File 'lib/nesta-contentfocus-extensions/page.rb', line 10 def intro_image return ('Intro Image') if ('Intro Image') end |
#markdown_options ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/nesta-contentfocus-extensions/page.rb', line 14 def { auto_id_stripping: true, auto_ids: true, syntax_highlighter: :rouge, syntax_highlighter_opts: } #{ # autolink: true, # disable_indented_code_blocks: true, # fenced_code_blocks: true, # footnotes: true, # highlight: true, # no_intra_emphasis: true, # quote: true, # strikethrough: true, # syntax_highlighter: :rouge, # superscript: true, # tables: true } end |
#syntax_highlight_options ⇒ Object
35 36 37 38 39 40 |
# File 'lib/nesta-contentfocus-extensions/page.rb', line 35 def { line_numbers: true, css_class: 'hll' } end |