Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Castopod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ad Aures
Castopod
Commits
bd61752b
Project 'ad-aures/castopod' was moved to 'adaures/castopod'. Please update any links and bookmarks that may still have the old path.
Commit
bd61752b
authored
3 years ago
by
Yassine Doghri
Browse files
Options
Downloads
Patches
Plain Diff
feat(meta-tags): add activitypub alternate links to podcast, episode, comment and post pages
parent
3ce07e45
No related branches found
No related tags found
2 merge requests
!160
WIP:Feat/social interact
,
!150
fix(ux): enhance user experience
Pipeline
#1195
passed
3 years ago
Stage: prepare
Stage: quality
Stage: bundle
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/Helpers/seo_helper.php
+29
-4
29 additions, 4 deletions
app/Helpers/seo_helper.php
with
29 additions
and
4 deletions
app/Helpers/seo_helper.php
+
29
−
4
View file @
bd61752b
...
...
@@ -44,7 +44,12 @@ if (! function_exists('get_podcast_metatags')) {
->
og
(
'image:width'
,
(
string
)
config
(
'Images'
)
->
podcastCoverSizes
[
'large'
][
'width'
])
->
og
(
'image:height'
,
(
string
)
config
(
'Images'
)
->
podcastCoverSizes
[
'large'
][
'height'
])
->
og
(
'locale'
,
$podcast
->
language_code
)
->
og
(
'site_name'
,
service
(
'settings'
)
->
get
(
'App.siteName'
));
->
og
(
'site_name'
,
service
(
'settings'
)
->
get
(
'App.siteName'
))
->
push
(
'link'
,
[
'rel'
=>
'alternate'
,
'type'
=>
'application/activity+json'
,
'href'
=>
url_to
(
'podcast-activity'
,
$podcast
->
handle
),
]);
if
(
$podcast
->
payment_pointer
)
{
$metatags
->
meta
(
'monetization'
,
$podcast
->
payment_pointer
);
...
...
@@ -94,7 +99,12 @@ if (! function_exists('get_episode_metatags')) {
->
twitter
(
'audio:artist_name'
,
$episode
->
podcast
->
owner_name
)
->
twitter
(
'player'
,
$episode
->
getEmbedUrl
(
'light'
))
->
twitter
(
'player:width'
,
(
string
)
config
(
'Embed'
)
->
width
)
->
twitter
(
'player:height'
,
(
string
)
config
(
'Embed'
)
->
height
);
->
twitter
(
'player:height'
,
(
string
)
config
(
'Embed'
)
->
height
)
->
push
(
'link'
,
[
'rel'
=>
'alternate'
,
'type'
=>
'application/activity+json'
,
'href'
=>
url_to
(
'episode'
,
$episode
->
podcast
->
handle
,
$episode
->
slug
),
]);
if
(
$episode
->
podcast
->
payment_pointer
)
{
$metatags
->
meta
(
'monetization'
,
$episode
->
podcast
->
payment_pointer
);
...
...
@@ -149,7 +159,12 @@ if (! function_exists('get_post_metatags')) {
->
description
(
$post
->
message
)
->
image
(
$post
->
actor
->
avatar_image_url
)
->
canonical
((
string
)
current_url
())
->
og
(
'site_name'
,
service
(
'settings'
)
->
get
(
'App.siteName'
));
->
og
(
'site_name'
,
service
(
'settings'
)
->
get
(
'App.siteName'
))
->
push
(
'link'
,
[
'rel'
=>
'alternate'
,
'type'
=>
'application/activity+json'
,
'href'
=>
url_to
(
'post'
,
$post
->
actor
->
username
,
$post
->
id
),
]);
return
$metatags
->
__toString
()
.
PHP_EOL
.
$schema
->
__toString
();
}
...
...
@@ -183,7 +198,17 @@ if (! function_exists('get_episode_comment_metatags')) {
->
description
(
$episodeComment
->
message
)
->
image
(
$episodeComment
->
actor
->
avatar_image_url
)
->
canonical
((
string
)
current_url
())
->
og
(
'site_name'
,
service
(
'settings'
)
->
get
(
'App.siteName'
));
->
og
(
'site_name'
,
service
(
'settings'
)
->
get
(
'App.siteName'
))
->
push
(
'link'
,
[
'rel'
=>
'alternate'
,
'type'
=>
'application/activity+json'
,
'href'
=>
url_to
(
'episode-comment'
,
$episodeComment
->
actor
->
username
,
$episodeComment
->
episode
->
slug
,
$episodeComment
->
id
),
]);
return
$metatags
->
__toString
()
.
PHP_EOL
.
$schema
->
__toString
();
}
...
...
This diff is collapsed.
Click to expand it.
Yassine Doghri
@yassinedoghri
mentioned in commit
d807ab97
·
3 years ago
mentioned in commit
d807ab97
mentioned in commit d807ab9732d8e4ad1eae956f0b728f8a5c0f868d
Toggle commit list
Yassine Doghri
@yassinedoghri
mentioned in commit
f9572e41
·
2 years ago
mentioned in commit
f9572e41
mentioned in commit f9572e4125ed53c215cc4a3c4d1a32708e6febe3
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment