Skip to content
Snippets Groups Projects
Commit bd21e3d7 authored by Douwe Maan's avatar Douwe Maan
Browse files

Add Open Graph data for group, project and commit.

parent 7d5b51f3
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -53,6 +53,8 @@ module PageLayoutHelper
@project.avatar_url || default
elsif @user
avatar_icon(@user)
elsif @group
@group.avatar_url || default
else
default
end
Loading
Loading
- page_description @group.description
- unless can?(current_user, :read_group, @group)
- @disable_search_panel = true
 
Loading
Loading
- site_name = "GitLab"
%head{prefix: "og: http://ogp.me/ns#"}
%meta{charset: "utf-8"}
%meta{'http-equiv' => 'X-UA-Compatible', content: 'IE=edge'}
%meta{name: 'referrer', content: 'origin-when-cross-origin'}
%meta{name: "description", content: page_description}
 
-# Open Graph - http://ogp.me/
%meta{property: 'og:type', content: "object"}
%meta{property: 'og:site_name', content: "GitLab"}
%meta{property: 'og:site_name', content: site_name}
%meta{property: 'og:title', content: page_title}
%meta{property: 'og:description', content: page_description}
%meta{property: 'og:image', content: page_image}
Loading
Loading
@@ -20,8 +18,9 @@
%meta{property: 'twitter:image', content: page_image}
= page_card_meta_tags
 
- page_title "GitLab"
- page_title site_name
%title= page_title
%meta{name: "description", content: page_description}
 
= favicon_link_tag 'favicon.ico'
 
Loading
Loading
@@ -34,6 +33,7 @@
 
= include_gon
 
%meta{name: 'referrer', content: 'origin-when-cross-origin'}
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1'}
%meta{name: 'theme-color', content: '#474D57'}
 
Loading
Loading
- page_title "#{@commit.title} (#{@commit.short_id})", "Commits"
- page_title "#{@commit.title} (#{@commit.short_id})", "Commits"
- page_description @commit.description
= render "projects/commits/header_title"
= render "commit_box"
- if @ci_commit
Loading
Loading
- page_description @project.description
= content_for :meta_tags do
- if current_user
= auto_discovery_link_tag(:atom, namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "#{@project.name} activity")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment