Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore media properties #29

Merged
merged 1 commit into from
Oct 5, 2024
Merged

Ignore media properties #29

merged 1 commit into from
Oct 5, 2024

Conversation

paulrobertlloyd
Copy link
Collaborator

Currently, the reference implementation ignores fetching references for the url property, this being the URL of the source post.

In testing, a media endpoint can return a fully resolved URL to a photo (or other media item); this can then get referenced, which doesn’t really make much sense, and doesn’t add any useful information. Example:

---
date: 2024-10-05T20:32:16.624+01:00
photo:
  - url: media/photos/2024/279/p1/image.jpg
references:
  https://indiekitSandboxNetlifyApp/media/photos/2024/279/p1/imageJpg:
    url: https://indiekit-sandbox.netlify.app/media/photos/2024/279/p1/image.jpg
---
Test from Micro.blog.

What happened here was that Indiekit’s media endpoint returned a fully resolved URL for the media item, and then the post template updated the URL for photo to be a relative path to the file. However, somewhere in the flow of things, the URL for the photo got referenced and appended to the post properties.

This PR adds audio, photo and video properties to url to a list of properties to ignore, and thus never seek to get reference data for.

@aciccarello; am going to publish this in the next minor release, can refine in subsequent releases if you think I may have got this wrong.

@paulrobertlloyd paulrobertlloyd merged commit 0fdf88b into main Oct 5, 2024
1 check passed
@paulrobertlloyd paulrobertlloyd deleted the ignore-media-properties branch October 5, 2024 20:03
@paulrobertlloyd paulrobertlloyd added the enhancement New feature or request label Oct 5, 2024
@aciccarello
Copy link
Contributor

Wow, that's a strange result. Ignoring those properties seems reasonable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants