mirror of
https://code.castopod.org/adaures/castopod
synced 2025-06-06 18:31:05 +00:00
parent
0e38dcca4a
commit
af970b8bac
@ -50,6 +50,11 @@ class Episode extends Entity
|
|||||||
*/
|
*/
|
||||||
protected $enclosure_web_url;
|
protected $enclosure_web_url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $enclosure_opengraph_url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds text only description, striped of any markdown or html special characters
|
* Holds text only description, striped of any markdown or html special characters
|
||||||
*
|
*
|
||||||
@ -220,6 +225,11 @@ class Episode extends Entity
|
|||||||
return $this->getEnclosureUrl() . '?_from=-+Website+-';
|
return $this->getEnclosureUrl() . '?_from=-+Website+-';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getEnclosureOpengraphUrl()
|
||||||
|
{
|
||||||
|
return $this->getEnclosureUrl() . '?_from=-+Open+Graph+-';
|
||||||
|
}
|
||||||
|
|
||||||
public function getLink()
|
public function getLink()
|
||||||
{
|
{
|
||||||
return base_url(
|
return base_url(
|
||||||
|
@ -20,3 +20,21 @@ if (!function_exists('host_url')) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function_exists('current_season_url')) {
|
||||||
|
/**
|
||||||
|
* Return the podcast URL with season number to use in views
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function current_season_url()
|
||||||
|
{
|
||||||
|
$season_query_string = '';
|
||||||
|
if (isset($_GET['season'])) {
|
||||||
|
$season_query_string = '?season=' . $_GET['season'];
|
||||||
|
} elseif (isset($_GET['year'])) {
|
||||||
|
$season_query_string = '?year=' . $_GET['year'];
|
||||||
|
}
|
||||||
|
return current_url() . $season_query_string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -9,7 +9,23 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
|
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/assets/index.css"/>
|
<link rel="stylesheet" href="/assets/index.css"/>
|
||||||
|
<link rel="canonical" href="<?= current_url() ?>" />
|
||||||
<script src="/assets/podcast.js" type="module" defer></script>
|
<script src="/assets/podcast.js" type="module" defer></script>
|
||||||
|
<meta property="og:title" content="<?= $episode->title ?>" />
|
||||||
|
<meta property="og:locale" content="<?= $podcast->language_code ?>" />
|
||||||
|
<meta property="og:site_name" content="<?= $podcast->title ?>" />
|
||||||
|
<meta property="og:url" content="<?= current_url() ?>" />
|
||||||
|
<meta property="article:published_time" content="<?= $episode->published_at ?>" />
|
||||||
|
<meta property="article:modified_time" content="<?= $episode->updated_at ?>" />
|
||||||
|
<meta property="og:image" content="<?= $episode->image->large_url ?>" />
|
||||||
|
<meta property="og:image:width" content="<?= config('Images')
|
||||||
|
->largeSize ?>" />
|
||||||
|
<meta property="og:image:height" content="<?= config('Images')
|
||||||
|
->largeSize ?>" />
|
||||||
|
<meta property="og:audio" content="<?= $episode->enclosure_opengraph_url ?>" />
|
||||||
|
<meta property="og:audio:type" content="<?= $episode->enclosure_mimetype ?>" />
|
||||||
|
<meta property="og:description" content="<?= $episode->description ?>" />
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col min-h-screen mx-auto">
|
<body class="flex flex-col min-h-screen mx-auto">
|
||||||
|
@ -10,8 +10,20 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
|
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/assets/index.css"/>
|
<link rel="stylesheet" href="/assets/index.css"/>
|
||||||
|
<link rel="canonical" href="<?= current_season_url() ?>" />
|
||||||
<link type="application/rss+xml" rel="alternate" title="<?= $podcast->title ?>" href="<?= $podcast->feed_url ?>"/>
|
<link type="application/rss+xml" rel="alternate" title="<?= $podcast->title ?>" href="<?= $podcast->feed_url ?>"/>
|
||||||
<script src="/assets/podcast.js" type="module" defer></script>
|
<script src="/assets/podcast.js" type="module" defer></script>
|
||||||
|
<meta property="og:title" content="<?= $podcast->title ?>" />
|
||||||
|
<meta property="og:locale" content="<?= $podcast->language_code ?>" />
|
||||||
|
<meta property="og:site_name" content="<?= $podcast->title ?>" />
|
||||||
|
<meta property="og:url" content="<?= current_season_url() ?>" />
|
||||||
|
<meta property="og:image" content="<?= $podcast->image->large_url ?>" />
|
||||||
|
<meta property="og:image:width" content="<?= config('Images')
|
||||||
|
->largeSize ?>" />
|
||||||
|
<meta property="og:image:height" content="<?= config('Images')
|
||||||
|
->largeSize ?>" />
|
||||||
|
<meta property="og:description" content="<?= $episode->description ?>" />
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="flex flex-col min-h-screen">
|
<body class="flex flex-col min-h-screen">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user