File tree Expand file tree Collapse file tree 2 files changed +40
-5
lines changed
Expand file tree Collapse file tree 2 files changed +40
-5
lines changed Original file line number Diff line number Diff line change 11module ApplicationHelper
2+ def meta_title
3+ return content_for ( :meta_title ) if content_for? ( :meta_title )
4+ return "#{ content_for ( :title ) } - Hackorum" if content_for? ( :title )
5+
6+ "Hackorum"
7+ end
8+
9+ def meta_description
10+ "PostgreSQL Hackers Archive"
11+ end
12+
13+ def meta_image_url
14+ "https://hackorum.dev/icon.png"
15+ end
16+
17+ def meta_url
18+ "https://hackorum.dev"
19+ end
20+
21+ def meta_type
22+ "website"
23+ end
24+
25+ def twitter_card
26+ "summary"
27+ end
28+
229 # Smart time display: relative for recent, absolute for old
330 def smart_time_display ( time )
431 return "" if time . nil?
Original file line number Diff line number Diff line change 11doctype html
22html data-theme =" light"
33 head
4- title
5- - if content_for?(:title )
6- = " #{ content_for(:title ) } - Hackorum"
7- - else
8- = " Hackorum"
4+ title = meta_title
5+ meta [name =" description" content= meta_description]
6+ meta [property =" og:site_name" content= " Hackorum" ]
7+ meta [property =" og:title" content= meta_title]
8+ meta [property =" og:description" content= meta_description]
9+ meta [property =" og:url" content= meta_url]
10+ meta [property =" og:image" content= meta_image_url]
11+ meta [property =" og:image:alt" content= meta_title]
12+ meta [property =" og:type" content= meta_type]
13+ meta [name =" twitter:card" content= twitter_card]
14+ meta [name =" twitter:title" content= meta_title]
15+ meta [name =" twitter:description" content= meta_description]
16+ meta [name =" twitter:image" content= meta_image_url]
917 meta [name =" viewport" content= " width=device-width,initial-scale=1" ]
1018 meta [name =" apple-mobile-web-app-capable" content= " yes" ]
1119 meta [name =" mobile-web-app-capable" content= " yes" ]
You can’t perform that action at this time.
0 commit comments