Jinho Jang ecd92c9699 fix: render Spotify/Apple Podcasts player on episodes without Youtube (#273)
* feat: render Spotify and Apple Podcasts embeds on episode pages

Episodes without a Youtube or Simplecast channel rendered no player at
all, since Episode.Body only ever selected those two channels. Spotify
and Apple Podcasts were shown as text links only.

Add an embed fallback so those episodes render the provider's own iframe
player. react-player has no Spotify support, so the embed is a plain
iframe and is intentionally not wired into the global audio player -
these providers expose no playback state to the embedding page.

Also hide the duration in the episode stats row when it is 0, which is
the case for embed players that cannot report a duration.

* fix: drop the Apple Podcasts embed

embed.podcasts.apple.com renders an empty grey placeholder instead of a
player, confirmed on the deployed preview. An Apple-only episode is
better served by the existing channel link than by a broken embed, so
only Spotify falls back to an iframe player.

* feat: play Apple Podcasts episodes from the resolved audio file

Apple's own iframe embed cannot be used: embed.podcasts.apple.com renders
an empty grey placeholder and never mounts its player component. Verified
in a real Chrome, both for our episode and for a mainstream podcast (The
Daily), so it is Apple's embed service rather than our data.

Resolve the episode's audio file instead. The Apple Podcasts URL carries
the show id, and the iTunes lookup API returns the enclosure URL and the
duration for every episode of that show. Exposing that as an audio
channel lets the existing Simplecast code path play it, which also brings
back the duration in the stats row and the global bottom player.

Episode ids in the CMS are not always in sync with Apple, so the lookup
falls back to matching on the episode title.

* fix: prefer the Spotify embed over the resolved audio file

An episode that has both Spotify and Apple Podcasts now renders the
Spotify player. The resolved audio file stays as the last resort, for
episodes that can neither be played nor embedded.

The transformer skips the iTunes lookup for those episodes too, so it
only runs when its result will actually be used.

* chore: ignore env files

Keeps new local env files out of commits. Does not untrack the existing
.env, which is still committed.
2026-08-07 01:19:56 +09:00
2023-09-27 23:36:05 +09:00
2023-04-19 21:21:26 +09:00
2023-08-30 21:20:38 +09:00
2023-05-15 17:13:23 +09:00
2023-10-25 23:40:44 +09:00

Logos Press Engline

The repository for blog.logos.co website.

Tech Stacks

  • NextJS : React Framework

  • LSD : Design System

  • Hookstate : State Management

  • Emotion: CSS-in-JS

  • Strapi : CMS

Environment Variables

Please check the environment values in .env located in the root directory.

SIMPLECAST_ACCESS_TOKEN=
REVALIDATE_WEBHOOK_TOKEN=
NODE_ENV=
LOG_LEVEL=

This is a template for .env.local, which is included in .gitignore.

To find the Simplecast access token, follow these steps on the Simplecast dashboard:

  1. Click the gear button in the top-right corner.

  2. Select Private Apps to acquire your JWT bearer token.

How to Run Locally

  1. Clone this repository
$ git clone https://github.com/acid-info/logos-press-engine.git
  1. Install the dependencies:
$ yarn install
  1. Start the development server:
$ yarn dev
  1. Visit http://localhost:3000 in your browser

How to Run a Static Build (Production Build)

  1. Generate static files for production:
$ yarn build

The static files will be created in the build directory.

  1. Serve the static build:
$ yarn start
  1. Visit http://localhost:3000 in your browser

CI/CD

  • The master branch is automatically deployed to the production server (e.g., logos.co) through CI
  • The develop branch is automatically deployed to the staging server (e.g., dev.logos.co) through CI

Change Process

  1. Create a new working branch from develop: git checkout develop; git checkout -b my-changes.

  2. Make your changes, push them to the origin, and open a Pull Request against the develop branch.

  3. After approval, merge the pull request, and verify the changes on the staging server (https://dev-blog.logos.co/).

  4. When ready to promote changes to the live website, create a pull request against the "master" branch, based on the "develop" branch.

S
Description
Logos Press Engine website
https://press.logos.co
Readme
3.2 MiB
Languages
TypeScript 99.2%
CSS 0.6%