<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Gallery on Hugo Theme Stack</title>
        <link>https://turnaoo.top/tags/gallery/</link>
        <description>Recent content in Gallery 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://turnaoo.top/tags/gallery/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>相册</title>
        <link>https://turnaoo.top/p/image-gallery/</link>
        <pubDate>Mon, 26 Jan 2026 00:00:00 +0000</pubDate>
        
        <guid>https://turnaoo.top/p/image-gallery/</guid>
        <description>&lt;img src="https://turnaoo.top/p/image-gallery/helena-hertz-wWZzXlDpMog-unsplash.jpg" alt="Featured image of post 相册" /&gt;&lt;p&gt;Stack 主题内置了对相册的支持。你只需要简单地将多张图片并排放置，就可以创建一个精美的相册。&lt;/p&gt;
&lt;h2 id=&#34;示例相册&#34;&gt;示例相册
&lt;/h2&gt;&lt;p&gt;&lt;img src=&#34;https://turnaoo.top/p/image-gallery/florian-klauer-nptLmg6jqDo-unsplash.jpg&#34;
	width=&#34;667&#34;
	height=&#34;1000&#34;
	srcset=&#34;https://turnaoo.top/p/image-gallery/florian-klauer-nptLmg6jqDo-unsplash_hu_7b8a06820e6d5c.jpg 480w, https://turnaoo.top/p/image-gallery/florian-klauer-nptLmg6jqDo-unsplash_hu_a347f10e565b40ff.jpg 1024w&#34;
	loading=&#34;lazy&#34;
	
		alt=&#34;Photo by Florian Klauer on Unsplash&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;66&#34;
		data-flex-basis=&#34;160px&#34;
	
&gt;  &lt;img src=&#34;https://turnaoo.top/p/image-gallery/luca-bravo-alS7ewQ41M8-unsplash.jpg&#34;
	width=&#34;1000&#34;
	height=&#34;667&#34;
	srcset=&#34;https://turnaoo.top/p/image-gallery/luca-bravo-alS7ewQ41M8-unsplash_hu_258fc4da0cfc7de9.jpg 480w, https://turnaoo.top/p/image-gallery/luca-bravo-alS7ewQ41M8-unsplash_hu_d415bcea096fe061.jpg 1024w&#34;
	loading=&#34;lazy&#34;
	
		alt=&#34;Photo by Luca Bravo on Unsplash&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;149&#34;
		data-flex-basis=&#34;359px&#34;
	
&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://turnaoo.top/p/image-gallery/helena-hertz-wWZzXlDpMog-unsplash.jpg&#34;
	width=&#34;1000&#34;
	height=&#34;750&#34;
	srcset=&#34;https://turnaoo.top/p/image-gallery/helena-hertz-wWZzXlDpMog-unsplash_hu_dfbb0c559c3df461.jpg 480w, https://turnaoo.top/p/image-gallery/helena-hertz-wWZzXlDpMog-unsplash_hu_212d0718b8e99eaa.jpg 1024w&#34;
	loading=&#34;lazy&#34;
	
		alt=&#34;Photo by Helena Hertz on Unsplash&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;133&#34;
		data-flex-basis=&#34;320px&#34;
	
&gt;  &lt;img src=&#34;https://turnaoo.top/p/image-gallery/hudai-gayiran-3Od_VKcDEAA-unsplash.jpg&#34;
	width=&#34;667&#34;
	height=&#34;1000&#34;
	srcset=&#34;https://turnaoo.top/p/image-gallery/hudai-gayiran-3Od_VKcDEAA-unsplash_hu_41819e288bf4a8c0.jpg 480w, https://turnaoo.top/p/image-gallery/hudai-gayiran-3Od_VKcDEAA-unsplash_hu_1277885c87f69490.jpg 1024w&#34;
	loading=&#34;lazy&#34;
	
		alt=&#34;Photo by Hudai Gayiran on Unsplash&#34;
	
	
		class=&#34;gallery-image&#34; 
		data-flex-grow=&#34;66&#34;
		data-flex-basis=&#34;160px&#34;
	
&gt;&lt;/p&gt;
&lt;h2 id=&#34;它是如何工作的&#34;&gt;它是如何工作的
&lt;/h2&gt;&lt;p&gt;相册由 &lt;strong&gt;Photoswipe&lt;/strong&gt; 和一个自定义的内部脚本驱动。它会根据图片的宽高比自动计算出最佳布局。&lt;/p&gt;
&lt;p&gt;要创建一个相册，你只需要将多张图片放在同一行（或同一个段落）中。&lt;/p&gt;
&lt;h3 id=&#34;语法&#34;&gt;语法
&lt;/h3&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;![&lt;span style=&#34;color:#f92672&#34;&gt;图片 1&lt;/span&gt;](&lt;span style=&#34;color:#a6e22e&#34;&gt;image1.jpg&lt;/span&gt;)  ![&lt;span style=&#34;color:#f92672&#34;&gt;图片 2&lt;/span&gt;](&lt;span style=&#34;color:#a6e22e&#34;&gt;image2.jpg&lt;/span&gt;) 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;![&lt;span style=&#34;color:#f92672&#34;&gt;图片 3&lt;/span&gt;](&lt;span style=&#34;color:#a6e22e&#34;&gt;image3.jpg&lt;/span&gt;)  ![&lt;span style=&#34;color:#f92672&#34;&gt;图片 4&lt;/span&gt;](&lt;span style=&#34;color:#a6e22e&#34;&gt;image4.jpg&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;注意&lt;/strong&gt;: 图片之间应该有两个空格，以确保它们在 Markdown 中保持在同一行。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;相册语法启发自 &lt;a class=&#34;link&#34; href=&#34;https://typlog.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Typlog&lt;/a&gt;&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
