简体   繁体   中英

Add 360 photo to jekyll post or background

I'd like to add 360 photos in posts in a jekyll web page. I already know that there are some services where I can store those and then add the photo to the post with the iframe structure.

What I want is to have the photos stored in the server folders ( images ) and add the photo as a frame or as a background using panolens.js

For example in this case they do this editing the index.html . What I'd like is to get this via jekyll post markdown or in other way. For example something like this:

在此处输入图像描述

My solution was to define a liquid array of photos URLs right in the post; careful to indent the array elements and put a space after the - sign

---
layout: post
title: Photos
gallery:     
    - https://path/to/photos/photo1.jpg
    - https://path/to/photos/photo2.jpg
    - https://path/to/photos/photo3.jpg
---

and then in the post.html layout I just display them with my preferred style, the minimal is this but of course, you can use your preferred gallery slideshow:

{% for image in page.gallery %}
    <img src="{{ image }}" />
{% endfor %}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM