You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Out of box we're using the vanilla "media library" configuration for NetlifyCMS that stores everything (images, mp3s, etc) in an uploads folder in the git repo itself. It works for the demo site and is probably even fine for some simple podcasts but it'd be great to handle things better for more complex ones.
Issues to consider:
NetlifyCMS integration — add a media provider or just turn off library management and let them enter the mp3 filepath as a string?
Filesize/Duration detection — we're using an eleventy plugin that checks local files, moving to external hosting would require fancier treatment or manual entry of size/duration in the episode frontmatter. We have properties for that but it feels like better handling would be nice.
URL Generation — it'd be nice if the remote/local question was abstracted away by the time "what's the URL for this podcast episode" is asked at the template level. Maybe a helper filter or shortcode that wraps all of the if/then checking.
The text was updated successfully, but these errors were encountered:
A couple of useful notes on the Filesize/Duration detection: rather than having complex logic in the display templates to convert filenames into remote vs local URLs, we can use calculated computed data in eleventy. For example, the episodes.json currently specifies shared properties that all episodes have; using straight JS in the form of episodes.11ty.js would allow us to transform each post's frontmatter to produce calculated "final" values.
Taking an mp3 filename, then taking global settings about file storage into account to generate a final URL, would be easy with this mechanism. Calculated frontmatter values can also make use of async functions — making remote requests to get filesize/filemeta, etc.
Out of box we're using the vanilla "media library" configuration for NetlifyCMS that stores everything (images, mp3s, etc) in an
uploads
folder in the git repo itself. It works for the demo site and is probably even fine for some simple podcasts but it'd be great to handle things better for more complex ones.Issues to consider:
The text was updated successfully, but these errors were encountered: