Changeset 328d837 in Klonkt for src/views


Ignore:
Timestamp:
06/29/2026 11:24:30 PM (2 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
09a2061
Parents:
93b147d
Message:

feat(music): schema.org MusicRecording/MusicAlbum structured data on audio posts (music federation Fase 1)

An audio post now emits standard schema.org MusicRecording (single track) or MusicAlbum
(album/playlist) JSON-LD alongside the existing Article data — a real web standard read by
search engines and generic JSON-LD consumers, NOT a Klonkt-invented field. The url points
to the gated player page, so the anti-steal posture is unchanged. The track-resolution helper
is the reusable base for the (future) Funkwhale Audio/Library federation (Fase 2).

  • src/services/MusicMeta.js (new) — resolves a post's track/album/playlist shortcodes to hosted tracks and builds a schema.org MusicRecording/MusicAlbum (name, byArtist=MusicGroup, inAlbum, ISO-8601 duration, license, creditText, image, url)
  • src/routes/posts.js — passes a musicLd local on the post page
  • src/views/shell.ejs — renders a second ld+json script for music posts (Article kept intact)

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/shell.ejs

    r93b147d r328d837  
    199199<script type="application/ld+json"><%- JSON.stringify(_jsonLd) %></script>
    200200<% } %>
     201<% if (typeof musicLd !== 'undefined' && musicLd) { %>
     202<%# Music posts also carry standard schema.org MusicRecording/MusicAlbum data (Phase 1 of
     203    music federation): real web standard, read by search engines + generic consumers. %>
     204<script type="application/ld+json"><%- JSON.stringify(musicLd) %></script>
     205<% } %>
    201206
    202207<!-- Self-hosted fonts (privacy-first) -->
Note: See TracChangeset for help on using the changeset viewer.