Class: JekyllNotion::NotionPage::CustomProperty

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-notion/notion_page.rb

Class Method Summary collapse

Class Method Details

.checkbox(prop) ⇒ Object



103
104
105
# File 'lib/jekyll-notion/notion_page.rb', line 103

def checkbox(prop)
  prop.checkbox.to_s
end

.date(prop) ⇒ Object

date type properties not supported:

  • end

  • time_zone



110
111
112
# File 'lib/jekyll-notion/notion_page.rb', line 110

def date(prop)
  prop.date.start
end

.email(prop) ⇒ Object



99
100
101
# File 'lib/jekyll-notion/notion_page.rb', line 99

def email(prop)
  prop.email
end

.files(prop) ⇒ Object



87
88
89
# File 'lib/jekyll-notion/notion_page.rb', line 87

def files(prop)
  prop.files.map { |f| f.file.url }.join(", ")
end

.multi_select(prop) ⇒ Object



75
76
77
# File 'lib/jekyll-notion/notion_page.rb', line 75

def multi_select(prop)
  prop.multi_select.map(&:name).join(", ")
end

.number(prop) ⇒ Object



95
96
97
# File 'lib/jekyll-notion/notion_page.rb', line 95

def number(prop)
  prop.number
end

.people(prop) ⇒ Object



83
84
85
# File 'lib/jekyll-notion/notion_page.rb', line 83

def people(prop)
  prop.people.map(&:name).join(", ")
end

.phone_number(prop) ⇒ Object



91
92
93
# File 'lib/jekyll-notion/notion_page.rb', line 91

def phone_number(prop)
  prop.phone_number
end

.select(prop) ⇒ Object



79
80
81
# File 'lib/jekyll-notion/notion_page.rb', line 79

def select(prop)
  prop["select"].name
end