Open pdpinch opened 2 years ago
I think, in ocw-to-hugo
we can move
optional_text: optionalText,
related_resources_text: relatedResourcesText,
optional_tab_title: media["optional_tab_title"] || "",
from here to/inside video_metadata
here while generating front matter in generateResourceMarkdownForVideo
and in ocw-hugo-projects
, we can add these fields in video metadata widget here
But since I'm not very sure so if @mbertrand could share his thoughts on this?
That sounds right, but I think ocw-hugo-themes would have to change too here
That sounds right, but I think ocw-hugo-themes would have to change too here
Yes. Thanks for confirming.
@pdpinch Shall we proceed with this then? It will be 3 PRs I think
Maybe a simpler way would be to keep the fields where they are and just change ocw-hugo-projects
to conditionally add these fields to the form if a video resource, but outside of the video_metadata
section. However it seems like the video_metadata
section is where they logically belong.
@pdpinch So after talking to @mbertrand regarding this, it looks like we have 2 approaches (maybe we have more but I'm not sure):
First Approach:
(Reference)
ocw-to-hugo
, move these fields (related resource text, optional title, and optional text) inside video-metadata
(currently, they are outside) in front-matter ocw-hugo-projects
in video-metadata ocw-hugo-themes
to get this data from video-metadata (reference)With this approach, we will also have to update all the current resources as the location of the fields are being changed.
Second Approach:
(Reference)
@mbertrand Please correct me if I'm wrong or If i have missed anything or if you would like to add anything.
I think we should go with the second approach. An additional consideration is that these fields were brought into ocw-studio
using overwrite_ocw_course_content
. I'm unsure if the function supports pulling in a nested field like metadata.video_metadata.optional_text
but if we're going to go with the first approach we should make sure that this is supported, as I don't think we can run that with just metadata.video_metadata
as it would overwrite video metadata that has been updated by the OCW team. @abeglova might know more.
Really the "Video Metadata" section is all YouTube metadata anyway. Maybe we should rename that section to "YouTube Metadata" and create a new section for these other properties called "Additional Video Metadata" or something? It seems doubtful that this other content (that originally came from the video page in OCW) would ever be directly used in YouTube. If we put all of these properties under something like additional_video_metadata
then we could run the overwrite_ocw_course_content
command with metadata.additional_video_metadata
and in the starter we could define a separate section for these below the YouTube metadata. Anyway, that's my thoughts on it.
Can you remind me what the field names are? I don't see them in ocw-hugo-projects (which, perhaps, is part of the problem).
Can you remind me what the field names are? I don't see them in ocw-hugo-projects
if you're talking about these fields:
then I don't think these fields are there in ocw-hugo-projects
yet as stated here
So far, the few times this has come up, we have simply edited the video "tab data" via the django admin.
There have been no requests to enable this for new videos.
In https://github.com/mitodl/ocw-data-parser/issues/162 we started importing video metadata that appears below the video player.
That content now publishes on the site, but there's no way to edit it. I was expecting it would be a field in the video metadata, but it's not there.
for example, compare the published page: https://ocwnext.odl.mit.edu/courses/cms-930-media-education-and-the-marketplace-fall-2001/resources/personal-media/
with the studio page: https://ocw-studio.odl.mit.edu/sites/cms-930-media-education-and-the-marketplace-fall-2001/type/resource/edit/112255fb-d8d5-7ec1-580d-0f9e30025109/?q=personal
Acceptance Criteria: