<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on John's Blog</title><link>/posts/</link><description>Recent content in Posts on John's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/posts/rss.xml" rel="self" type="application/rss+xml"/><item><title>Lazy Load Posts</title><link>/posts/lazyload/</link><pubDate>Sat, 12 Sep 2026 00:00:00 +0000</pubDate><guid>/posts/lazyload/</guid><description>&lt;p&gt;Toha can append the next page of post cards as readers scroll near the bottom of a list. It works on blog sections, nested sections, and individual tag and category pages.&lt;/p&gt;
&lt;h2 id="configuration"&gt;Configuration&lt;/h2&gt;
&lt;p&gt;Enable the feature in &lt;code&gt;hugo.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="code-block" data-code-block&gt;&lt;div class="code-block-full" id="code-block-5c52ba292c0a7d2b8fae45b4e98af1e5-0"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;params&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;features&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;pagination&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;maxPostsPerPage&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;12&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;lazyLoad&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;script type="application/json" class="code-block-data"&gt;{"copyButton":true,"expanded":false,"labels":{"code":"Code","copied":"Copied!","copy":"Copy","copyError":"Copy failed. Try again.","showAll":"Show all {count} lines","showLess":"Show fewer lines"},"language":"","preview":"","source":"params:\n features:\n pagination:\n maxPostsPerPage: 12\n lazyLoad: true\n","title":"yaml"}&lt;/script&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;lazyLoad&lt;/code&gt; defaults to &lt;code&gt;false&lt;/code&gt;. &lt;code&gt;maxPostsPerPage&lt;/code&gt; controls the number of cards in both normal pagination and each additional batch. No JSON output configuration or additional library is required. Existing RSS feeds and output formats remain unchanged.&lt;/p&gt;</description></item><item><title>Code blocks</title><link>/posts/code-blocks/</link><pubDate>Thu, 22 Jan 2026 00:00:00 +0000</pubDate><guid>/posts/code-blocks/</guid><description>&lt;p&gt;Code blocks have a compact header automatically. This example site enables
&lt;code&gt;params.features.codeBlock.folding.enable&lt;/code&gt; with an eight-line preview. Set
&lt;code&gt;folding.previewLines&lt;/code&gt; to change the preview length or &lt;code&gt;folding.enable: false&lt;/code&gt;
to show all code. Use &lt;code&gt;codeBlock.copyButton.enable&lt;/code&gt; to control copying.&lt;/p&gt;
&lt;h2 id="a-long-example"&gt;A long example&lt;/h2&gt;
&lt;p&gt;Copy includes the complete configuration, even while only its preview is visible.&lt;/p&gt;
&lt;div class="code-block" data-code-block&gt;&lt;div class="code-block-full" id="code-block-167d30ae6e233777e30ade54a366ca2b-0"&gt;&lt;div class="highlight" title="hugo.yaml"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;baseURL&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;https://example.com/&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;languageCode&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;en-us&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;title&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;My portfolio&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;params&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;features&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;codeBlock&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;copyButton&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;enable&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;folding&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;enable&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;previewLines&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;8&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;footer&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;enable&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;newsletter&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;enable&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;script type="application/json" class="code-block-data"&gt;{"copyButton":true,"expanded":false,"labels":{"code":"Code","copied":"Copied!","copy":"Copy","copyError":"Copy failed. Try again.","showAll":"Show all {count} lines","showLess":"Show fewer lines"},"language":"yaml","preview":"\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;\"\u003e\u003ccode class=\"language-yaml\" data-lang=\"yaml\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003ebaseURL\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;https://example.com/\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003elanguageCode\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;en-us\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003etitle\u003c/span\u003e: \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;My portfolio\u0026#34;\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#f92672\"\u003eparams\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003efeatures\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ecodeBlock\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e \u003cspan style=\"color:#f92672\"\u003ecopyButton\u003c/span\u003e:\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","source":"baseURL: \"https://example.com/\"\nlanguageCode: \"en-us\"\ntitle: \"My portfolio\"\n\nparams:\n features:\n codeBlock:\n copyButton:\n enable: true\n folding:\n enable: true\n previewLines: 8\n\n footer:\n enable: true\n newsletter:\n enable: false\n","title":"hugo.yaml"}&lt;/script&gt;&lt;/div&gt;&lt;h2 id="initially-expanded-without-line-numbers"&gt;Initially expanded, without line numbers&lt;/h2&gt;
&lt;p&gt;This block starts expanded and can still be folded. Its Copy button preserves
the complete source without relying on the highlighted markup.&lt;/p&gt;</description></item><item><title>Introduction</title><link>/posts/introduction/</link><pubDate>Mon, 08 Jun 2020 08:06:25 +0600</pubDate><guid>/posts/introduction/</guid><description>&lt;p&gt;Greeting! This is an introduction post. This post tests the followings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hero image is in the same directory as the post.&lt;/li&gt;
&lt;li&gt;This post should be at top of the sidebar.&lt;/li&gt;
&lt;li&gt;Post author should be the same as specified in &lt;code&gt;author.yaml&lt;/code&gt; file.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Markdown Samples</title><link>/posts/markdown-sample/</link><pubDate>Mon, 08 Jun 2020 08:06:25 +0600</pubDate><guid>/posts/markdown-sample/</guid><description>&lt;p&gt;This is a sample post intended to test the followings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A different post author.&lt;/li&gt;
&lt;li&gt;Table of contents.&lt;/li&gt;
&lt;li&gt;Markdown content rendering.&lt;/li&gt;
&lt;li&gt;Math rendering.&lt;/li&gt;
&lt;li&gt;Emoji rendering.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id="markdown-syntax-rendering"&gt;Markdown Syntax Rendering&lt;/h1&gt;
&lt;h2 id="headings"&gt;Headings&lt;/h2&gt;
&lt;p&gt;The following HTML &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt;—&lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; elements represent six levels of section headings. &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; is the highest section level while &lt;code&gt;&amp;lt;h6&amp;gt;&lt;/code&gt; is the lowest.&lt;/p&gt;
&lt;h1 id="h1"&gt;H1&lt;/h1&gt;
&lt;h2 id="h2"&gt;H2&lt;/h2&gt;
&lt;h3 id="h3"&gt;H3&lt;/h3&gt;
&lt;h4 id="h4"&gt;H4&lt;/h4&gt;
&lt;h5 id="h5"&gt;H5&lt;/h5&gt;
&lt;h6 id="h6"&gt;H6&lt;/h6&gt;
&lt;h2 id="paragraph"&gt;Paragraph&lt;/h2&gt;
&lt;p&gt;Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.&lt;/p&gt;</description></item><item><title>Rich Content</title><link>/posts/category/sub-category/rich-content/</link><pubDate>Mon, 08 Jun 2020 08:06:25 +0600</pubDate><guid>/posts/category/sub-category/rich-content/</guid><description>&lt;p&gt;This sample post tests the followings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Category, sub-category nesting in the sidebar.&lt;/li&gt;
&lt;li&gt;Hero image and other images are in &lt;code&gt;images&lt;/code&gt; folder inside this post directory.&lt;/li&gt;
&lt;li&gt;Different media rendering like image, X (formerly Twitter), YouTube video, Vimeo video etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="image-sample"&gt;Image Sample&lt;/h3&gt;
&lt;img src="/posts/category/sub-category/rich-content/images/forest.jpg"
alt="Forest"
class="center"
&gt;
&lt;div style="margin-top: rem;"&gt;&lt;/div&gt;
&lt;h3 id="x-formerly-twitter-sample"&gt;X (formerly Twitter) Sample&lt;/h3&gt;
&lt;blockquote class="twitter-tweet"&gt;&lt;p lang="en" dir="ltr"&gt;Owl bet you&amp;#39;ll lose this staring contest 🦉 &lt;a href="https://t.co/eJh4f2zncC"&gt;pic.twitter.com/eJh4f2zncC&lt;/a&gt;&lt;/p&gt;&amp;mdash; San Diego Zoo Wildlife Alliance (@sandiegozoo) &lt;a href="https://x.com/sandiegozoo/status/1453110110599868418?ref_src=twsrc%5Etfw"&gt;October 26, 2021&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src="https://platform.x.com/widgets.js" charset="utf-8"&gt;&lt;/script&gt;
&lt;div style="margin-top: rem;"&gt;&lt;/div&gt;
&lt;h3 id="youtube-video-sample"&gt;YouTube Video Sample&lt;/h3&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/ZJthWmvUzzc?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;div style="margin-top: rem;"&gt;&lt;/div&gt;
&lt;h3 id="vimeo-video-sample"&gt;Vimeo Video Sample&lt;/h3&gt;
&lt;div
style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe
src="https://player.vimeo.com/video/48912912?dnt=0"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allow="fullscreen"&gt;
&lt;/iframe&gt;
&lt;/div&gt;</description></item><item><title>Shortcodes Samples</title><link>/posts/shortcodes/</link><pubDate>Mon, 08 Jun 2020 08:06:25 +0600</pubDate><guid>/posts/shortcodes/</guid><description>&lt;p&gt;This is a sample post intended to test the followings:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Default hero image.&lt;/li&gt;
&lt;li&gt;Different shortcodes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="alert"&gt;Alert&lt;/h2&gt;
&lt;p&gt;The following alerts are available in this theme.&lt;/p&gt;
&lt;div class="alert success"&gt;
&lt;span&gt;&lt;i data-feather="check-circle"&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span&gt;&lt;strong&gt;This is sample alert with &lt;code&gt;type=&amp;quot;success&amp;quot;&lt;/code&gt;.&lt;/strong&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="alert danger"&gt;
&lt;span&gt;&lt;i data-feather="alert-octagon"&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span&gt;&lt;strong&gt;This is sample alert with &lt;code&gt;type=&amp;quot;danger&amp;quot;&lt;/code&gt;.&lt;/strong&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="alert warning"&gt;
&lt;span&gt;&lt;i data-feather="alert-triangle"&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span&gt;&lt;strong&gt;This is sample alert with &lt;code&gt;type=&amp;quot;warning&amp;quot;&lt;/code&gt;.&lt;/strong&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="alert info"&gt;
&lt;span&gt;&lt;i data-feather="info"&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span&gt;&lt;strong&gt;This is sample alert with &lt;code&gt;type=&amp;quot;info&amp;quot;&lt;/code&gt;.&lt;/strong&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="alert dark"&gt;
&lt;span&gt;&lt;i data-feather="alert-circle"&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span&gt;&lt;strong&gt;This is sample alert with &lt;code&gt;type=&amp;quot;dark&amp;quot;&lt;/code&gt;.&lt;/strong&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="alert primary"&gt;
&lt;span&gt;&lt;i data-feather="alert-circle"&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span&gt;&lt;strong&gt;This is sample alert with &lt;code&gt;type=&amp;quot;primary&amp;quot;&lt;/code&gt;.&lt;/strong&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class="alert secondary"&gt;
&lt;span&gt;&lt;i data-feather="alert-circle"&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span&gt;&lt;strong&gt;This is sample alert with &lt;code&gt;type=&amp;quot;secondary&amp;quot;&lt;/code&gt;.&lt;/strong&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;h2 id="image"&gt;Image&lt;/h2&gt;
&lt;h4 id="a-sample-image-without-any-attribute"&gt;A sample image without any attribute.&lt;/h4&gt;
&lt;img src="/posts/shortcodes/boat.jpg"
alt="A boat at the sea"
&gt;
&lt;div style="margin-top: 3rem;"&gt;&lt;/div&gt;
&lt;h4 id="a-sample-image-with-height-and-width-attributes"&gt;A sample image with &lt;code&gt;height&lt;/code&gt; and &lt;code&gt;width&lt;/code&gt; attributes.&lt;/h4&gt;
&lt;img src="/posts/shortcodes/boat.jpg"
alt="A boat at the sea"
width="600"
height="400"
&gt;
&lt;div style="margin-top: 3rem;"&gt;&lt;/div&gt;
&lt;h4 id="a-center-aligned-image-with-height-and-width-attributes"&gt;A center aligned image with &lt;code&gt;height&lt;/code&gt; and &lt;code&gt;width&lt;/code&gt; attributes.&lt;/h4&gt;
&lt;img src="/posts/shortcodes/boat.jpg"
alt="A boat at the sea"
width="600"
height="400"
class="center"
&gt;
&lt;div style="margin-top: 3rem;"&gt;&lt;/div&gt;
&lt;h4 id="a-image-with-float-attribute"&gt;A image with &lt;code&gt;float&lt;/code&gt; attribute.&lt;/h4&gt;
&lt;img src="/posts/shortcodes/boat.jpg"
alt="A boat at the sea"
width="500"
height="200"
style="float: right;"
&gt;
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras egestas lectus sed leo ultricies ultricies. Praesent tellus risus, eleifend vel efficitur ac, venenatis sit amet sem. Ut ut egestas erat. Fusce ut leo turpis. Morbi consectetur sed lacus vitae vehicula. Cras gravida turpis id eleifend volutpat. Suspendisse nec ipsum eu erat finibus dictum. Morbi volutpat nulla purus, vel maximus ex molestie id. Nullam posuere est urna, at fringilla eros venenatis quis.&lt;/p&gt;</description></item></channel></rss>