Skip to content

feat(episodes): add chapter timestamps to frontmatter and audio files #1

@eddmann

Description

@eddmann

Summary

Add support for podcast chapters with timestamps, enabling chapter markers in MP3 files and skip-to-timestamp links on episode pages.

Description

Currently, episode frontmatter includes basic metadata (title, date, duration, file, etc.) but has no support for chapter markers. This feature would allow defining chapters in episode frontmatter that can be:

  1. Embedded into MP3 files as ID3 chapter tags during metadata processing
  2. Displayed on the episode page with clickable links to skip to specific timestamps in the audio player

Proposed Frontmatter Schema

title: 'Episode Title'
date: 2025-07-23T08:00:00.000Z
# ... existing fields ...
chapters:
  - title: 'Introduction'
    timestamp: '00:00'
  - title: 'Topic One'
    timestamp: '05:32'
  - title: 'Topic Two'  
    timestamp: '18:45'
  - title: 'Wrap Up'
    timestamp: '42:10'

Implementation Areas

1. Script Tool Enhancement (scripts/update-episodes-metadata.js)

  • Parse chapters array from frontmatter
  • Use node-id3 to embed chapter markers into MP3 files (ID3v2 CHAP frames)
  • Validate timestamp format and ordering

2. Episode Page Template (layouts/_default/single.html)

  • Render chapter list below the audio player or at page bottom
  • Each chapter title links to seek the audio to that timestamp
  • Add JavaScript to handle seek-to-timestamp functionality

3. Audio Player Enhancement

  • Add chapter navigation controls (optional: prev/next chapter buttons)
  • Highlight current chapter based on playback position

Relevant Files

  • content/episodes/*.md - Episode frontmatter
  • scripts/update-episodes-metadata.js - Audio metadata processing
  • layouts/_default/single.html - Episode page template with audio player

Additional Context

The existing update-episodes-metadata.js script already uses node-id3 for ID3 tag writing, which supports chapter frames. The audio player is a custom HTML5 implementation that can be extended with seek functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions