blog improvements

This commit is contained in:
Torsten Ruger 2017-06-12 17:14:23 +03:00
parent ae15b296ea
commit f627ce17cb
3 changed files with 18 additions and 7 deletions

View File

@ -1,5 +1,8 @@
## Title
some text that will be the short summary at the beggining.
Remembering that the file name becomes the title (h1)
### Subtitle
## Sub Headings should start with 2
And some text
They have more text possibly with links <http://github.com/
Paragraphs are created when there is a blank line

View File

@ -0,0 +1,10 @@
module BlogHelper
def page_content(page)
Kramdown::Document.new(page.content).to_html.html_safe
end
def page_summary(page)
content = page_content(page)
content[0 ... 200]
end
end

View File

@ -1,5 +1,3 @@
%h1
Blog:
= @page.title
%h1= @page.title
%p= @page.content
= page_content( @page)