Loading app/Entities/Episode.php +10 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,11 @@ class Episode extends Entity */ protected $enclosure_web_url; /** * @var string */ protected $enclosure_opengraph_url; /** * Holds text only description, striped of any markdown or html special characters * Loading Loading @@ -220,6 +225,11 @@ class Episode extends Entity return $this->getEnclosureUrl() . '?_from=-+Website+-'; } public function getEnclosureOpengraphUrl() { return $this->getEnclosureUrl() . '?_from=-+Open+Graph+-'; } public function getLink() { return base_url( Loading app/Helpers/url_helper.php +18 −0 Original line number Diff line number Diff line Loading @@ -20,3 +20,21 @@ if (!function_exists('host_url')) { 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; } } app/Views/episode.php +16 −0 Original line number Diff line number Diff line Loading @@ -9,7 +9,23 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="stylesheet" href="/assets/index.css"/> <link rel="canonical" href="<?= current_url() ?>" /> <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> <body class="flex flex-col min-h-screen mx-auto"> Loading app/Views/podcast.php +12 −0 Original line number Diff line number Diff line Loading @@ -10,8 +10,20 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <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 ?>"/> <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> <body class="flex flex-col min-h-screen"> Loading Loading
app/Entities/Episode.php +10 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,11 @@ class Episode extends Entity */ protected $enclosure_web_url; /** * @var string */ protected $enclosure_opengraph_url; /** * Holds text only description, striped of any markdown or html special characters * Loading Loading @@ -220,6 +225,11 @@ class Episode extends Entity return $this->getEnclosureUrl() . '?_from=-+Website+-'; } public function getEnclosureOpengraphUrl() { return $this->getEnclosureUrl() . '?_from=-+Open+Graph+-'; } public function getLink() { return base_url( Loading
app/Helpers/url_helper.php +18 −0 Original line number Diff line number Diff line Loading @@ -20,3 +20,21 @@ if (!function_exists('host_url')) { 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; } }
app/Views/episode.php +16 −0 Original line number Diff line number Diff line Loading @@ -9,7 +9,23 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <link rel="stylesheet" href="/assets/index.css"/> <link rel="canonical" href="<?= current_url() ?>" /> <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> <body class="flex flex-col min-h-screen mx-auto"> Loading
app/Views/podcast.php +12 −0 Original line number Diff line number Diff line Loading @@ -10,8 +10,20 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <link rel="shortcut icon" type="image/png" href="/favicon.ico" /> <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 ?>"/> <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> <body class="flex flex-col min-h-screen"> Loading