| 
2
3
4
5
6
7
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 | # File 'lib/migrations/yodel/02_page_model.rb', line 2
def self.up(site)
  site.records.create_model :pages do |pages|
        add_field :permalink, :string, validations: {required: {}}, index: true, searchable: false, display: false
    add_field :path, :string, validations: {required: {}}, index: true, searchable: false, display: false
    add_field :created_at, :time, display: false
    add_field :title, :string, validations: {required: {}}
    add_field :content, :html
    
        add_field :show_in_menus, :boolean, default: true, section: 'Options'
    add_field :description, :text, section: 'Options', searchable: false
    add_field :keywords, :text, section: 'Options', searchable: false
    add_field :custom_meta_tags, :text, section: 'Options', searchable: false
    add_one   :new_child_page, model: :page, section: 'Options', show_blank: true, blank_text: 'None'
    
        add_field :page_layout, :string, section: 'Options', default: nil, searchable: false
    add_one   :page_layout_record, model: :layout, display: false
    add_field :edit_layout, :string, searchable: false, section: 'Options'
    add_one   :edit_layout_record, model: :layout, display: false
    
    add_field :name, :alias, of: :title
    pages.default_child_model = pages.id
    pages.allowed_children = [pages]
    pages.allowed_parents = [pages]
    pages.record_class_name = 'Page'
  end
  
      site.pages.create_model :glob_pages do |glob_pages|
  end
  
    page = site.pages.new
  page.title = "Home"
  page.save
end |