As an experienced website operations expert, I know that in today's content explosion in the Internet world, how to make our content stand out and be better understood and recommended by search engines is the key to the success of website operations.Video content, as a increasingly popular media form, its SEO optimization is particularly important.VideoObjectTypes of Json-LD to enhance the visibility and search ranking of video content.
Unlock the video SEO potential of AnQiCMS: how to useVideoObjectJson-LD improves video visibility
In the digital wave, video has become one of the mainstream ways for enterprises to convey information and attract users.However, simply uploading videos will not naturally bring in massive traffic.Search engines, such as Google, Baidu, etc., require structured data to understand your video content.VideoObjectThe Json-LD (JavaScript Object Notation for Linked Data) is such a standard that it clearly tells search engines all the important information about your video, thereby helping your video to be displayed in search results in the form of "rich media snippets" (Rich Snippets), significantly improving click-through rates and user experience.
AnQiCMS as an efficient and flexible content management system fully considers the needs of SEO optimization. It not only provides a complete content publishing and management mechanism, but also, through its powerful template engine and custom tags, allows generationVideoObjectJson-LD becomes easy.
UnderstandingVideoObjectThe core elements of Json-LD
Building in AnQiCMSVideoObjectBefore Json-LD, we must first understand a completeVideoObjectWhat attributes usually need to be included. These attributes are like the 'digital ID card' of a video, enabling search engines to have a comprehensive understanding of it:
@contextand@type: Defines the data type ofVideoObject.name: The video title.description: The video description.uploadDate: The video upload date, in ISO 8601 format (for example:)2023-10-27T10:00:00+08:00)thumbnailUrl: The video cover URL.contentUrl: The direct URL of the video file (if self-hosted).embedUrl: The embed URL of the video player (e.g., YouTube, Vimeo embed links).duration: Video duration, formatted as ISO 8601 (for example:PT1M30Sindicating 1 minute and 30 seconds).publisher: Information about the video publisher, usually including name and Logo.interactionStatistic: Video interaction data, such as view counts.
How does AnQiCMS supportVideoObjectJson-LD generation
AnQiCMS provides a named{% jsonLd %}custom tags, which is the implementation ofVideoObjectThe key to Json-LD lies here. This tag allows you to embed structured data directly in the template, and it has smart merge capabilities: if you are{% jsonLd %}The field defined within the tag conflicts with the system's default structured data, and your custom value will take precedence.This means you can customize the specific page (such as the video detail page) while maintaining the system's general SEO advantages.
Step by step implementation: Build a video pageVideoObjectJson-LD
Next, we will guide you through several simple steps on how to create an efficient video page in AnQiCMSVideoObjectJson-LD.
The first step is to determine the source of video data
In AnQiCMS, the core data of the video detail page usually comes from "Document Details"(archiveDetail). We need to map the following basic information:
- Video title(
name): Usually corresponds to the document title{{archive.Title}}. - Video description(
description): Usually corresponds to the document summary{{archive.Description}}. - Upload date(
uploadDate): The creation time of the document{{archive.CreatedTime}}, needs to be usedstampToDatefunction for formatting. - Cover image(
thumbnailUrl): The cover image of the document{{archive.Logo}}or thumbnail{{archive.Thumb}}. - Views(
userInteractionCount): Corresponding document views{{archive.Views}}.
However, likecontentUrl(Video file URL),embedUrl(Embed Player URL) andduration(Video Duration) this information, the default document model of AnQiCMS may not have corresponding fields directly. This leads to our next step.
The second step: Create or modify the content model to add custom fields
To fully describe the video, we may need to add some custom fields for the video type content in the 'Content Model'. For example, we can add:
video_file_url(Single-line text)Used to store the direct download or play URL of the video file, corresponding tocontentUrl.video_embed_url(Single-line text)Used to store the embedding URL of the video player, corresponding toembedUrl.video_duration(Single-line text)Used to store the video duration, for examplePT5M30SCorresponding to,duration.
The operation path is usually: Admin Management -> Content Management -> Content Model -> Edit the corresponding video model (or create a new video model) -> Add custom fields. When adding custom fields, please make sure that the 'reference field' uses lowercase English letters and is descriptive, such asvideo_file_url/video_embed_url/video_duration.
Step 3: Write the template code
After completing the data preparation, we can use the template on the video detail page (for example{模型table}/detail.htmlUse it in{% jsonLd %}tag to buildVideoObject. Usually, this code is placed in the HTML's<head>Within the area.
”`twig {% Ld %}