Added a new file for account view meta content
This commit is contained in:
parent
a7185dc9ca
commit
e576c2c3d7
21
app/views/accounts/_meta.html.haml
Normal file
21
app/views/accounts/_meta.html.haml
Normal file
@ -0,0 +1,21 @@
|
||||
- content_for :page_title do
|
||||
= "#{display_name(account)} (@#{account.local_username_and_domain}) | #{site_hostname}"
|
||||
|
||||
- content_for :header_tags do
|
||||
%meta{ name: 'description', content: account_description(account) }/
|
||||
|
||||
- if account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
%link{ rel: 'salmon', href: api_salmon_url(account.id) }/
|
||||
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_url(account, format: 'atom') }/
|
||||
%link{ rel: 'alternate', type: 'application/rss+xml', href: account_url(account, format: 'rss') }/
|
||||
%link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(account) }/
|
||||
|
||||
- if older_url
|
||||
%link{ rel: 'next', href: older_url }/
|
||||
- if newer_url
|
||||
%link{ rel: 'prev', href: newer_url }/
|
||||
|
||||
= opengraph 'og:type', 'profile'
|
||||
= render 'accounts/og', account: account, url: short_account_url(account, only_path: false)
|
@ -1,25 +1,4 @@
|
||||
- content_for :page_title do
|
||||
= "#{display_name(@account)} (@#{@account.local_username_and_domain})"
|
||||
|
||||
- content_for :header_tags do
|
||||
%meta{ name: 'description', content: account_description(@account) }/
|
||||
|
||||
- if @account.user&.setting_noindex
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
%link{ rel: 'salmon', href: api_salmon_url(@account.id) }/
|
||||
%link{ rel: 'alternate', type: 'application/atom+xml', href: account_url(@account, format: 'atom') }/
|
||||
%link{ rel: 'alternate', type: 'application/rss+xml', href: account_url(@account, format: 'rss') }/
|
||||
%link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@account) }/
|
||||
|
||||
- if @older_url
|
||||
%link{ rel: 'next', href: @older_url }/
|
||||
- if @newer_url
|
||||
%link{ rel: 'prev', href: @newer_url }/
|
||||
|
||||
= opengraph 'og:type', 'profile'
|
||||
= render 'og', account: @account, url: short_account_url(@account, only_path: false)
|
||||
|
||||
= render 'accounts/meta', account: @account, newer_url: @newer_url, older_url: @older_url
|
||||
|
||||
= render 'header', account: @account, with_bio: true
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user