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:

enter image description here

Upvotes: 0

Views: 122

Answers (1)

andrea m.
andrea m.

Reputation: 688

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 %}

Upvotes: 1

Related Questions