Class: Contentful::Bootstrap::Templates::Blog
- Defined in:
- lib/contentful/bootstrap/templates/blog.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#after_run, #assets, #initialize, #run
Constructor Details
This class inherits a constructor from Contentful::Bootstrap::Templates::Base
Instance Method Details
#content_types ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/contentful/bootstrap/templates/blog.rb', line 8 def content_types [ { 'id' => 'author', 'name' => 'Author', 'displayField' => 'name', 'fields' => [ { 'id' => 'name', 'name' => 'Author Name', 'type' => 'Symbol' } ] }, { 'id' => 'post', 'name' => 'Post', 'displayField' => 'title', 'fields' => [ { 'id' => 'title', 'name' => 'Post Title', 'type' => 'Symbol' }, { 'id' => 'content', 'name' => 'Content', 'type' => 'Text' }, { 'id' => 'author', 'name' => 'Author', 'type' => 'Link', 'linkType' => 'Entry' } ] } ] end |
#entries ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/contentful/bootstrap/templates/blog.rb', line 48 def entries { 'author' => [ { 'id' => 'dan_brown', 'name' => 'Dan Brown' }, { 'id' => 'pablo_neruda', 'name' => 'Pablo Neruda' } ], 'post' => [ { 'id' => 'inferno', 'title' => 'Inferno', 'content' => 'Inferno is the last book in Dan Brown\'s collection...', 'author' => Links::Entry.new('dan_brown') }, { 'id' => 'alturas', 'title' => 'Alturas de Macchu Picchu', 'content' => 'Alturas de Macchu Picchu is one of Pablo Neruda\'s most famous poetry books...', 'author' => Links::Entry.new('pablo_neruda') } ] } end |