<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Photoswipe on Hugo Theme Stack</title>
        <link>https://yanyanliu.com/tags/photoswipe/</link>
        <description>Recent content in Photoswipe on Hugo Theme Stack</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-cn</language>
        <lastBuildDate>Mon, 26 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://yanyanliu.com/tags/photoswipe/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Image Gallery</title>
            <link>https://yanyanliu.com/p/image-gallery/</link>
            <pubDate>Mon, 26 Jan 2026 00:00:00 +0000</pubDate>
            <guid>https://yanyanliu.com/p/image-gallery/</guid>
            <description>&lt;img src=&#34;https://yanyanliu.com/&#34; alt=&#34;Featured image of post Image Gallery&#34; /&gt;&lt;p&gt;Stack theme has a built-in support for image galleries. It allows you to create a beautiful gallery by simply placing multiple images side-by-side.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sample-gallery&#34;&gt;Sample Gallery&#xA;&lt;/h2&gt;&lt;p&gt;&lt;img alt=&#34;Photo by Florian Klauer on Unsplash&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;160px&#34; data-flex-grow=&#34;66&#34; height=&#34;1000&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://yanyanliu.com/p/image-gallery/florian-klauer-nptLmg6jqDo-unsplash.jpg&#34; width=&#34;667&#34;&gt;  &lt;img alt=&#34;Photo by Luca Bravo on Unsplash&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;359px&#34; data-flex-grow=&#34;149&#34; height=&#34;667&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://yanyanliu.com/p/image-gallery/luca-bravo-alS7ewQ41M8-unsplash.jpg&#34; srcset=&#34;https://yanyanliu.com/p/image-gallery/luca-bravo-alS7ewQ41M8-unsplash_hu_33106cec50e27d6d.jpg 800w, https://yanyanliu.com/p/image-gallery/luca-bravo-alS7ewQ41M8-unsplash.jpg 1000w&#34; width=&#34;1000&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Photo by Helena Hertz on Unsplash&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;750&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://yanyanliu.com/p/image-gallery/helena-hertz-wWZzXlDpMog-unsplash.jpg&#34; srcset=&#34;https://yanyanliu.com/p/image-gallery/helena-hertz-wWZzXlDpMog-unsplash_hu_6c237bc498d55aea.jpg 800w, https://yanyanliu.com/p/image-gallery/helena-hertz-wWZzXlDpMog-unsplash.jpg 1000w&#34; width=&#34;1000&#34;&gt;  &lt;img alt=&#34;Photo by Hudai Gayiran on Unsplash&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;160px&#34; data-flex-grow=&#34;66&#34; height=&#34;1000&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://yanyanliu.com/p/image-gallery/hudai-gayiran-3Od_VKcDEAA-unsplash.jpg&#34; width=&#34;667&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&#xA;&lt;/h2&gt;&lt;p&gt;The gallery is powered by &lt;strong&gt;Photoswipe&lt;/strong&gt; and a custom internal script. It automatically calculates the best layout for your images based on their aspect ratios.&lt;/p&gt;&#xA;&lt;p&gt;To create a gallery, you just need to put multiple images in the same line (or paragraph).&lt;/p&gt;&#xA;&lt;h3 id=&#34;syntax&#34;&gt;Syntax&#xA;&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;&#xA;&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2&#xA;&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3&#xA;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#xA;&lt;td class=&#34;lntd&#34;&gt;&#xA;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;![&lt;span class=&#34;nt&#34;&gt;Image 1&lt;/span&gt;](&lt;span class=&#34;na&#34;&gt;image1.jpg&lt;/span&gt;)  ![&lt;span class=&#34;nt&#34;&gt;Image 2&lt;/span&gt;](&lt;span class=&#34;na&#34;&gt;image2.jpg&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;![&lt;span class=&#34;nt&#34;&gt;Image 3&lt;/span&gt;](&lt;span class=&#34;na&#34;&gt;image3.jpg&lt;/span&gt;)  ![&lt;span class=&#34;nt&#34;&gt;Image 4&lt;/span&gt;](&lt;span class=&#34;na&#34;&gt;image4.jpg&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: There should be two spaces between the images to ensure they stay in the same line in Markdown&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Gallery Syntax inspired by &lt;a class=&#34;link&#34; href=&#34;https://typlog.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Typlog&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
