Sample Local Video Post
Sample Post with Local Video
This is a sample post that demonstrates using a local video file with the featured video functionality. The video is embedded at the top of the post using the featured-video
frontmatter variable.
Local videos are a great option when:
- You want to maintain control over the video content
- You need to ensure the video is always available
- You want to avoid external dependencies
- You want to customize the video player appearance
How to Use
Simply add the featured-video
variable to your frontmatter with a path to your local video file:
---
title: Your Post Title
featured-video: /assets/videos/your-video.mp4
---
The system will automatically look for a WebM version with the same name for better browser compatibility:
/assets/videos/your-video.mp4
/assets/videos/your-video.webm
Video Formats
For maximum browser compatibility, it's recommended to provide your videos in multiple formats:
- MP4 (H.264) - Widely supported across browsers
- WebM - Better compression, supported in most modern browsers
Performance Tips
When using local videos, keep these performance tips in mind:
- Optimize your videos for web delivery (compress them appropriately)
- Consider using lower resolution videos for mobile devices
- Keep video length reasonable to minimize page load times
- Use appropriate poster images for videos
Enjoy the new feature!