blog improvements
This commit is contained in:
parent
ae15b296ea
commit
f627ce17cb
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -1,5 +1,3 @@
|
|||
%h1
|
||||
Blog:
|
||||
= @page.title
|
||||
%h1= @page.title
|
||||
|
||||
%p= @page.content
|
||||
= page_content( @page)
|
||||
|
|
Loading…
Reference in New Issue