{"id":28237094,"url":"https://github.com/timerring/hugo-live-photo","last_synced_at":"2026-03-01T04:33:49.051Z","repository":{"id":294017550,"uuid":"985738593","full_name":"timerring/hugo-live-photo","owner":"timerring","description":"Add Live Photo Effect to Hugo (Hugo live photo shortcodes)","archived":false,"fork":false,"pushed_at":"2025-05-18T15:04:34.000Z","size":6082,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-05T03:05:31.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blogs.timerring.com/posts/0516-add-live-photo-effect-to-hugo","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timerring.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-18T12:30:10.000Z","updated_at":"2025-08-06T14:33:26.000Z","dependencies_parsed_at":"2025-05-18T14:36:11.587Z","dependency_job_id":null,"html_url":"https://github.com/timerring/hugo-live-photo","commit_stats":null,"previous_names":["timerring/hugo-live-photo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timerring/hugo-live-photo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timerring%2Fhugo-live-photo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timerring%2Fhugo-live-photo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timerring%2Fhugo-live-photo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timerring%2Fhugo-live-photo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timerring","download_url":"https://codeload.github.com/timerring/hugo-live-photo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timerring%2Fhugo-live-photo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29960253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-19T00:17:27.297Z","updated_at":"2026-03-01T04:33:49.032Z","avatar_url":"https://github.com/timerring.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hugo-live-photo\n\n\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003cimg src=\"./public/example.gif\" alt=\"hugo-live-photo\"  width=\"500\" height=\"500\"/\u003e\n  \u003c/picture\u003e\n\nAdd Live Photo Effect to Hugo (Hugo live photo shortcodes) \n\n在 hugo 中实现 live photo 功能（Hugo live photo 短代码）\n\nEnglish Version |\n[中文版本](./README.zh.md) |\n[Share your idea](https://github.com/timerring/hugo-live-photo/issues/new) ｜\n[Live demo](https://blog.timerring.com/posts/0516-add-live-photo-effect-to-hugo/#%e6%95%88%e6%9e%9c%e5%b1%95%e7%a4%ba)\n\n\u003c/div\u003e\n\n## Introduction\n\nThis is a Hugo shortcode that implements iOS-like Live Photo functionality in your Hugo website. When users hover over an image, it displays a dynamic effect, and when the mouse moves away, it returns to the static image.\n\nTo learn more about the implementation details, please read my blog post [Add Live Photo Effect to Hugo](https://blog.timerring.com/posts/0516-add-live-photo-effect-to-hugo).\n\n## Installation\n\n1. Copy the `src/live-photo.html` template file to your Hugo theme directory at `layouts/shortcodes/live-photo.html` (You can modify it according to your needs, for example, if you want the Live Photo to play sound, just remove the `muted` attribute from the video tag).\n2. Copy the `src/live-photo.js` script file to your Hugo theme directory at `assets/live-photo.js`.\n3. Append the content from `src/html-head.html` to your theme's `layouts/partials/html-head.html` file (you can modify it according to your needs), just make sure the script `live-photo.js` file is included when building the page.\n4. Define styles in your theme's `assets/_shortcodes.scss` file following the `src/_shortcodes.scss` as a basic reference. You can customize the styles according to your needs.\n\n## Usage Example\n\n\u003e Most image hosting services don't support HEIC format, so it's recommended to convert images to `webp`, `jpg`, etc. using tools like `magick`.\n\u003e\n\u003e Similarly, most CDNs cannot accelerate content larger than 20 MB, so it's recommended to use tools like `ffmpeg` to reduce the bitrate of mov videos and encode them as `mp4` or other HTML-supported video formats using h.264.\n\nUse the following shortcode in your Markdown files:\n\n```html\n{{\u003c live-photo \n    image=\"path/to/your/image.jpg\"\n    video=\"path/to/your/video.mp4\"\n    desc=\"The image description\"\n\u003e}}\n```\n\n## Contributing\n\nFeel free to submit Pull Requests or create Issues to help improve this project. Welcome your ideas about Live Photo functionality.\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimerring%2Fhugo-live-photo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimerring%2Fhugo-live-photo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimerring%2Fhugo-live-photo/lists"}