smart-village-solutions / Goldencobra

CMS based on modules as Rails 4 engines
Other
21 stars 15 forks source link

Use absolute image url for open graph image meta tag #112

Open donni106 opened 7 years ago

donni106 commented 7 years ago

Description

The og:image meta tag should have an absolute url to an image as value. Currently Golden Cobra renders a relative url programmatically.

Steps to reproduce

The current rendering result for the og:image meta tag is: <meta property="og:image" content="/system/images/ID/FORMAT/FILE">

Affected code lines if helpful

In this lines the first image of an article is used, if no manual url is given: https://github.com/ikuseiGmbH/Goldencobra/blob/17fdf33f5e94277fed998acc185ff7e4d4871f26/app/models/goldencobra/article_concerns/meta_tag.rb#L39-L44

Expected results

The rendering result for the og:image meta tag should be: <meta property="og:image" content="http(s)://WEBSITE/system/images/ID/FORMAT/FILE">