<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title/><link>https://chiphan1110.github.io/</link><atom:link href="https://chiphan1110.github.io/index.xml" rel="self" type="application/rss+xml"/><description/><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Mon, 24 Oct 2022 00:00:00 +0000</lastBuildDate><image><url>https://chiphan1110.github.io/media/icon_hu_8402489142ee8f45.png</url><title/><link>https://chiphan1110.github.io/</link></image><item><title>Getting Started</title><link>https://chiphan1110.github.io/courses/hugo-blox/getting-started/</link><pubDate>Sat, 17 Feb 2024 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/getting-started/</guid><description>&lt;h2 id="quick-start-from-template"&gt;Quick Start from Template&lt;/h2&gt;
&lt;div class="hb-steps"&gt;
&lt;h3 id="create-a-site"&gt;Create a site&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h3 id="configure-your-new-site"&gt;Configure your new site&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h3 id="add-your-content"&gt;Add your content&lt;/h3&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;h3 id="publish-your-site"&gt;Publish your site&lt;/h3&gt;
&lt;p&gt;Your site will automatically publish ~1-5 minutes after you commit (save) changes to files in your GitHub repository.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id="next"&gt;Next&lt;/h2&gt;
&lt;p&gt;Let&amp;rsquo;s customize your new site:&lt;/p&gt;
&lt;div class="hb-cards mt-4 grid gap-4 not-prose" style="--hb-cols: 1;"&gt;
&lt;a
class="hb-card group"href="../guide/project-structure" &gt;
&lt;span class="hb-card-title p-4"&gt;
&lt;svg style="height: 1em; width: 1em;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9 9 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9 9 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"/&gt;&lt;/svg&gt;Project Structure&lt;/span&gt;&lt;/a&gt;
&lt;a
class="hb-card group"href="../guide/configuration" &gt;
&lt;span class="hb-card-title p-4"&gt;
&lt;svg style="height: 1em; width: 1em;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"/&gt;&lt;/svg&gt;Configuration&lt;/span&gt;&lt;/a&gt;
&lt;a
class="hb-card group"href="../guide/formatting" &gt;
&lt;span class="hb-card-title p-4"&gt;
&lt;svg style="height: 1em; width: 1em;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9 9 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9 9 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"/&gt;&lt;/svg&gt;Create content&lt;/span&gt;&lt;/a&gt;
&lt;/div&gt;</description></item><item><title>Customizing Hugo</title><link>https://chiphan1110.github.io/courses/hugo-blox/reference/customization/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/reference/customization/</guid><description>&lt;p&gt;View the full docs at
&lt;/p&gt;</description></item><item><title>Project Structure</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/project-structure/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/project-structure/</guid><description>&lt;h2 id="folder-structure"&gt;Folder Structure&lt;/h2&gt;
&lt;p&gt;There are &lt;strong&gt;4 main folders for Hugo-based sites&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;content/&lt;/code&gt; for your Markdown-formatted content files (homepage, etc.)
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;_index.md&lt;/code&gt; the homepage (&lt;strong&gt;Hugo requires that the homepage and archive pages have an underscore prefix&lt;/strong&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;assets/&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;media/&lt;/code&gt; for your media files (images, videos)
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;icons/custom/&lt;/code&gt; upload any custom SVG icons you want to use&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config/_default/&lt;/code&gt; for your site configuration files
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hugo.yaml&lt;/code&gt; to configure Hugo (site title, URL, Hugo options, setup per-folder page features)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;module.yaml&lt;/code&gt; to install or uninstall Hugo themes and plugins&lt;/li&gt;
&lt;li&gt;&lt;code&gt;params.yaml&lt;/code&gt; to configure Hugo Blox options (SEO, analytics, site features)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;menus.yaml&lt;/code&gt; to configure your menu links (if the menu is enabled in &lt;code&gt;params.yaml&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;languages.yaml&lt;/code&gt; to configure your site&amp;rsquo;s language or to set language-specific options in a multilingual site&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;static/uploads/&lt;/code&gt; for any files you want visitors to download, such as a PDF&lt;/li&gt;
&lt;li&gt;&lt;code&gt;go.mod&lt;/code&gt; sets the version of Hugo themes/plugins which your site uses&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="hugo-file-naming-convention"&gt;Hugo File Naming Convention&lt;/h2&gt;
&lt;p&gt;Hugo gives us two options to name standard page files: as &lt;code&gt;TITLE/index.md&lt;/code&gt; or &lt;code&gt;TITLE.md&lt;/code&gt; where &lt;code&gt;TITLE&lt;/code&gt; is your page name.&lt;/p&gt;
&lt;p&gt;The page name should be lowercase and using hyphens (&lt;code&gt;-&lt;/code&gt;) instead of spaces.&lt;/p&gt;
&lt;p&gt;Both approaches result in the same output, so you can choose your preferred approach to naming and organizing files. A benefit to the folder-based approach is that all your page&amp;rsquo;s files (such as images) are self-contained within the page&amp;rsquo;s folder, so it&amp;rsquo;s more portable if you wish to share the original Markdown page with someone.&lt;/p&gt;
&lt;p&gt;The homepage is a special case as &lt;strong&gt;Hugo requires the homepage and listing pages to be named&lt;/strong&gt; &lt;code&gt;_index.md&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="docs-navigation"&gt;Docs Navigation&lt;/h2&gt;
&lt;p&gt;The docs navigation is automatically generated based on the content in the &lt;code&gt;docs/&lt;/code&gt; folder and is sorted alphabetically.&lt;/p&gt;
&lt;p&gt;The order of pages can be changed by adding the &lt;code&gt;weight&lt;/code&gt; parameter in the front matter of your Markdown files.&lt;/p&gt;
&lt;p&gt;In the example below, the &lt;code&gt;example.md&lt;/code&gt; page will appear before the &lt;code&gt;test.md&lt;/code&gt; page as it has a lower &lt;code&gt;weight&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;Page &lt;code&gt;example.md&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;My Example&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Page &lt;code&gt;test.md&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;My Test&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Configuration</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/configuration/</guid><description>&lt;p&gt;The configuration of your site can be found in &lt;code&gt;config/_default/&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="full-documentation"&gt;Full Documentation&lt;/h2&gt;
&lt;p&gt;See
&lt;/p&gt;
&lt;h2 id="navigation"&gt;Navigation&lt;/h2&gt;
&lt;h3 id="menu"&gt;Menu&lt;/h3&gt;
&lt;p&gt;See
&lt;/p&gt;
&lt;h2 id="left-sidebar"&gt;Left Sidebar&lt;/h2&gt;
&lt;p&gt;Links are automatically generated from the structure of your content directory. Simply add a folder to nest a page.&lt;/p&gt;
&lt;h3 id="extra-links"&gt;Extra Links&lt;/h3&gt;
&lt;p&gt;Additional links can be added under the &lt;code&gt;sidebar&lt;/code&gt; section of your &lt;code&gt;config/_default/menus.yaml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;menu&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;sidebar&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Need help?&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;separator&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;A page&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pageRef&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/page-filename-here&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;An external link ↗&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;https://hugoblox.com&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="right-sidebar"&gt;Right Sidebar&lt;/h2&gt;
&lt;p&gt;A table of contents is automatically generated from the headings your Markdown file.&lt;/p&gt;
&lt;p&gt;It can optionally be disabled by setting &lt;code&gt;toc: false&lt;/code&gt; in the front matter of a page:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;My Page&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;toc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nn"&gt;---&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Enhancing Pathological VLMs with Cross-scale Reasoning</title><link>https://chiphan1110.github.io/publications/conference-paper/</link><pubDate>Wed, 01 Jul 2026 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/publications/conference-paper/</guid><description/></item><item><title>PathScale-R1: Cross-scale Reasoning for Pathological Image Analysis</title><link>https://chiphan1110.github.io/publications/journal-article/</link><pubDate>Wed, 01 Jul 2026 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/publications/journal-article/</guid><description/></item><item><title>Never-smoker Under-representation in Training Data Reduces AI Performance for EGFR Mutation Prediction in Singapore Lung Adenocarcinoma Patients</title><link>https://chiphan1110.github.io/publications/precision-oncology/</link><pubDate>Thu, 01 Jan 2026 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/publications/precision-oncology/</guid><description>&lt;p&gt;This manuscript is listed in the CV as under review for &lt;strong&gt;npj Precision Oncology&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Notes on the Foundations of Reinforcement Learning and LLM Post-Training (Part 2)</title><link>https://chiphan1110.github.io/blog/rlvr-foundation-part-2/</link><pubDate>Tue, 02 Sep 2025 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/blog/rlvr-foundation-part-2/</guid><description>
&lt;details class="print:hidden xl:hidden" open&gt;
&lt;summary&gt;Table of Contents&lt;/summary&gt;
&lt;div class="text-sm"&gt;
&lt;nav id="TableOfContents"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#before-we-begin"&gt;Before We Begin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#1-language-generation-as-an-rl-problem"&gt;1. Language Generation as an RL Problem&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#problem-formulation"&gt;Problem Formulation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-optimization-objective"&gt;The Optimization Objective&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-learning-from-human-preferences"&gt;2. Learning from Human Preferences&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#why-learn-a-reward-function"&gt;Why Learn a Reward Function?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#preference-learning-step-by-step"&gt;Preference Learning, Step by Step&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-the-models-in-the-rlhf-pipeline"&gt;3. The Models in the RLHF Pipeline&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-sft-and-reward-model-training"&gt;4. SFT and Reward Model Training&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#supervised-fine-tuning-sft"&gt;Supervised Fine-Tuning (SFT)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#reward-model"&gt;Reward Model&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-ppo-training"&gt;5. PPO Training&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#actor-model"&gt;Actor Model&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#critic-model"&gt;Critic Model&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#reference-model-and-token-rewards"&gt;Reference Model and Token Rewards&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#practical-training-considerations"&gt;Practical Training Considerations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#open-challenges"&gt;Open Challenges&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-group-relative-policy-optimization-grpo"&gt;6. Group Relative Policy Optimization (GRPO)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#motivation"&gt;Motivation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#which-component-changes"&gt;Which Component Changes?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#advantage-function-estimation-in-grpo"&gt;Advantage Function Estimation in GRPO&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#a-learning-question-how-can-one-advantage-train-every-token"&gt;A Learning Question: How Can One Advantage Train Every Token?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-grpo-objective-and-loss"&gt;The GRPO Objective and Loss&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#actor-training"&gt;Actor Training&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-ppo-and-grpo-at-a-glance"&gt;7. PPO and GRPO at a Glance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#key-takeaways"&gt;Key Takeaways&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#acknowledgements"&gt;Acknowledgements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#references"&gt;References&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#rl-foundations"&gt;RL Foundations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#policy-gradient-papers"&gt;Policy Gradient Papers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#rlhf"&gt;RLHF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#ppo-and-grpo-explanations"&gt;PPO and GRPO Explanations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;
&lt;/div&gt;
&lt;/details&gt;
&lt;h2 id="before-we-begin"&gt;Before We Begin&lt;/h2&gt;
&lt;p&gt;
introduces policy gradients, value functions, actor–critic methods, and PPO. Here, I connect those ideas to language-model post-training: how a response becomes a trajectory, how preferences become rewards, and how PPO and GRPO update the model.&lt;/p&gt;
&lt;p&gt;The reading path is &lt;strong&gt;language generation as RL → preference learning → SFT and reward models → PPO training → GRPO&lt;/strong&gt;. If the notation becomes unfamiliar, return to Part 1&amp;rsquo;s concepts and PPO sections.&lt;/p&gt;
&lt;h2 id="1-language-generation-as-an-rl-problem"&gt;1. Language Generation as an RL Problem&lt;/h2&gt;
&lt;h3 id="problem-formulation"&gt;Problem Formulation&lt;/h3&gt;
&lt;p&gt;Given a prompt, a language model generates a response one token at a time. This autoregressive process gives us a concrete mapping to the RL concepts from Part 1.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;RL concept&lt;/th&gt;
&lt;th&gt;Language-model interpretation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;State $s_t$&lt;/td&gt;
&lt;td&gt;The prompt and all tokens generated so far&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Action $a_t$&lt;/td&gt;
&lt;td&gt;The next token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy $\pi_\theta(a_t\mid s_t)$&lt;/td&gt;
&lt;td&gt;A probability distribution over the vocabulary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transition&lt;/td&gt;
&lt;td&gt;Append the selected token: $s_{t+1}=[s_t,a_t]$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reward $r_t$&lt;/td&gt;
&lt;td&gt;Feedback assigned after generating a token&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Value $V(s_t)$&lt;/td&gt;
&lt;td&gt;Expected future return from the current prefix&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The initial state is the prompt. For a VLM, the conditioning context can also include visual input. The state transition is deterministic once the next token has been selected, even though token sampling is stochastic.&lt;/p&gt;
&lt;h3 id="the-optimization-objective"&gt;The Optimization Objective&lt;/h3&gt;
&lt;p&gt;Let $x$ denote a prompt and $y$ a response. With a response-level reward $r(x,y)$, the objective is&lt;/p&gt;
$$
\max_\theta\;\mathbb{E}_{x\sim D,\,y\sim\pi_\theta(\cdot\mid x)}[r(x,y)].
$$&lt;p&gt;A KL penalty discourages the policy from drifting too far from a reference model. A regularized objective can be written as&lt;/p&gt;
$$
\max_\theta\;\mathbb{E}_{x\sim D}\left[
\mathbb{E}_{y\sim\pi_\theta(\cdot\mid x)}[r(x,y)]
-\beta D_{\mathrm{KL}}\left(\pi_\theta(\cdot\mid x)\,\|\,\pi_{\mathrm{ref}}(\cdot\mid x)\right)
\right].
$$&lt;p&gt;Equivalently, using the sampled log-probability ratio inside the expectation:&lt;/p&gt;
$$
\max_\theta\;\mathbb{E}_{x\sim D,\,y\sim\pi_\theta(\cdot\mid x)}\left[
r(x,y)-\beta\log\frac{\pi_\theta(y\mid x)}{\pi_{\mathrm{ref}}(y\mid x)}
\right].
$$&lt;p&gt;Here $\beta$ controls the strength of the penalty. This fixed reference policy has a different role from the old rollout policy used in PPO&amp;rsquo;s clipping ratio.&lt;/p&gt;
&lt;h2 id="2-learning-from-human-preferences"&gt;2. Learning from Human Preferences&lt;/h2&gt;
&lt;h3 id="why-learn-a-reward-function"&gt;Why Learn a Reward Function?&lt;/h3&gt;
&lt;p&gt;For tasks such as conversation or summarization, it is difficult to write a reward function that captures what people want. Comparing examples can be easier than assigning an absolute numerical score. RLHF uses those comparisons to learn a reward model, then optimizes a policy against that model.&lt;/p&gt;
&lt;h3 id="preference-learning-step-by-step"&gt;Preference Learning, Step by Step&lt;/h3&gt;
&lt;h4 id="1-collect-preference-data"&gt;1. Collect Preference Data&lt;/h4&gt;
&lt;p&gt;Annotators compare two segments of agent behavior, $\sigma^1$ and $\sigma^2$. A segment is a sequence of state–action pairs:&lt;/p&gt;
$$
\sigma^i=((s_0^i,a_0^i),\ldots,(s_{k-1}^i,a_{k-1}^i)).
$$&lt;p&gt;Use a target $p$ of $1$ when the first segment is preferred, $0$ when the second is preferred, and $0.5$ for a tie. This notation makes the label convention explicit.&lt;/p&gt;
&lt;h4 id="2-fit-a-reward-model"&gt;2. Fit a Reward Model&lt;/h4&gt;
&lt;p&gt;The model assigns a score to each segment by summing predicted per-step rewards:&lt;/p&gt;
$$
S_{\hat r}(\sigma)=\sum_t\hat r(s_t,a_t).
$$&lt;p&gt;Under a Bradley–Terry preference model, the probability that the first segment is preferred is&lt;/p&gt;
$$
\hat P(\sigma^1\succ\sigma^2)
=\frac{\exp S_{\hat r}(\sigma^1)}
{\exp S_{\hat r}(\sigma^1)+\exp S_{\hat r}(\sigma^2)}.
$$&lt;p&gt;This is a softmax over two scores: a larger predicted cumulative reward gives a higher preference probability. The language-model example later uses a scalar score for a whole response rather than a sum of learned per-token rewards.&lt;/p&gt;
&lt;p&gt;Let $\hat p=\hat P(\sigma^1\succ\sigma^2)$. Fit the predictions to the preference labels with cross-entropy:&lt;/p&gt;
$$
\mathcal{L}(\hat r)
=-\mathbb{E}_{(\sigma^1,\sigma^2,p)\sim D}
\left[p\log\hat p+(1-p)\log(1-\hat p)\right].
$$&lt;p&gt;For strictly ordered pairs, denote the preferred segment by $\sigma^+$ and the rejected segment by $\sigma^-$. The loss becomes&lt;/p&gt;
$$
\begin{aligned}
\mathcal{L}(\hat r)
&amp;=-\mathbb{E}\left[\log\hat P(\sigma^+\succ\sigma^-)\right]\\
&amp;=-\mathbb{E}\left[
\log\frac{\exp S_{\hat r}(\sigma^+)}
{\exp S_{\hat r}(\sigma^+)+\exp S_{\hat r}(\sigma^-)}
\right].
\end{aligned}
$$&lt;h4 id="3-optimize-the-policy"&gt;3. Optimize the Policy&lt;/h4&gt;
&lt;p&gt;Once the reward function is learned, an RL algorithm uses it as feedback:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The policy generates a response or trajectory.&lt;/li&gt;
&lt;li&gt;The reward model assigns a score.&lt;/li&gt;
&lt;li&gt;A policy-optimization algorithm such as PPO uses the score to update the policy.&lt;/li&gt;
&lt;li&gt;The updated policy generates new samples for the next round.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The
alternates preference collection, reward learning, and policy learning. Collecting new feedback can help cover behavior that was absent from earlier data, but human annotation is expensive. Automated preference labeling, including RLAIF, is another approach to obtaining feedback.&lt;/p&gt;
&lt;p&gt;The learned reward remains a proxy for the preferences represented in its training data. Improving that score and improving behavior should be evaluated separately.&lt;/p&gt;
&lt;h2 id="3-the-models-in-the-rlhf-pipeline"&gt;3. The Models in the RLHF Pipeline&lt;/h2&gt;
&lt;p&gt;The PPO-based pipeline discussed here has four roles: &lt;strong&gt;actor, critic, reward model, and reference model&lt;/strong&gt;. The SFT checkpoint supplies an initial policy and commonly initializes other components.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Role during RL&lt;/th&gt;
&lt;th&gt;Updated during this stage?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Actor / policy&lt;/td&gt;
&lt;td&gt;Generates responses and learns from rewards&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Critic / value model&lt;/td&gt;
&lt;td&gt;Predicts returns for response prefixes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reward model&lt;/td&gt;
&lt;td&gt;Scores completed responses&lt;/td&gt;
&lt;td&gt;Frozen in this setup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reference model&lt;/td&gt;
&lt;td&gt;Supplies a fixed distribution for the KL penalty&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The SFT model is a pretrained language model further trained on demonstrations. It provides a useful starting point before preference-based RL.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-1-overview-of-the-rlhf-training-pipeline"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Overview of the RLHF training pipeline"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/01_overview.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 1. Overview of the RLHF training pipeline.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The overall sequence is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Prepare the SFT checkpoint&lt;/strong&gt; using prompt–response demonstrations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Train the reward model&lt;/strong&gt; using preferred and rejected response pairs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Generate rollouts&lt;/strong&gt; with the actor and score the sampled tokens under the actor and reference policies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build the reward signal&lt;/strong&gt; from response scores and the KL penalty.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Estimate advantages and return targets&lt;/strong&gt; using rewards and critic predictions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Update actor and critic&lt;/strong&gt; with their respective losses, then collect another rollout batch.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The
is a primary reference for this style of language-model training pipeline.&lt;/p&gt;
&lt;h2 id="4-sft-and-reward-model-training"&gt;4. SFT and Reward Model Training&lt;/h2&gt;
&lt;h3 id="supervised-fine-tuning-sft"&gt;Supervised Fine-Tuning (SFT)&lt;/h3&gt;
&lt;p&gt;SFT trains the pretrained model on demonstration responses. The resulting checkpoint initializes the actor and the frozen reference policy in this setup.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-2-supervised-fine-tuning-before-rl-training"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Supervised fine-tuning before RL training"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/02_SFT.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 2. Supervised fine-tuning before RL training.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="reward-model"&gt;Reward Model&lt;/h3&gt;
&lt;p&gt;Train the reward model after SFT and before the PPO stage. Its input is a prompt–response pair, and its output is a scalar preference score.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-3-training-the-reward-model-from-preference-pairs"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Training the reward model from preference pairs"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/03_Reward_training.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 3. Training the reward model from preference pairs.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h4 id="initialization"&gt;Initialization&lt;/h4&gt;
&lt;p&gt;Initialize the reward model from the SFT checkpoint.
Add a scalar &lt;strong&gt;reward head&lt;/strong&gt;, usually a linear projection, to produce the response score:&lt;/p&gt;
$$
r (x,y) = \text{Linear}(h_\text{final token})
$$&lt;h4 id="preference-loss"&gt;Preference Loss&lt;/h4&gt;
&lt;p&gt;Each preference example contains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;$x$: the prompt&lt;/li&gt;
&lt;li&gt;$y_w$: the &lt;strong&gt;chosen (preferred)&lt;/strong&gt; response&lt;/li&gt;
&lt;li&gt;$y_l$: the &lt;strong&gt;rejected (less preferred)&lt;/strong&gt; response
Train the model to assign a higher score to the preferred response. The pairwise loss is:&lt;/li&gt;
&lt;/ul&gt;
$$
\mathcal{L}_\text{RM}=-\mathbb{E}_{(x,y_w,y_l)\sim D}[\log\left(\sigma\left(r(x,y_w)-r(x,y_l)\right)\right)]
$$&lt;p&gt;where $\sigma(x) = \frac{1}{1 + \exp(-x)}$ is a sigmoid function, hence the loss can be written as:&lt;/p&gt;
$$
\mathcal{L}_\text{RM}=-\mathbb{E}_{(x,y_w,y_l)\sim D}\left[\log\left(\frac{\exp(r(x,y_w))}{\exp(r(x,y_w))+\exp(r(x,y_l))}\right)\right]
$$&lt;p&gt;The following PyTorch class computes the pairwise loss, with an optional margin:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torch.nn&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;nn&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torch.nn.functional&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;F&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;PairWiseLoss&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Module&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;Pairwise preference loss for a reward model.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;chosen_reward&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reject_reward&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;margin&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;reward_difference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chosen_reward&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;reject_reward&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;margin&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;reward_difference&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;reward_difference&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;margin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;logsigmoid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reward_difference&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id="interpreting-the-reward-output"&gt;Interpreting the Reward Output&lt;/h4&gt;
&lt;p&gt;In this setup, the reward model assigns a &lt;strong&gt;single scalar score $r(x,y)$ to a completed response&lt;/strong&gt;. A common implementation applies a scalar head to the final token&amp;rsquo;s hidden representation. That representation depends on the preceding context, so the score can summarize the response rather than only its last token.&lt;/p&gt;
&lt;p&gt;Other aggregation choices include sums, means, weighted sums, or attention-based pooling. The aggregation is an implementation choice; it should match how the reward model was trained.&lt;/p&gt;
&lt;h2 id="5-ppo-training"&gt;5. PPO Training&lt;/h2&gt;
&lt;h3 id="actor-model"&gt;Actor Model&lt;/h3&gt;
&lt;p&gt;The actor generates responses token by token and is the model being optimized during RL. It begins from the SFT checkpoint; the reward model is already trained and frozen.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-4-updating-the-actor-with-ppo"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Updating the actor with PPO"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/04_Actor_training.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 4. Updating the actor with PPO.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;For each rollout batch:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Generate responses.&lt;/strong&gt; Sample token IDs from the actor&amp;rsquo;s output distribution and save their rollout log-probabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Score the responses.&lt;/strong&gt; The reward model supplies response scores; the reference model supplies token log-probabilities for the KL penalty.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Estimate values and advantages.&lt;/strong&gt; The critic predicts values for prefixes, which combine with the rewards to produce GAE estimates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimize the actor.&lt;/strong&gt; Recompute the current policy&amp;rsquo;s log-probabilities and compare them with the saved rollout probabilities.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let $\pi_{\mathrm{old}}$ be the rollout policy and $\rho_t(\theta)=\pi_\theta(a_t\mid s_t)/\pi_{\mathrm{old}}(a_t\mid s_t)$. The per-token actor loss is&lt;/p&gt;
$$
\mathcal{L}_{\mathrm{actor},t}
=-\min\left(
\rho_t(\theta)\hat A_t,
\operatorname{clip}(\rho_t(\theta),1-\epsilon,1+\epsilon)\hat A_t
\right).
$$&lt;p&gt;The negative sign turns the objective from Part 1 into a loss to minimize. In practice, aggregate over valid response tokens and the batch, masking padding and prompt tokens as appropriate. Treat advantages and old log-probabilities as fixed targets during each update.&lt;/p&gt;
&lt;p&gt;An entropy bonus can also be included. It is separate from the clipping term and from the reference-policy KL penalty.&lt;/p&gt;
&lt;h3 id="critic-model"&gt;Critic Model&lt;/h3&gt;
&lt;p&gt;The critic predicts expected future return from each prefix. It learns alongside the actor, but uses a value-prediction loss.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-5-training-the-critic-to-estimate-returns"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Training the critic to estimate returns"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/05_Critic_training.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 5. Training the critic to estimate returns.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Initialization.&lt;/strong&gt; Possible designs include an SFT-based model with a value head, initialization from the trained reward model, or a value head sharing a backbone with the actor. Separate actor and critic networks are one design choice, not a requirement of every PPO implementation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TD errors and GAE.&lt;/strong&gt; For rollout values $V_{w_{\mathrm{old}}}$, define&lt;/p&gt;
$$
\delta_t=r_t+\gamma(1-d_t)V_{w_{\mathrm{old}}}(s_{t+1})
-V_{w_{\mathrm{old}}}(s_t).
$$&lt;p&gt;Here $d_t$ indicates termination. The discount factor is $\gamma$; $\lambda$ instead controls the weighting of TD errors in GAE. For a rollout ending at $T$,&lt;/p&gt;
$$
\hat A_t^{\mathrm{GAE}}=\sum_{l=0}^{T-t}(\gamma\lambda)^l\delta_{t+l},
\qquad
\hat V_t=\hat A_t^{\mathrm{GAE}}+V_{w_{\mathrm{old}}}(s_t).
$$&lt;p&gt;Stop the sum at episode boundaries and handle bootstrapping at nonterminal rollout cutoffs. The critic minimizes&lt;/p&gt;
$$
\mathcal{L}_{\mathrm{critic},t}
=\frac12\left(V_w(s_t)-\operatorname{stopgrad}(\hat V_t)\right)^2.
$$&lt;p&gt;Using $\hat V_t$ for the return target avoids confusing it with the immediate reward $r_t$.&lt;/p&gt;
&lt;h3 id="reference-model-and-token-rewards"&gt;Reference Model and Token Rewards&lt;/h3&gt;
&lt;p&gt;The reference policy is usually a frozen copy of the SFT policy. It supplies a fixed point of comparison while the actor changes. By contrast, the &lt;strong&gt;old policy&lt;/strong&gt; is refreshed when collecting new rollouts and supplies PPO&amp;rsquo;s probability-ratio denominator.&lt;/p&gt;
&lt;p&gt;For a sampled token, the log-probability ratio is&lt;/p&gt;
$$
k_t=\log\pi_\theta(a_t\mid s_t)-\log\pi_{\mathrm{ref}}(a_t\mid s_t).
$$&lt;p&gt;Its expectation under $a_t\sim\pi_\theta(\cdot\mid s_t)$ is the forward KL divergence. A single sampled value is not the full KL divergence and can be negative.&lt;/p&gt;
&lt;p&gt;For a response ending at token $T$, one common reward decomposition is&lt;/p&gt;
$$
r_t=
\begin{cases}
-\beta k_t, &amp; t\lt T,\\
r(x,y)-\beta k_t, &amp; t=T.
\end{cases}
$$&lt;p&gt;Every token receives the KL shaping term, while the final token also receives the reward model&amp;rsquo;s response score. Equivalently,&lt;/p&gt;
$$
r_t=\mathbb{I}[t=T]\,r(x,y)-\beta k_t.
$$&lt;p&gt;The terminal reward is propagated to earlier tokens through the return and advantage estimates. During rollout processing, compute these quantities using the rollout policy and hold the resulting targets fixed for PPO updates.&lt;/p&gt;
&lt;h3 id="practical-training-considerations"&gt;Practical Training Considerations&lt;/h3&gt;
&lt;p&gt;These are useful implementation topics to revisit once the main pipeline is clear:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pretraining loss and alignment tax:&lt;/strong&gt; monitor whether preference optimization reduces performance on other tasks, and consider how auxiliary training objectives affect that trade-off.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;KL reward scaling:&lt;/strong&gt; choose and monitor the penalty coefficient $\beta$.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reward normalization:&lt;/strong&gt; make the treatment of reward scale explicit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Advantage normalization:&lt;/strong&gt; distinguish this from normalizing the raw reward.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Learning rate:&lt;/strong&gt; tune actor and critic optimization with their different objectives in mind.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;figure id="figure-figure-6-pretraining-loss-and-the-alignment-tax-source-paperhttpsaclanthologyorg2024emnlp-main35pdf"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Pretraining loss and the alignment tax"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/06_Alignment_Tax_hu_4e8bafa8914575cb.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/06_Alignment_Tax_hu_28da704b77fc5789.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/06_Alignment_Tax_hu_63f29294d19fef86.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/06_Alignment_Tax_hu_4e8bafa8914575cb.webp"
width="760"
height="288"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 6. Pretraining loss and the alignment tax.
.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="open-challenges"&gt;Open Challenges&lt;/h3&gt;
&lt;p&gt;Two questions remain central: does the policy exploit weaknesses in the reward model (&lt;strong&gt;reward hacking&lt;/strong&gt;), and do improvements transfer beyond the training prompts (&lt;strong&gt;generalization&lt;/strong&gt;)? A higher training reward alone does not answer either question.&lt;/p&gt;
&lt;h2 id="6-group-relative-policy-optimization-grpo"&gt;6. Group Relative Policy Optimization (GRPO)&lt;/h2&gt;
&lt;h3 id="motivation"&gt;Motivation&lt;/h3&gt;
&lt;p&gt;The PPO pipeline above requires an actor, a critic, a reward signal, and a reference policy. Running these components can be expensive, and the learned critic adds another estimate to fit and maintain.&lt;/p&gt;
&lt;p&gt;
introduces GRPO as a way to obtain an advantage signal from a group of responses to the same prompt, without a separate learned critic.&lt;/p&gt;
&lt;h3 id="which-component-changes"&gt;Which Component Changes?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Actor:&lt;/strong&gt; still generates responses and receives policy updates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reward signal:&lt;/strong&gt; still evaluates responses. Depending on the task, it can come from a model or a verifiable rule.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reference policy:&lt;/strong&gt; remains in the original KL-regularized GRPO objective.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Critic:&lt;/strong&gt; replaced by a baseline derived from rewards within the sampled group.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The key change is how the advantage is estimated. It does not remove the need to evaluate the generated responses.&lt;/p&gt;
&lt;h3 id="advantage-function-estimation-in-grpo"&gt;Advantage Function Estimation in GRPO&lt;/h3&gt;
&lt;p&gt;GRPO samples a group of responses $\{o_1,\ldots,o_G\}$ to the same prompt using the rollout policy $\pi_{\mathrm{old}}$.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-7-comparison-of-ppo-and-grpo-source-deepseekmathhttpsarxivorgabs240203300"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Comparison of PPO and GRPO"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/07_PPO_GRPO_hu_28bb5e96cc957383.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/07_PPO_GRPO_hu_475788dea51f7123.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/07_PPO_GRPO_hu_bc59c054f5c0b19c.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/07_PPO_GRPO_hu_28bb5e96cc957383.webp"
width="760"
height="328"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 7. Comparison of PPO and GRPO. Source:
.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;For outcome-level rewards:&lt;/p&gt;
&lt;p&gt;Scoring the group produces rewards $\mathbf r=(r_1,\ldots,r_G)$. Normalize them within the group:&lt;/p&gt;
$$
\hat{A}_{i,t}=\hat{r}_i=\frac{r_i-\mathrm{mean}(\mathbf{r})}{\mathrm{std}(\mathbf{r})}
$$&lt;p&gt;Each response receives an advantage based on how its reward compares with the group mean, scaled by the group standard deviation. In this outcome-reward formulation, every token in response $i$ shares that advantage. Implementations must also handle zero-variance groups, for example with a small denominator stabilizer.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-8-advantage-estimation-in-ppo-and-grpo"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Advantage estimation in PPO and GRPO"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/08_PPO_GRPO_Advantage_hu_2546f34ea6540eab.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/08_PPO_GRPO_Advantage_hu_b6f088b20f6f9d06.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/08_PPO_GRPO_Advantage_hu_c2417381d9c4144e.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/08_PPO_GRPO_Advantage_hu_2546f34ea6540eab.webp"
width="760"
height="538"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 8. Advantage estimation in PPO and GRPO.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The following worked example illustrates response-level rewards:&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-9-outcome-reward-example-comparing-responses-source-comfyaihttpscomfyaiapparticlellm-posttrainingoptimizing-ppo-based-algorithms"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Outcome reward example: comparing responses"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/09_ORM_hu_1f115e991fd0f27a.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/09_ORM_hu_cc46f1740c0e2962.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/09_ORM_hu_83c90dced79e1ca5.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/09_ORM_hu_1f115e991fd0f27a.webp"
width="760"
height="252"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 9. Outcome reward example: comparing responses. Source:
.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-10-outcome-reward-example-continued-source-comfyaihttpscomfyaiapparticlellm-posttrainingoptimizing-ppo-based-algorithms"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="Outcome reward example, continued"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/10_ORM_p2_hu_b3b2ff3ba114bb31.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/10_ORM_p2_hu_73e6bf18001f43d.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation-part-2/10_ORM_p2_hu_1701ce060140f66c.webp 659w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/10_ORM_p2_hu_b3b2ff3ba114bb31.webp"
width="659"
height="760"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 10. Outcome reward example, continued. Source:
.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h3 id="a-learning-question-how-can-one-advantage-train-every-token"&gt;A Learning Question: How Can One Advantage Train Every Token?&lt;/h3&gt;
&lt;p&gt;I initially found this confusing: if every token in a response receives the same advantage, how can the model learn which tokens to generate?&lt;/p&gt;
&lt;p&gt;In the unclipped score-function term, the shared weight multiplies a different log-probability gradient at every position:&lt;/p&gt;
$$
\hat A_i\nabla_\theta\log\pi_\theta(o_{i,t}\mid q,o_{i,\lt t}).
$$&lt;p&gt;The weight is response-level, but the gradient depends on the token and its prefix. Different responses receive different weights, so their token sequences contribute differently to the update. Clipping, KL regularization, and shared model parameters also affect the final parameter change.&lt;/p&gt;
&lt;p&gt;This provides a learning signal without identifying exactly which token caused the final reward. I find it helpful to distinguish &lt;strong&gt;learning from a response-level outcome&lt;/strong&gt; from &lt;strong&gt;having precise token-level credit assignment&lt;/strong&gt;. They are different claims.&lt;/p&gt;
&lt;h3 id="the-grpo-objective-and-loss"&gt;The GRPO Objective and Loss&lt;/h3&gt;
&lt;p&gt;The following loss retains the clipped surrogate, uses group-relative advantages, and adds an explicit KL penalty. It is minimized. First, define&lt;/p&gt;
$$
\rho_{i,t}(\theta)
=\frac{\pi_\theta(o_{i,t}\mid q,o_{i,\lt t})}
{\pi_{\mathrm{old}}(o_{i,t}\mid q,o_{i,\lt t})}.
$$&lt;p&gt;The per-token loss is&lt;/p&gt;
$$
\begin{aligned}
\ell_{i,t}(\theta)
={}&amp;-\min\left(
\rho_{i,t}(\theta)\hat A_{i,t},
\operatorname{clip}(\rho_{i,t}(\theta),1-\epsilon,1+\epsilon)\hat A_{i,t}
\right)\\
&amp;+\beta k_{i,t}.
\end{aligned}
$$&lt;p&gt;With prompts $q\sim D$ and response groups sampled from $\pi_{\mathrm{old}}$, average over tokens and responses:&lt;/p&gt;
$$
\mathcal{L}_{\mathrm{GRPO}}(\theta)
=\mathbb{E}_{q,\{o_i\}_{i=1}^G}\left[
\frac1G\sum_{i=1}^G\frac1{|o_i|}\sum_{t=1}^{|o_i|}\ell_{i,t}(\theta)
\right].
$$&lt;p&gt;Here $G$ is the group size, $|o_i|$ is the response length, and $k_{i,t}$ is the KL estimator defined below. This describes the original formulation discussed here; alternative implementations can change the normalization or regularization.&lt;/p&gt;
&lt;p&gt;This uses a group-normalized advantage in place of the critic-based estimate and an explicit KL term.&lt;/p&gt;
&lt;p&gt;For the sampled token, define $u_{i,t}=\pi_{\mathrm{ref}}(o_{i,t}\mid q,o_{i,\lt t})/\pi_\theta(o_{i,t}\mid q,o_{i,\lt t})$. The KL estimator in this objective is&lt;/p&gt;
$$
k_{i,t}=u_{i,t}-\log u_{i,t}-1.
$$&lt;p&gt;This expression is nonnegative. Under current-policy sampling and the usual support assumptions, its expectation is $D_{\mathrm{KL}}(\pi_\theta\|\pi_{\mathrm{ref}})$. Rollouts are collected with $\pi_{\mathrm{old}}$, so the sampling distribution matters when describing an estimator as unbiased.&lt;/p&gt;
&lt;p&gt;The objective shown here has no separate entropy bonus. Group sampling supplies multiple candidate responses, but should not be treated as mathematically equivalent to an entropy bonus.&lt;/p&gt;
&lt;h3 id="actor-training"&gt;Actor Training&lt;/h3&gt;
&lt;p&gt;These diagrams connect the GRPO actor update with the overall rollout and optimization loop:&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-11-updating-the-actor-with-grpo"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Updating the actor with GRPO"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/11_Actor_GRPO.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 11. Updating the actor with GRPO.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-12-overview-of-the-grpo-training-pipeline"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img alt="Overview of the GRPO training pipeline"
src="https://chiphan1110.github.io/blog/rlvr-foundation-part-2/12_GRPO_overview.svg"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 12. Overview of the GRPO training pipeline.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;h2 id="7-ppo-and-grpo-at-a-glance"&gt;7. PPO and GRPO at a Glance&lt;/h2&gt;
&lt;p&gt;This comparison refers to the PPO-based RLHF pipeline and the outcome-reward GRPO formulation discussed above.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;PPO pipeline&lt;/th&gt;
&lt;th&gt;GRPO formulation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Advantage estimate&lt;/td&gt;
&lt;td&gt;Critic-based, commonly using GAE&lt;/td&gt;
&lt;td&gt;Relative rewards within a prompt&amp;rsquo;s response group&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Learned critic&lt;/td&gt;
&lt;td&gt;Used here&lt;/td&gt;
&lt;td&gt;Not required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reward signal&lt;/td&gt;
&lt;td&gt;Learned or otherwise specified&lt;/td&gt;
&lt;td&gt;Learned or verifiable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy update&lt;/td&gt;
&lt;td&gt;Clipped surrogate&lt;/td&gt;
&lt;td&gt;Clipped surrogate with group-relative advantages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reference regularization&lt;/td&gt;
&lt;td&gt;KL shaping in the reward here&lt;/td&gt;
&lt;td&gt;Explicit KL term in the objective shown&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="key-takeaways"&gt;Key Takeaways&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A prompt and response can be viewed as an RL trajectory.&lt;/li&gt;
&lt;li&gt;Preference learning provides a reward signal; policy optimization uses it.&lt;/li&gt;
&lt;li&gt;In PPO-based RLHF, the actor, critic, reward model, and reference policy have distinct roles.&lt;/li&gt;
&lt;li&gt;The rollout policy and the fixed reference policy are different reference points.&lt;/li&gt;
&lt;li&gt;GRPO removes the learned critic by comparing rewards within a response group.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Return to
for the underlying policy-gradient and PPO derivations.&lt;/p&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;These notes would not have been possible without the many excellent books, lecture notes, blog posts, papers, and open-source resources created by the machine learning community. I am deeply grateful to all of the authors and educators whose work helped me understand reinforcement learning and LLM post-training. Many of the explanations and intuitions presented here were inspired by or built upon these resources, although any mistakes, misunderstandings, or inaccuracies are entirely my own.&lt;/p&gt;
&lt;p&gt;If you are interested in learning more, I highly encourage you to explore the references below. They provide much deeper and more rigorous treatments than these personal notes and have been invaluable throughout my learning journey.&lt;/p&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;h3 id="rl-foundations"&gt;RL Foundations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="policy-gradient-papers"&gt;Policy Gradient Papers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="rlhf"&gt;RLHF&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="ppo-and-grpo-explanations"&gt;PPO and GRPO Explanations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Notes on the Foundations of Reinforcement Learning and LLM Post-Training (Part 1)</title><link>https://chiphan1110.github.io/blog/rlvr-foundation/</link><pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/blog/rlvr-foundation/</guid><description>
&lt;details class="print:hidden xl:hidden" open&gt;
&lt;summary&gt;Table of Contents&lt;/summary&gt;
&lt;div class="text-sm"&gt;
&lt;nav id="TableOfContents"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#a-few-words-before-we-begin"&gt;A Few Words Before We Begin&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#how-to-read-these-notes"&gt;How to Read These Notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#1-rl-concepts-and-notation"&gt;1. RL Concepts and Notation&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#what-problem-does-rl-address"&gt;What Problem Does RL Address?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-agentenvironment-loop"&gt;The Agent–Environment Loop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#supervised-learning-vs-reinforcement-learning"&gt;Supervised Learning vs. Reinforcement Learning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#key-concepts-and-notation"&gt;Key Concepts and Notation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#rl-algorithm-categories"&gt;RL Algorithm Categories&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#2-policy-gradients"&gt;2. Policy Gradients&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#3-the-policy-gradient-theorem"&gt;3. The Policy Gradient Theorem&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#from-return-to-a-computable-gradient"&gt;From Return to a Computable Gradient&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#reward-to-go-and-action-values"&gt;Reward-to-Go and Action Values&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#why-variance-matters"&gt;Why Variance Matters&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#4-reinforce-and-baselines"&gt;4. REINFORCE and Baselines&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#intuition"&gt;Intuition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#algorithm"&gt;Algorithm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#choosing-the-weight-on-the-policy-gradient"&gt;Choosing the Weight on the Policy Gradient&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#5-actorcritic-methods"&gt;5. Actor–Critic Methods&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#motivation-and-intuition"&gt;Motivation and Intuition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#from-the-bellman-equation-to-a-td-error"&gt;From the Bellman Equation to a TD Error&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#updating-the-actor-and-critic"&gt;Updating the Actor and Critic&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#algorithm-and-implementation-notes"&gt;Algorithm and Implementation Notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#6-trust-region-policy-optimization-trpo"&gt;6. Trust Region Policy Optimization (TRPO)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#why-limit-the-policy-update"&gt;Why Limit the Policy Update?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-surrogate-objective-and-constraint"&gt;The Surrogate Objective and Constraint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#why-importance-sampling"&gt;Why Importance Sampling?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#7-proximal-policy-optimization-ppo"&gt;7. Proximal Policy Optimization (PPO)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#the-clipped-surrogate-objective"&gt;The Clipped Surrogate Objective&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#generalized-advantage-estimation-gae"&gt;Generalized Advantage Estimation (GAE)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#entropy-bonus"&gt;Entropy Bonus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#training-the-value-function"&gt;Training the Value Function&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#the-combined-ppo-objective"&gt;The Combined PPO Objective&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="#key-takeaways"&gt;Key Takeaways&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#acknowledgements"&gt;Acknowledgements&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#references"&gt;References&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#rl-foundations"&gt;RL Foundations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#policy-gradient-papers"&gt;Policy Gradient Papers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#rlhf"&gt;RLHF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#ppo-and-grpo-explanations"&gt;PPO and GRPO Explanations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;
&lt;/div&gt;
&lt;/details&gt;
&lt;h2 id="a-few-words-before-we-begin"&gt;A Few Words Before We Begin&lt;/h2&gt;
&lt;p&gt;Reinforcement learning (RL) has recently emerged as one of the key techniques behind the post-training of large language models (LLMs) and vision-language models (VLMs). As I began reading more about methods such as PPO, RLHF, and GRPO, I realized that I often understood each idea separately but still struggled to see how they were connected. Some of the mathematical details were also quite difficult for me at first, and I found myself returning to the same concepts many times before they started to make sense.&lt;/p&gt;
&lt;p&gt;I began writing these notes simply to organize what I was learning in my own words. They start from the basic ideas of reinforcement learning and gradually move toward their use in modern LLM post-training. I am sharing them here in the hope that they may be useful to someone else who is also trying to make sense of these concepts.&lt;/p&gt;
&lt;p&gt;These are personal learning notes, so they may still contain mistakes, unclear explanations, or missing details. I am still learning as well :) If you notice anything that is incorrect or have suggestions for improving these notes, I would genuinely appreciate hearing from you.&lt;/p&gt;
&lt;h3 id="how-to-read-these-notes"&gt;How to Read These Notes&lt;/h3&gt;
&lt;p&gt;This post follows the path from basic RL concepts to PPO: &lt;strong&gt;concepts → policy gradients → REINFORCE → actor–critic → TRPO → PPO&lt;/strong&gt;. Familiarity with probability, derivatives, and neural networks will help with the equations. You can read the intuition first and return to the derivations later.&lt;/p&gt;
&lt;p&gt;
connects these ideas to language-model training, RLHF, and GRPO.&lt;/p&gt;
&lt;h2 id="1-rl-concepts-and-notation"&gt;1. RL Concepts and Notation&lt;/h2&gt;
&lt;h3 id="what-problem-does-rl-address"&gt;What Problem Does RL Address?&lt;/h3&gt;
&lt;p&gt;In supervised learning, a model learns to predict outputs from examples. Reinforcement learning focuses on &lt;strong&gt;sequential decisions&lt;/strong&gt;: an action changes the environment and affects the rewards available later. The goal is to learn a policy that maximizes cumulative reward through interaction.&lt;/p&gt;
&lt;h3 id="the-agentenvironment-loop"&gt;The Agent–Environment Loop&lt;/h3&gt;
&lt;p&gt;
&lt;figure id="figure-figure-1-the-agentenvironment-interaction-loop"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="The agent–environment interaction loop"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828110932_hu_b130b4fa9abb1b39.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828110932_hu_a071e7d548042ba6.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828110932_hu_5cf03a784316f04b.webp 606w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828110932_hu_b130b4fa9abb1b39.webp"
width="606"
height="295"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 1. The agent–environment interaction loop.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;The agent interacts with an &lt;strong&gt;environment&lt;/strong&gt;. At step $t$, it is in state $s_t \in \mathcal{S}$ and selects an action $a_t \in \mathcal{A}$. The environment produces a reward $r_t$ and a new state, according to the transition distribution $P(s_{t+1}\mid s_t,a_t)$. This transition model may be known or unknown to the agent.&lt;/p&gt;
&lt;p&gt;One interaction cycle has three steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Observe:&lt;/strong&gt; receive the current state or observation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Act:&lt;/strong&gt; select an action according to the policy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Receive feedback:&lt;/strong&gt; observe the reward and the next state.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The cycle continues until the episode ends or the interaction is stopped. The agent&amp;rsquo;s objective is to improve its decisions based on the return across these interactions.&lt;/p&gt;
&lt;h3 id="supervised-learning-vs-reinforcement-learning"&gt;Supervised Learning vs. Reinforcement Learning&lt;/h3&gt;
&lt;p&gt;A supervised learning objective typically averages a prediction loss over a fixed dataset.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-2-the-supervised-learning-objective"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="The supervised learning objective"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113159_hu_9e318e86b94fa77a.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113159_hu_f04e6c215f748eec.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113159_hu_cecba32d69d12b3d.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113159_hu_9e318e86b94fa77a.webp"
width="760"
height="69"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 2. The supervised learning objective.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;p&gt;An RL objective averages return over trajectories generated by a policy. Changing the policy can also change which states and actions appear in the data.&lt;/p&gt;
&lt;p&gt;
&lt;figure id="figure-figure-3-the-reinforcement-learning-objective"&gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;
&lt;img alt="The reinforcement learning objective"
srcset="https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113218_hu_9e318e86b94fa77a.webp 320w, https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113218_hu_f04e6c215f748eec.webp 480w, https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113218_hu_cecba32d69d12b3d.webp 760w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
src="https://chiphan1110.github.io/blog/rlvr-foundation/Pasted%20image%2020250828113218_hu_9e318e86b94fa77a.webp"
width="760"
height="69"
loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;figcaption&gt;
Figure 3. The reinforcement learning objective.
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Supervised learning&lt;/th&gt;
&lt;th&gt;Reinforcement learning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Objective&lt;/td&gt;
&lt;td&gt;Minimize prediction loss&lt;/td&gt;
&lt;td&gt;Maximize expected return&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Feedback&lt;/td&gt;
&lt;td&gt;Targets or labels&lt;/td&gt;
&lt;td&gt;Rewards, which may be delayed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data&lt;/td&gt;
&lt;td&gt;Often a fixed dataset&lt;/td&gt;
&lt;td&gt;Often collected through interaction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decisions&lt;/td&gt;
&lt;td&gt;Predict an output&lt;/td&gt;
&lt;td&gt;Choose actions with future consequences&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;These describe common settings; offline RL, for example, also learns from a fixed dataset.&lt;/p&gt;
&lt;h3 id="key-concepts-and-notation"&gt;Key Concepts and Notation&lt;/h3&gt;
&lt;h4 id="states--observations"&gt;States &amp;amp; Observations&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;State ($s$):&lt;/strong&gt; Information sufficient to describe the environment for predicting the next transition and reward, given an action.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observation ($o$):&lt;/strong&gt; The information available to the agent, which may reveal all or only part of the state.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Fully Observed vs. Partially Observed&lt;/strong&gt;: If the agent sees the full state $s$, the environment is &lt;strong&gt;fully observed&lt;/strong&gt;. If it only sees an observation $o$, it&amp;rsquo;s &lt;strong&gt;partially observed&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Representation&lt;/strong&gt;: In deep RL, states and observations are typically represented as real-valued vectors, matrices, or tensors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minor Notes on Notation&lt;/strong&gt;: The symbol for state, $s$, is often used in formulas (e.g., $\pi(a|s)$) even when the agent practically only has access to an observation, $o$.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="action-spaces"&gt;Action Spaces&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Action Space ($\mathcal{A}$)&lt;/strong&gt;: The set of all valid actions an agent can take in an environment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discrete Action Space:&lt;/strong&gt; A finite or countable set of actions, such as the legal moves in chess or Go.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Continuous Action Space&lt;/strong&gt;: Actions are represented by real-valued vectors. For example, the amount of torque to apply to a robot&amp;rsquo;s motors.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="policy"&gt;Policy&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Policy ($\pi$)&lt;/strong&gt;: A rule the agent uses to decide which action to take. It&amp;rsquo;s the agent&amp;rsquo;s &amp;ldquo;brain.&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Parameterized Policy&lt;/strong&gt;: A policy whose behavior is defined by a function with adjustable parameters, $\theta$ (like the weights of a neural network). We can change the agent&amp;rsquo;s behavior by optimizing these parameters. &lt;strong&gt;Notation&lt;/strong&gt;: $\pi_{\theta}(a|s)$ or $\mu_{\theta}(s)$.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Deterministic Policy&lt;/strong&gt;: The policy maps a state directly to a single action. &lt;strong&gt;Notation&lt;/strong&gt;: $a_t = \mu_{\theta}(s_t)$&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stochastic Policy&lt;/strong&gt;: The policy outputs a probability distribution over actions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Notation&lt;/strong&gt;: $a_t \sim \pi_{\theta}(\cdot | s_t)$&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Categorical Policy&lt;/strong&gt;: Used for &lt;strong&gt;discrete&lt;/strong&gt; action spaces. It&amp;rsquo;s like a classifier that outputs the probability for each possible action.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Log-Likelihood&lt;/strong&gt;: $\log \pi_{\theta}(a|s) = \log \left[P_{\theta}(s)\right]_a$, where $P_{\theta}(s)$ is the vector of action probabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Diagonal Gaussian Policy&lt;/strong&gt;: Used for &lt;strong&gt;continuous&lt;/strong&gt; action spaces. The policy outputs a mean $\mu_{\theta}(s)$ and a standard deviation $\sigma_{\theta}(s)$ for a Gaussian distribution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sampling an Action&lt;/strong&gt;: $a = \mu_{\theta}(s) + \sigma_{\theta}(s) \odot z$, where $z \sim \mathcal{N}(0, I)$ is a vector of standard normal noise and $\odot$ is an element-wise product.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Log-Likelihood&lt;/strong&gt;: For a $k$-dimensional action $a$:&lt;/li&gt;
&lt;/ul&gt;
$$
\log\pi_\theta(a\mid s)
= -\frac{1}{2}\left[
\sum_{i=1}^{k}\left(\frac{(a_i-\mu_i)^2}{\sigma_i^2}+2\log\sigma_i\right)
+k\log(2\pi)\right].
$$&lt;h4 id="trajectories"&gt;Trajectories&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;A sequence of states and actions in the world:&lt;/li&gt;
&lt;/ul&gt;
$$
\tau = (s_0, a_0, s_1, a_1, ...)
$$&lt;ul&gt;
&lt;li&gt;The first state $s_0$ is sampled from the start-state distribution, sometimes denoted by $p_0$.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;State transitions&lt;/strong&gt; are determined by the environment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deterministic&lt;/strong&gt;: $s_{t+1} = f(s_t, a_t)$&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Stochastic&lt;/strong&gt;: $s_{t+1} \sim P(\cdot|s_t, a_t)$&lt;/li&gt;
&lt;li&gt;Trajectories are also frequently called &lt;strong&gt;episodes&lt;/strong&gt; or &lt;strong&gt;rollouts&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="rewards-and-return"&gt;Rewards and Return&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Reward ($r_t$)&lt;/strong&gt;: A scalar feedback signal indicating how well the agent is doing at a given step.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reward Function ($R$)&lt;/strong&gt;: Defines the reward, e.g., $r_t = R(s_t, a_t, s_{t+1})$.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Return ($R(\tau)$)&lt;/strong&gt;: The cumulative reward over a trajectory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Finite-Horizon Undiscounted Return&lt;/strong&gt;: The simple sum of rewards over a fixed number of $T$ steps.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Infinite-Horizon Discounted Return&lt;/strong&gt;: A sum of all future rewards, discounted by a factor $\gamma \in (0,1)$. This makes rewards in the distant future less valuable than immediate rewards and helps ensure the sum converges.&lt;/p&gt;
&lt;h4 id="rl-problem-formulation"&gt;RL Problem Formulation&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Objective: To find a policy $\pi$ that maximizes the &lt;strong&gt;expected return&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Expected Return ($J(\pi)$)&lt;/strong&gt;: The expected return when the agent follows policy $\pi$. This requires averaging over all possible trajectories that could be sampled under $\pi$.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimization Problem&lt;/strong&gt;: Find the optimal policy, $\pi^*$, that yields the maximum possible expected return.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="value-function"&gt;Value Function&lt;/h4&gt;
&lt;p&gt;Value functions estimate the expected return from a given state or state-action pair.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On-Policy Value Function ($V^{\pi}(s)$)&lt;/strong&gt;: The expected return if you start in state $s$ and follow policy $\pi$ forever. $V^{\pi}(s) = \underset{\tau \sim \pi}{\mathbb{E}} \left[ R(\tau) \mid s_0 = s \right]$&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On-Policy Action-Value Function ($Q^{\pi}(s,a)$)&lt;/strong&gt;: The expected return if you start in state $s$, take action $a$, and &lt;em&gt;then&lt;/em&gt; follow policy $\pi$ forever. $Q^{\pi}(s, a) = \underset{\tau \sim \pi}{\mathbb{E}} \left[ R(\tau) \mid s_0 = s, a_0 = a \right]$&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Optimal Value Function ($V^*(s)$)&lt;/strong&gt;: The maximum possible expected return from state $s$, achieved by following the optimal policy $V^{*}(s) = \max_{\pi} V^{\pi}(s)$&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Optimal Action-Value Function ($Q^*(s,a)$)&lt;/strong&gt;: The maximum expected return starting from $s$, taking action $a$, and &lt;em&gt;then&lt;/em&gt; following the optimal policy forever. $Q^{*}(s, a) = \max_{\pi} Q^{\pi}(s, a)$&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Optimal Action&lt;/strong&gt;: If you know $Q^*(s,a)$, you can find the optimal action by choosing the one with the highest value $a^{*}_s = \arg \max_{a}Q^{*}(s, a)$&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bellman Equations&lt;/strong&gt;: These are fundamental self-consistency equations. The value of a state is the immediate reward plus the discounted value of the next state.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;On-Policy&lt;/strong&gt;:&lt;/p&gt;
$$
V^{\pi}(s) = \underset{a \sim \pi, s'\sim P}{\mathbb{E}}[r(s,a) + \gamma V^{\pi}(s')]
$$$$
Q^{\pi}(s,a) = \underset{s'\sim P}{\mathbb{E}}[r(s,a) + \gamma \underset{a'\sim \pi}{\mathbb{E}}[Q^{\pi}(s',a')]]
$$&lt;p&gt;&lt;strong&gt;Optimal&lt;/strong&gt;:&lt;/p&gt;
$$
V^*(s) = \max_a \underset{s'\sim P}{\mathbb{E}}[r(s,a) + \gamma V^*(s')]
$$$$
Q^*(s,a) = \underset{s'\sim P}{\mathbb{E}}[r(s,a) + \gamma \max_{a'} Q^*(s',a')]
$$&lt;p&gt;&lt;strong&gt;Advantage Function ($A^{\pi}(s,a)$)&lt;/strong&gt;: Measures how much better taking action $a$ is compared to the average action from policy $\pi$ in state $s$. It is crucial for many policy gradient algorithms&lt;/p&gt;
$$
A^{\pi}(s, a) = Q^{\pi}(s, a) - V^{\pi}(s)
$$&lt;h4 id="notation-summary"&gt;Notation Summary&lt;/h4&gt;
&lt;p&gt;Throughout these notes, $r_t$ is the reward received after action $a_t$, and $G_t$ is the return from that step onward. Some references instead call that reward $r_{t+1}$; the indexing convention differs, not the underlying idea.&lt;/p&gt;
$$
G_t = \sum_{k=0}^{\infty}\gamma^k r_{t+k}
= r_t + \gamma G_{t+1}.
$$&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Symbol&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;$s_t$, $a_t$, $r_t$&lt;/td&gt;
&lt;td&gt;State, action, and immediate reward at step $t$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$\pi_\theta(a_t \mid s_t)$&lt;/td&gt;
&lt;td&gt;Policy parameterized by $\theta$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$G_t$&lt;/td&gt;
&lt;td&gt;Discounted return from step $t$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$V^\pi(s)$&lt;/td&gt;
&lt;td&gt;Expected return from state $s$ under policy $\pi$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$Q^\pi(s,a)$&lt;/td&gt;
&lt;td&gt;Expected return after action $a$ in state $s$, then following $\pi$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$A^\pi(s,a)$&lt;/td&gt;
&lt;td&gt;Advantage: $Q^\pi(s,a)-V^\pi(s)$&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$V^*(s)$, $Q^*(s,a)$&lt;/td&gt;
&lt;td&gt;Optimal state and action values&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$\gamma$&lt;/td&gt;
&lt;td&gt;Discount factor&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The value functions are related by&lt;/p&gt;
$$
V^\pi(s)=\mathbb{E}_{a\sim\pi(\cdot\mid s)}[Q^\pi(s,a)].
$$&lt;h3 id="rl-algorithm-categories"&gt;RL Algorithm Categories&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Based on how to update: &lt;strong&gt;On-policy vs. Off-policy Learning&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;On-policy&lt;/strong&gt;: The behavior policy (used to collect samples) and the target policy (used to update) are the &lt;strong&gt;same policy&lt;/strong&gt;. For example, in SARSA, the update uses a five-tuple sampled using an $\epsilon$-greedy policy: $(s,a,r,s',a')$&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Off-Policy:&lt;/strong&gt; The behavior policy (used to collect samples) and the target policy (used to update) are &lt;strong&gt;not the same&lt;/strong&gt;. For example, in Q-learning, the update uses four-tuples data $(s,a,r,s')$ and $a'$ is obtained via $a^*=\arg\max_{a\prime}Q(s\prime,a\prime)$, rather than sampled from the behavior policy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Based on the access to environment model: &lt;strong&gt;Model-based vs. Model-free&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An environment model describes how the environment responds to actions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Model-based&lt;/strong&gt;: Rely on the model of the environment; either the model is known or the algorithm learns it explicitly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model-free&lt;/strong&gt;: No dependency on the model during learning.&lt;/li&gt;
&lt;li&gt;Based on how the policy is learned:&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Value-based:&lt;/strong&gt; Learn a value function and derive a policy from it, rather than learning a separately parameterized policy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Policy-based:&lt;/strong&gt; Directly optimize a parameterized policy.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="2-policy-gradients"&gt;2. Policy Gradients&lt;/h2&gt;
&lt;p&gt;We want to optimize the parameters $\theta$ of a stochastic policy $\pi_\theta$. Write the objective as expected return over trajectories:&lt;/p&gt;
$$
J(\theta)=\mathbb{E}_{\tau\sim\pi_\theta}[R(\tau)].
$$&lt;p&gt;A trajectory begins at a state drawn from the initial-state distribution $p_0$. Equivalently, $J(\theta)=\mathbb{E}_{s_0\sim p_0}[V^{\pi_\theta}(s_0)]$. The initial-state distribution should not be confused with the distribution of states visited later under the policy.&lt;/p&gt;
&lt;p&gt;Using &lt;strong&gt;gradient ascent&lt;/strong&gt;, we update the policy in a direction that increases this objective:&lt;/p&gt;
$$
\theta\leftarrow\theta+\alpha\nabla_\theta J(\theta).
$$&lt;p&gt;The challenge is finding a gradient estimator from sampled interactions, even when the environment&amp;rsquo;s transition model is unknown.&lt;/p&gt;
&lt;h2 id="3-the-policy-gradient-theorem"&gt;3. The Policy Gradient Theorem&lt;/h2&gt;
&lt;h3 id="from-return-to-a-computable-gradient"&gt;From Return to a Computable Gradient&lt;/h3&gt;
&lt;p&gt;The policy affects both the actions chosen and the states visited. The policy gradient theorem lets us express the gradient without explicitly differentiating the state-visitation distribution.&lt;/p&gt;
&lt;p&gt;For the finite-horizon, &lt;strong&gt;undiscounted&lt;/strong&gt; case in this derivation, let $R(\tau)=\sum_{t=0}^{T-1}r_t$. The log-derivative identity is&lt;/p&gt;
$$
\nabla_\theta p_\theta(\tau)
=p_\theta(\tau)\nabla_\theta\log p_\theta(\tau).
$$&lt;p&gt;If the environment dynamics do not depend on $\theta$, only the policy terms contribute to the trajectory log-probability gradient:&lt;/p&gt;
$$
\nabla_\theta\log p_\theta(\tau)
=\sum_{t=0}^{T-1}\nabla_\theta\log\pi_\theta(a_t\mid s_t).
$$&lt;p&gt;Combining these identities gives&lt;/p&gt;
$$
\begin{aligned}
\nabla_\theta J(\theta)
&amp;=\nabla_\theta\int p_\theta(\tau)R(\tau)\,d\tau\\
&amp;=\mathbb{E}_{\tau\sim\pi_\theta}\left[
R(\tau)\sum_{t=0}^{T-1}\nabla_\theta\log\pi_\theta(a_t\mid s_t)
\right].
\end{aligned}
$$&lt;p&gt;The useful pattern is &lt;strong&gt;a return signal multiplied by the gradient of the action&amp;rsquo;s log-probability&lt;/strong&gt;. We can estimate the expectation with sampled trajectories. See
for the full argument.&lt;/p&gt;
&lt;h3 id="reward-to-go-and-action-values"&gt;Reward-to-Go and Action Values&lt;/h3&gt;
&lt;p&gt;Rewards received before an action do not help evaluate that action. We can instead use its reward-to-go, $G_t=\sum_{k=t}^{T-1}r_k$ in this undiscounted derivation:&lt;/p&gt;
$$
\nabla_\theta J(\theta)
=\mathbb{E}_{\tau\sim\pi_\theta}\left[
\sum_{t=0}^{T-1}G_t\nabla_\theta\log\pi_\theta(a_t\mid s_t)
\right].
$$&lt;p&gt;Conditioning on $(s_t,a_t)$ replaces $G_t$ with its expectation, $Q^\pi(s_t,a_t)$. This connects the trajectory estimator to the action-value form of the policy gradient. In a discounted objective, the corresponding time weights must also be included consistently.&lt;/p&gt;
&lt;h3 id="why-variance-matters"&gt;Why Variance Matters&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Bias&lt;/strong&gt; is systematic error: an unbiased estimator equals the target gradient on average. &lt;strong&gt;Variance&lt;/strong&gt; describes how much the estimate changes across sampled batches.&lt;/p&gt;
&lt;p&gt;Monte Carlo policy-gradient estimates can be unbiased while still having high variance. Different trajectories can produce very different returns, so a small batch may give a noisy update. The next sections introduce baselines and learned value functions to make that signal more useful.&lt;/p&gt;
&lt;h2 id="4-reinforce-and-baselines"&gt;4. REINFORCE and Baselines&lt;/h2&gt;
&lt;h3 id="intuition"&gt;Intuition&lt;/h3&gt;
&lt;p&gt;REINFORCE estimates the policy gradient using &lt;strong&gt;complete episodes&lt;/strong&gt;. For each action, it uses the observed return from that point onward as a Monte Carlo estimate of the action value.&lt;/p&gt;
$$
\mathbb{E}[G_t\mid s_t,a_t]=Q^\pi(s_t,a_t).
$$&lt;p&gt;This avoids learning a critic, but the return depends on all the later transitions and rewards. That is the source of its noisy updates.&lt;/p&gt;
&lt;h3 id="algorithm"&gt;Algorithm&lt;/h3&gt;
&lt;p&gt;Choose a learning rate $\alpha$, discount factor $\gamma$, and number of episodes. Initialize the policy parameters $\theta$.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Collect a complete episode.&lt;/strong&gt; Sample actions from the policy and store states, actions, and rewards.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compute returns backward.&lt;/strong&gt; Start with $G=0$ and apply $G\leftarrow r_t+\gamma G$ from the final step to the first.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accumulate the policy gradient.&lt;/strong&gt; Weight each action&amp;rsquo;s log-probability gradient by its return.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Update the policy.&lt;/strong&gt; Take a gradient-ascent step, then collect fresh data.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the discounted start-state objective, an episode estimate is&lt;/p&gt;
$$
\hat g=\sum_{t=0}^{T-1}\gamma^tG_t\nabla_\theta\log\pi_\theta(a_t\mid s_t),
\qquad
\theta\leftarrow\theta+\alpha\hat g.
$$&lt;p&gt;Setting $\gamma=1$ recovers the undiscounted estimator above. The following is &lt;strong&gt;pseudocode&lt;/strong&gt;, with environment and policy operations left abstract:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;initialize policy parameters theta
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;repeat for each episode:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; collect states, actions, rewards using the current policy
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; G = 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; returns = an array with one entry per action
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; for t from T - 1 down to 0:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; G = rewards[t] + gamma * G
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; returns[t] = G
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; gradient = 0
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; for t from 0 to T - 1:
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; gradient += gamma**t * returns[t] * grad_log_policy(actions[t], states[t])
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; theta += learning_rate * gradient
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="choosing-the-weight-on-the-policy-gradient"&gt;Choosing the Weight on the Policy Gradient&lt;/h3&gt;
&lt;p&gt;The general pattern is a score-function gradient multiplied by a weight $\psi_t$. Several choices connect REINFORCE to actor–critic methods:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Whole-trajectory return:&lt;/strong&gt; every action receives the same trajectory-level signal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reward-to-go $G_t$:&lt;/strong&gt; each action receives only the rewards from that step onward.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Baseline-adjusted return $G_t-b(s_t)$:&lt;/strong&gt; subtract a state-dependent baseline to reduce variance without changing the expected policy gradient.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Action value $Q^\pi(s_t,a_t)$:&lt;/strong&gt; use the expected return conditioned on the state and action.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Advantage $A^\pi(s_t,a_t)$:&lt;/strong&gt; subtract $V^\pi(s_t)$ from the action value to compare an action with the policy&amp;rsquo;s average behavior in that state.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TD-based advantage estimate:&lt;/strong&gt; use a learned critic and observed transitions, as described next.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A useful baseline should explain variation in return without depending on the sampled action. Its purpose is to improve the gradient estimate, rather than change which policy we want to learn.&lt;/p&gt;
&lt;h2 id="5-actorcritic-methods"&gt;5. Actor–Critic Methods&lt;/h2&gt;
&lt;h3 id="motivation-and-intuition"&gt;Motivation and Intuition&lt;/h3&gt;
&lt;p&gt;An &lt;strong&gt;actor&lt;/strong&gt; learns the policy, while a &lt;strong&gt;critic&lt;/strong&gt; learns a value function that helps evaluate the actor&amp;rsquo;s decisions. Instead of waiting for a complete Monte Carlo return, we can combine an observed reward with the critic&amp;rsquo;s prediction of what happens next.&lt;/p&gt;
&lt;p&gt;The actor has parameters $\theta$ and policy $\pi_\theta(a\mid s)$. Here the critic has parameters $w$ and predicts $V_w(s)$. Other actor–critic algorithms may learn an action-value function instead.&lt;/p&gt;
&lt;h3 id="from-the-bellman-equation-to-a-td-error"&gt;From the Bellman Equation to a TD Error&lt;/h3&gt;
&lt;p&gt;Recall the relationship between action values and state values:&lt;/p&gt;
$$
Q^\pi(s,a)=\mathbb{E}_{r,s'\mid s,a}[r+\gamma V^\pi(s')].
$$&lt;p&gt;For a sampled transition, the one-step target and temporal-difference (TD) error are&lt;/p&gt;
$$
y_t=r_t+\gamma(1-d_t)V_w(s_{t+1}),
\qquad
\delta_t=y_t-V_w(s_t),
$$&lt;p&gt;where $d_t=1$ at a terminal state and $0$ otherwise. The terminal mask prevents bootstrapping beyond the end of an episode.&lt;/p&gt;
&lt;p&gt;With an exact value function, the conditional expectation of this TD error is the advantage. A sampled transition remains noisy, and an imperfect learned value function can introduce bias. Stochastic transitions alone do not make the conditional estimate biased.&lt;/p&gt;
&lt;h3 id="updating-the-actor-and-critic"&gt;Updating the Actor and Critic&lt;/h3&gt;
&lt;p&gt;The actor uses $\delta_t$ as an advantage estimate. A per-transition update direction is&lt;/p&gt;
$$
\hat g_t=\delta_t\nabla_\theta\log\pi_\theta(a_t\mid s_t).
$$&lt;p&gt;A positive TD error encourages the sampled action; a negative one discourages it. The critic minimizes a squared prediction error:&lt;/p&gt;
$$
\mathcal{L}_V(w)=\frac12\left(V_w(s_t)-\operatorname{stopgrad}(y_t)\right)^2.
$$&lt;p&gt;Holding the target fixed gives&lt;/p&gt;
$$
\nabla_w\mathcal{L}_V(w)=-\delta_t\nabla_wV_w(s_t).
$$&lt;p&gt;Consequently, gradient descent on this loss updates $w$ in the direction $+\delta_t\nabla_wV_w(s_t)$. Keeping the loss gradient and the parameter-update direction separate makes the sign easier to follow.&lt;/p&gt;
&lt;h3 id="algorithm-and-implementation-notes"&gt;Algorithm and Implementation Notes&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Act:&lt;/strong&gt; sample $a_t\sim\pi_\theta(\cdot\mid s_t)$.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Observe:&lt;/strong&gt; receive $r_t$, $s_{t+1}$, and the terminal flag.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evaluate:&lt;/strong&gt; compute the target $y_t$ and TD error $\delta_t$.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Update the critic:&lt;/strong&gt; minimize the value prediction loss with the target held fixed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Update the actor:&lt;/strong&gt; use the detached TD error to weight the log-probability gradient.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In PyTorch, &lt;code&gt;.detach()&lt;/code&gt; stops gradients through a tensor. For the critic, detach the bootstrap target; for the actor, detach the advantage estimate so that the actor loss does not also optimize the critic through that weight.&lt;/p&gt;
&lt;p&gt;Implementations often collect a small batch of transitions before updating. Batch size and rollout length affect the trade-off between noisy estimates and delayed updates.&lt;/p&gt;
&lt;h2 id="6-trust-region-policy-optimization-trpo"&gt;6. Trust Region Policy Optimization (TRPO)&lt;/h2&gt;
&lt;h3 id="why-limit-the-policy-update"&gt;Why Limit the Policy Update?&lt;/h3&gt;
&lt;p&gt;This section provides background for PPO rather than a full TRPO derivation. A large parameter update can change a neural-network policy substantially and reduce its performance. TRPO uses a &lt;strong&gt;trust region&lt;/strong&gt; to limit the change while improving an advantage-based surrogate objective.&lt;/p&gt;
&lt;p&gt;We collect data with an old policy $\pi_{\mathrm{old}}$, then evaluate candidate policies against the old policy&amp;rsquo;s advantages. Keeping that reference fixed is essential: the expected advantage of a policy under its own action distribution is zero.&lt;/p&gt;
&lt;h3 id="the-surrogate-objective-and-constraint"&gt;The Surrogate Objective and Constraint&lt;/h3&gt;
&lt;p&gt;Define $d_{\mathrm{old}}$ as the state-visitation distribution used by the surrogate and $\rho_\theta(s,a)=\pi_\theta(a\mid s)/\pi_{\mathrm{old}}(a\mid s)$. The practical TRPO optimization problem combines an advantage-weighted objective with an average KL constraint:&lt;/p&gt;
$$
\begin{aligned}
\max_\theta\quad &amp;
\mathbb{E}_{s\sim d_{\mathrm{old}},\,a\sim\pi_{\mathrm{old}}}
\left[\rho_\theta(s,a)A^{\pi_{\mathrm{old}}}(s,a)\right]\\
\text{subject to}\quad &amp;
\mathbb{E}_{s\sim d_{\mathrm{old}}}\left[
D_{\mathrm{KL}}\left(\pi_{\mathrm{old}}(\cdot\mid s)\,\|\,\pi_\theta(\cdot\mid s)\right)
\right]\leq\delta.
\end{aligned}
$$&lt;p&gt;The &lt;strong&gt;importance weight&lt;/strong&gt; adjusts an action&amp;rsquo;s contribution according to how likely the candidate policy is to choose it relative to the rollout policy. For a positive advantage, increasing the ratio increases its contribution to the surrogate; decreasing the ratio reduces that contribution. Negative advantages reverse the preference.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;KL constraint&lt;/strong&gt; limits the average distributional change over the sampled states. The threshold $\delta$ controls the size of the trust region. This helps keep the local surrogate useful as the policy changes; it is not a guarantee that every individual state or action changes by a fixed amount.&lt;/p&gt;
&lt;p&gt;See
and the
for the optimization procedure.&lt;/p&gt;
&lt;h3 id="why-importance-sampling"&gt;Why Importance Sampling?&lt;/h3&gt;
&lt;p&gt;Suppose we want an expectation under a target distribution $p$, but our samples come from $q$. If $q(x)&gt;0$ wherever $p(x)&gt;0$, we can rewrite&lt;/p&gt;
$$
\begin{aligned}
\mathbb{E}_{x\sim p}[h(x)]
&amp;=\int h(x)p(x)\,dx\\
&amp;=\int h(x)\frac{p(x)}{q(x)}q(x)\,dx\\
&amp;=\mathbb{E}_{x\sim q}\left[\frac{p(x)}{q(x)}h(x)\right].
\end{aligned}
$$&lt;p&gt;In the policy surrogate, the ratio reweights actions from the old policy. The surrogate still uses the old state distribution, so it should not be mistaken for an exact evaluation of the candidate policy&amp;rsquo;s full return.&lt;/p&gt;
&lt;p&gt;This is also useful background for PPO: collect a rollout batch, save its action log-probabilities, and optimize a surrogate over several passes through that batch. As the policy moves away from the rollout policy, the approximation becomes less reliable. Policy-change controls help address that problem.&lt;/p&gt;
&lt;h2 id="7-proximal-policy-optimization-ppo"&gt;7. Proximal Policy Optimization (PPO)&lt;/h2&gt;
&lt;h3 id="the-clipped-surrogate-objective"&gt;The Clipped Surrogate Objective&lt;/h3&gt;
&lt;p&gt;TRPO solves a constrained optimization problem. PPO-Clip uses a simpler clipped surrogate objective that can be optimized with ordinary gradient-based updates.&lt;/p&gt;
&lt;p&gt;Define the new-to-old probability ratio as&lt;/p&gt;
$$
\rho_t(\theta)=\frac{\pi_\theta(a_t\mid s_t)}{\pi_{\mathrm{old}}(a_t\mid s_t)}.
$$&lt;p&gt;The old policy is the policy that collected the rollout. Let $\hat A_t$ be an advantage estimate computed from that rollout. PPO maximizes&lt;/p&gt;
$$
L^{\mathrm{CLIP}}(\theta)=\mathbb{E}_t\left[
\min\left(\rho_t(\theta)\hat A_t,
\operatorname{clip}(\rho_t(\theta),1-\epsilon,1+\epsilon)\hat A_t\right)
\right].
$$&lt;p&gt;Clipping removes the incentive for certain changes that move the probability ratio too far in a favorable direction. It &lt;strong&gt;does not enforce a hard bound&lt;/strong&gt; on the actual ratio or guarantee a small KL divergence. See
.&lt;/p&gt;
&lt;p&gt;Here I use $\rho_t$ for the probability ratio so it is visually distinct from the reward $r_t$.&lt;/p&gt;
&lt;h3 id="generalized-advantage-estimation-gae"&gt;Generalized Advantage Estimation (GAE)&lt;/h3&gt;
&lt;p&gt;The advantage tells us how much better an action is than the policy&amp;rsquo;s average behavior in that state. Two ways to estimate it are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Monte Carlo:&lt;/strong&gt; use the full observed return minus a baseline. This avoids bootstrapping at an episode&amp;rsquo;s end, but may have high variance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One-step TD:&lt;/strong&gt; combine an immediate reward with the critic&amp;rsquo;s next-state estimate. This often reduces variance but depends on the accuracy of the critic.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;GAE interpolates between these approaches. For readability, the equations below omit terminal masks; at episode boundaries, stop bootstrapping and truncate the sums appropriately.&lt;/p&gt;
&lt;p&gt;Start with the TD error $\delta_t=r_t+\gamma V(s_{t+1})-V(s_t)$. Multi-step estimates are&lt;/p&gt;
$$
\begin{aligned}
\hat A_t^{(1)}&amp;=\delta_t,\\
\hat A_t^{(2)}&amp;=\delta_t+\gamma\delta_{t+1},\\
\hat A_t^{(3)}&amp;=\delta_t+\gamma\delta_{t+1}+\gamma^2\delta_{t+2},\\
\hat A_t^{(k)}&amp;=\sum_{i=0}^{k-1}\gamma^i\delta_{t+i}.
\end{aligned}
$$&lt;p&gt;Expanding the TD errors makes the intermediate value terms cancel:&lt;/p&gt;
$$
\hat A_t^{(k)}
=-V(s_t)+\sum_{i=0}^{k-1}\gamma^i r_{t+i}+\gamma^kV(s_{t+k}).
$$&lt;p&gt;For $0\leq\lambda\lt 1$, an exponentially weighted average gives&lt;/p&gt;
$$
\begin{aligned}
\hat A_t^{\mathrm{GAE}}
&amp;=(1-\lambda)\sum_{k=1}^{\infty}\lambda^{k-1}\hat A_t^{(k)}\\
&amp;=(1-\lambda)\sum_{k=1}^{\infty}\lambda^{k-1}
\sum_{l=0}^{k-1}\gamma^l\delta_{t+l}\\
&amp;=\sum_{l=0}^{\infty}\gamma^l\delta_{t+l}
\left[(1-\lambda)\sum_{k=l+1}^{\infty}\lambda^{k-1}\right]\\
&amp;=\sum_{l=0}^{\infty}(\gamma\lambda)^l\delta_{t+l}.
\end{aligned}
$$&lt;p&gt;The parameter $\lambda$ controls the trade-off:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;At $\lambda=0$, GAE reduces to the one-step TD error.&lt;/li&gt;
&lt;li&gt;At $\lambda=1$, the finite-episode sum reduces to the Monte Carlo return minus the baseline when the terminal value is zero.&lt;/li&gt;
&lt;li&gt;Intermediate values trade reliance on long sampled returns against reliance on learned value estimates.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The
develops this bias–variance perspective in more detail.&lt;/p&gt;
&lt;h3 id="entropy-bonus"&gt;Entropy Bonus&lt;/h3&gt;
&lt;p&gt;An entropy bonus encourages exploration by discouraging the policy from becoming too concentrated too early. Without sufficient exploration, the agent may commit to a suboptimal action before discovering alternatives.&lt;/p&gt;
&lt;p&gt;Formula:&lt;/p&gt;
$$
S[\pi_\theta](s_t) = H(\theta) = - \mathbb{E}_{a_t} [\log \pi_\theta (a_t | s_t)] = -\sum_a\pi_\theta (a | s_t) \log \pi_\theta (a | s_t)
$$&lt;p&gt;For categorical logits, the following PyTorch snippet computes the entropy. It assumes &lt;code&gt;logits_current&lt;/code&gt; contains valid, unpadded positions:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;torch.nn.functional&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;F&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Compute entropy of current policy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;probs_current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;softmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logits_current&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;log_probs_current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;F&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log_softmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;logits_current&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;entropy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;probs_current&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;log_probs_current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dim&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Average over sequence and batch&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;entropy_bonus&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;entropy&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="training-the-value-function"&gt;Training the Value Function&lt;/h3&gt;
&lt;p&gt;PPO also fits a critic. Let $V_w$ be the current value function and let $\hat V_t$ be a return target computed from the rollout. With GAE, a common target is&lt;/p&gt;
$$
\hat V_t=\hat A_t^{\mathrm{GAE}}+V_{w_{\mathrm{old}}}(s_t).
$$&lt;p&gt;This is a bootstrapped return target; it is not generally identical to the observed Monte Carlo return. Fit the critic with the target held fixed:&lt;/p&gt;
$$
\mathcal{L}^{\mathrm{VF}}_t(w)
=\frac12\left(V_w(s_t)-\operatorname{stopgrad}(\hat V_t)\right)^2.
$$&lt;p&gt;Average the loss over the batch. The actor and critic may use separate networks or share a backbone with different output heads. Here, $\theta$ and $w$ distinguish the policy and value parameters even when discussing their losses together.&lt;/p&gt;
&lt;h3 id="the-combined-ppo-objective"&gt;The Combined PPO Objective&lt;/h3&gt;
&lt;p&gt;One common combined objective is &lt;strong&gt;maximized&lt;/strong&gt;:&lt;/p&gt;
$$
J_{\mathrm{PPO}}(\theta,w)
=\mathbb{E}_t\left[
L_t^{\mathrm{CLIP}}(\theta)
-c_1\mathcal{L}_t^{\mathrm{VF}}(w)
+c_2H(\pi_\theta(\cdot\mid s_t))
\right].
$$&lt;p&gt;A loss minimized by an optimizer has the opposite sign. The clipped term updates the actor, the value loss trains the critic, and the entropy term encourages exploration.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;$\gamma$&lt;/td&gt;
&lt;td&gt;Discounting future rewards&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$\lambda$&lt;/td&gt;
&lt;td&gt;GAE&amp;rsquo;s bias–variance trade-off&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$\epsilon$&lt;/td&gt;
&lt;td&gt;Clipping threshold in the surrogate objective&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$c_1$&lt;/td&gt;
&lt;td&gt;Weight of the value loss&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;$c_2$&lt;/td&gt;
&lt;td&gt;Weight of the entropy bonus&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="key-takeaways"&gt;Key Takeaways&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Policy gradients connect sampled rewards to changes in action probabilities.&lt;/li&gt;
&lt;li&gt;REINFORCE uses complete returns; a baseline can reduce variance.&lt;/li&gt;
&lt;li&gt;Actor–critic methods learn value estimates to guide policy updates.&lt;/li&gt;
&lt;li&gt;TRPO constrains policy change, while PPO uses a clipped surrogate.&lt;/li&gt;
&lt;li&gt;GAE, value targets, and entropy each address a different part of training.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;Continue with
, which covers RL in the LLM/VLM setting, RLHF, the full PPO training pipeline, and GRPO.&lt;/p&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;These notes would not have been possible without the many excellent books, lecture notes, blog posts, papers, and open-source resources created by the machine learning community. I am deeply grateful to all of the authors and educators whose work helped me understand reinforcement learning and LLM post-training. Many of the explanations and intuitions presented here were inspired by or built upon these resources, although any mistakes, misunderstandings, or inaccuracies are entirely my own.&lt;/p&gt;
&lt;p&gt;If you are interested in learning more, I highly encourage you to explore the references below. They provide much deeper and more rigorous treatments than these personal notes and have been invaluable throughout my learning journey.&lt;/p&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;h3 id="rl-foundations"&gt;RL Foundations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="policy-gradient-papers"&gt;Policy Gradient Papers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="rlhf"&gt;RLHF&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="ppo-and-grpo-explanations"&gt;PPO and GRPO Explanations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Clinical Features and Survival Analysis of Osteosarcoma Patients: A Vietnamese Nationwide Retrospective Study</title><link>https://chiphan1110.github.io/publications/osteosarcoma-report/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/publications/osteosarcoma-report/</guid><description>&lt;p&gt;Retrospective report on osteosarcoma patient characteristics and survival analysis in the Vietnamese context.&lt;/p&gt;</description></item><item><title>Example Talk: Recent Work</title><link>https://chiphan1110.github.io/slides/example/</link><pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/slides/example/</guid><description>&lt;!-- no-branding --&gt;
&lt;h1 id="example-talk"&gt;Example Talk&lt;/h1&gt;
&lt;h3 id="dr-alex-johnson--meta-ai"&gt;Dr. Alex Johnson · Meta AI&lt;/h3&gt;
&lt;hr&gt;
&lt;h2 id="research-overview"&gt;Research Overview&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Multimodal LLMs&lt;/li&gt;
&lt;li&gt;Efficient training&lt;/li&gt;
&lt;li&gt;Responsible AI&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="code--math"&gt;Code &amp;amp; Math&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;$$
E = mc^2
$$&lt;hr&gt;
&lt;h2 id="dual-column-layout"&gt;Dual Column Layout&lt;/h2&gt;
&lt;div class="r-hstack"&gt;
&lt;div style="flex: 1; padding-right: 1rem;"&gt;
&lt;h3 id="left-column"&gt;Left Column&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Point A&lt;/li&gt;
&lt;li&gt;Point B&lt;/li&gt;
&lt;li&gt;Point C&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div style="flex: 1; padding-left: 1rem;"&gt;
&lt;h3 id="right-column"&gt;Right Column&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Detail 1&lt;/li&gt;
&lt;li&gt;Detail 2&lt;/li&gt;
&lt;li&gt;Detail 3&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr&gt;
&lt;!-- Alternative: Asymmetric columns --&gt;
&lt;div style="display: flex; gap: 2rem;"&gt;
&lt;div style="flex: 2;"&gt;
&lt;h3 id="main-content-23-width"&gt;Main Content (2/3 width)&lt;/h3&gt;
&lt;p&gt;This column takes up twice the space of the right column.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;example&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;code works too&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div style="flex: 1;"&gt;
&lt;h3 id="sidebar-13-width"&gt;Sidebar (1/3 width)&lt;/h3&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
Key points in smaller column&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr&gt;
&lt;h2 id="image--text-layout"&gt;Image + Text Layout&lt;/h2&gt;
&lt;div class="r-hstack" style="align-items: center;"&gt;
&lt;div style="flex: 1;"&gt;
&lt;p&gt;
&lt;figure &gt;
&lt;div class="flex justify-center "&gt;
&lt;div class="w-full" &gt;&lt;img src="https://images.unsplash.com/photo-1708011271954-c0d2b3155ded?w=400&amp;amp;dpr=2&amp;amp;h=400&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;q=60&amp;amp;ixid=M3wxMjA3fDB8MXxzZWFyY2h8MTh8fG1hdGhlbWF0aWNzfGVufDB8fHx8MTc2NTYzNTEzMHww&amp;amp;ixlib=rb-4.1.0" alt="" loading="lazy" data-zoomable /&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/figure&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;div style="flex: 1; padding-left: 2rem;"&gt;
&lt;h3 id="results"&gt;Results&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;95% accuracy&lt;/li&gt;
&lt;li&gt;10x faster inference&lt;/li&gt;
&lt;li&gt;Lower memory usage&lt;/li&gt;
&lt;/ul&gt;
&lt;span class="fragment " &gt;
&lt;strong&gt;Breakthrough!&lt;/strong&gt;
&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;hr&gt;
&lt;h2 id="speaker-notes"&gt;Speaker Notes&lt;/h2&gt;
&lt;p&gt;Press &lt;strong&gt;S&lt;/strong&gt; to open presenter view with notes!&lt;/p&gt;
&lt;p&gt;This slide has hidden speaker notes below.&lt;/p&gt;
&lt;p&gt;Note:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This is a &lt;strong&gt;speaker note&lt;/strong&gt; (only visible in presenter view)&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;S&lt;/code&gt; key to open presenter console&lt;/li&gt;
&lt;li&gt;Perfect for remembering key talking points&lt;/li&gt;
&lt;li&gt;Can include reminders, timing, references&lt;/li&gt;
&lt;li&gt;Supports &lt;strong&gt;Markdown&lt;/strong&gt; formatting too!&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="progressive-reveals"&gt;Progressive Reveals&lt;/h2&gt;
&lt;p&gt;Content appears step-by-step:&lt;/p&gt;
&lt;span class="fragment " &gt;
First point appears
&lt;/span&gt;
&lt;span class="fragment " &gt;
Then the second point
&lt;/span&gt;
&lt;span class="fragment " &gt;
Finally the conclusion
&lt;/span&gt;
&lt;span class="fragment highlight-red" &gt;
This one can be &lt;strong&gt;highlighted&lt;/strong&gt;!
&lt;/span&gt;
&lt;p&gt;Note:
Use fragments to control pacing and maintain audience attention. Each fragment appears on click.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="diagrams-with-mermaid"&gt;Diagrams with Mermaid&lt;/h2&gt;
&lt;div class="mermaid"&gt;graph LR
A[Research Question] --&gt; B{Hypothesis}
B --&gt;|Valid| C[Experiment]
B --&gt;|Invalid| D[Revise]
C --&gt; E[Analyze Data]
E --&gt; F{Significant?}
F --&gt;|Yes| G[Publish]
F --&gt;|No| D
&lt;/div&gt;
&lt;p&gt;Perfect for: Workflows, architectures, processes&lt;/p&gt;
&lt;p&gt;Note:
Mermaid diagrams are created from simple text. They&amp;rsquo;re version-controllable and edit anywhere!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="research-results"&gt;Research Results&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;th&gt;Speed&lt;/th&gt;
&lt;th&gt;Memory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Baseline&lt;/td&gt;
&lt;td&gt;87.3%&lt;/td&gt;
&lt;td&gt;1.0x&lt;/td&gt;
&lt;td&gt;2GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ours (v1)&lt;/td&gt;
&lt;td&gt;92.1%&lt;/td&gt;
&lt;td&gt;1.5x&lt;/td&gt;
&lt;td&gt;1.8GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ours (v2)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;95.8%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.3x&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;1.2GB&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;&lt;strong&gt;Key Finding:&lt;/strong&gt; 8.5% improvement over baseline with 40% memory reduction&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note:
Tables are perfect for comparative results. Markdown tables are simple and version-control friendly.&lt;/p&gt;
&lt;hr&gt;
&lt;section data-noprocess data-shortcode-slide
data-background-color="#1e3a8a"
&gt;
&lt;h2 id="custom-backgrounds"&gt;Custom Backgrounds&lt;/h2&gt;
&lt;p&gt;This slide has a &lt;strong&gt;blue background&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;You can customize:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Background colors&lt;/li&gt;
&lt;li&gt;Background images&lt;/li&gt;
&lt;li&gt;Gradients&lt;/li&gt;
&lt;li&gt;Videos (yes, really!)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Use &lt;code&gt;{{&amp;lt; slide background-color=&amp;quot;#hex&amp;quot; &amp;gt;}}&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="vertical-navigation"&gt;Vertical Navigation&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;There&amp;rsquo;s more content below! ⬇️&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Press the &lt;strong&gt;Down Arrow&lt;/strong&gt; to see substeps.&lt;/p&gt;
&lt;p&gt;Note:
This demonstrates Reveal.js&amp;rsquo;s vertical slide feature. Great for optional details or deep dives.&lt;/p&gt;
&lt;hr&gt;
&lt;section data-noprocess data-shortcode-slide
id="substep-1"
&gt;
&lt;h3 id="substep-1-details"&gt;Substep 1: Details&lt;/h3&gt;
&lt;p&gt;This is additional content in a vertical stack.&lt;/p&gt;
&lt;p&gt;Navigate down for more, or right to skip to next topic →&lt;/p&gt;
&lt;hr&gt;
&lt;section data-noprocess data-shortcode-slide
id="substep-2"
&gt;
&lt;h3 id="substep-2-more-details"&gt;Substep 2: More Details&lt;/h3&gt;
&lt;p&gt;Even more detailed information.&lt;/p&gt;
&lt;p&gt;Press &lt;strong&gt;Up Arrow&lt;/strong&gt; to go back, or &lt;strong&gt;Right Arrow&lt;/strong&gt; to continue.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="citations--quotes"&gt;Citations &amp;amp; Quotes&lt;/h2&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;&amp;ldquo;The best way to predict the future is to invent it.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;— Alan Kay&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Or reference research:&lt;/p&gt;
&lt;blockquote class="border-l-4 border-neutral-300 dark:border-neutral-600 pl-4 italic text-neutral-600 dark:text-neutral-400 my-6"&gt;
&lt;p&gt;Recent work by Smith et al. (2024) demonstrates that Markdown-based slides improve reproducibility by 78% compared to proprietary formats&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id="media-youtube-videos"&gt;Media: YouTube Videos&lt;/h2&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/dQw4w9WgXcQ?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;p&gt;Note:
Embed YouTube videos with just the video ID. Perfect for demos, tutorials, or interviews.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="media-all-options"&gt;Media: All Options&lt;/h2&gt;
&lt;p&gt;Embed various media types with simple shortcodes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;YouTube&lt;/strong&gt;: &lt;code&gt;{{&amp;lt; youtube VIDEO_ID &amp;gt;}}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bilibili&lt;/strong&gt;: &lt;code&gt;{{&amp;lt; bilibili id=&amp;quot;BV1...&amp;quot; &amp;gt;}}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local videos&lt;/strong&gt;: &lt;code&gt;{{&amp;lt; video src=&amp;quot;file.mp4&amp;quot; controls=&amp;quot;yes&amp;quot; &amp;gt;}}&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audio&lt;/strong&gt;: &lt;code&gt;{{&amp;lt; audio src=&amp;quot;file.mp3&amp;quot; &amp;gt;}}&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Perfect for demos, interviews, tutorials, or podcasts!&lt;/p&gt;
&lt;p&gt;Note:
All media types work seamlessly in slides. Just use the appropriate shortcode.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="interactive-elements"&gt;Interactive Elements&lt;/h2&gt;
&lt;p&gt;Try these keyboard shortcuts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;→&lt;/code&gt; &lt;code&gt;←&lt;/code&gt; : Navigate slides&lt;/li&gt;
&lt;li&gt;&lt;code&gt;↓&lt;/code&gt; &lt;code&gt;↑&lt;/code&gt; : Vertical navigation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;S&lt;/code&gt; : Speaker notes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;F&lt;/code&gt; : Fullscreen&lt;/li&gt;
&lt;li&gt;&lt;code&gt;O&lt;/code&gt; : Overview mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/&lt;/code&gt; : Search&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ESC&lt;/code&gt; : Exit modes&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;!-- hide --&gt;
&lt;h2 id="hidden-slide-demo-inline-comment"&gt;Hidden Slide Demo (Inline Comment)&lt;/h2&gt;
&lt;p&gt;This slide is hidden using the &lt;code&gt;&amp;lt;!-- hide --&amp;gt;&lt;/code&gt; comment method.&lt;/p&gt;
&lt;p&gt;Perfect for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Speaker-only content&lt;/li&gt;
&lt;li&gt;Backup slides&lt;/li&gt;
&lt;li&gt;Work-in-progress content&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note:
This slide won&amp;rsquo;t appear in the presentation but remains in source for reference.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="thanks"&gt;Thanks&lt;/h2&gt;
&lt;h3 id="questions"&gt;Questions?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;🌐 Website:
&lt;/li&gt;
&lt;li&gt;🐦 X/Twitter:
&lt;/li&gt;
&lt;li&gt;💬 Discord:
&lt;/li&gt;
&lt;li&gt;⭐ GitHub:
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;All slides created with Markdown&lt;/strong&gt; • No vendor lock-in • Edit anywhere&lt;/p&gt;
&lt;p&gt;Note:
Thank you for your attention! Feel free to reach out with questions or contributions.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-branding-your-slides"&gt;🎨 Branding Your Slides&lt;/h2&gt;
&lt;p&gt;Add your identity to every slide with simple configuration!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What you can add:&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Element&lt;/th&gt;
&lt;th&gt;Position Options&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Logo&lt;/td&gt;
&lt;td&gt;top-left, top-right, bottom-left, bottom-right&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Title&lt;/td&gt;
&lt;td&gt;Same as above&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Author&lt;/td&gt;
&lt;td&gt;Same as above&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Footer Text&lt;/td&gt;
&lt;td&gt;Same + bottom-center&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Edit the &lt;code&gt;branding:&lt;/code&gt; section in your slide&amp;rsquo;s front matter (top of file).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-adding-your-logo"&gt;📁 Adding Your Logo&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Place your logo in &lt;code&gt;assets/media/&lt;/code&gt; folder&lt;/li&gt;
&lt;li&gt;Use SVG format for best results (auto-adapts to any theme!)&lt;/li&gt;
&lt;li&gt;Add to front matter:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;branding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;logo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;your-logo.svg&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Must be in assets/media/&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;top-right&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;60px&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; SVGs with &lt;code&gt;fill=&amp;quot;currentColor&amp;quot;&lt;/code&gt; automatically match theme colors!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-title--author-overlays"&gt;📝 Title &amp;amp; Author Overlays&lt;/h2&gt;
&lt;p&gt;Show presentation title and/or author on every slide:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;branding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;show&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;bottom-left&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;Short Title&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c"&gt;# Optional: override long page title&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;author&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;show&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;bottom-right&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Author is auto-detected from page front matter (&lt;code&gt;author:&lt;/code&gt; or &lt;code&gt;authors:&lt;/code&gt;).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-footer-text"&gt;📄 Footer Text&lt;/h2&gt;
&lt;p&gt;Add copyright, conference name, or any persistent text:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;branding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;footer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;© 2024 Your Name · ICML 2024&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;bottom-center&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Supports Markdown! Use &lt;code&gt;[Link](url)&lt;/code&gt; for clickable links.&lt;/p&gt;
&lt;hr&gt;
&lt;!-- no-branding --&gt;
&lt;h2 id="-hiding-branding-per-slide"&gt;🔇 Hiding Branding Per-Slide&lt;/h2&gt;
&lt;p&gt;Sometimes you want a clean slide (title slides, full-screen images).&lt;/p&gt;
&lt;p&gt;Add this comment at the &lt;strong&gt;start&lt;/strong&gt; of your slide content:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;!-- no-branding --&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="gu"&gt;## My Clean Slide
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Content here...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;☝️ &lt;strong&gt;This slide uses &lt;code&gt;&amp;lt;!-- no-branding --&amp;gt;&lt;/code&gt;&lt;/strong&gt; — notice no logo or overlays!&lt;/p&gt;
&lt;hr&gt;
&lt;!-- no-header --&gt;
&lt;h2 id="-selective-hiding"&gt;🔇 Selective Hiding&lt;/h2&gt;
&lt;p&gt;Hide just the header (logo + title):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;!-- no-header --&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or just the footer (author + footer text):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;!-- no-footer --&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;☝️ &lt;strong&gt;This slide uses &lt;code&gt;&amp;lt;!-- no-header --&amp;gt;&lt;/code&gt;&lt;/strong&gt; — footer still visible below!&lt;/p&gt;
&lt;hr&gt;
&lt;!-- no-footer --&gt;
&lt;h2 id="-quick-reference"&gt;✅ Quick Reference&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Comment&lt;/th&gt;
&lt;th&gt;Hides&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;!-- no-branding --&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Everything (logo, title, author, footer)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;!-- no-header --&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Logo + Title overlay&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;!-- no-footer --&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Author + Footer text&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;☝️ &lt;strong&gt;This slide uses &lt;code&gt;&amp;lt;!-- no-footer --&amp;gt;&lt;/code&gt;&lt;/strong&gt; — logo still visible above!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="-get-started"&gt;🚀 Get Started&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Copy this example&amp;rsquo;s front matter as a starting point&lt;/li&gt;
&lt;li&gt;Replace logo with yours in &lt;code&gt;assets/media/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Customize positions and text&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;&amp;lt;!-- no-branding --&amp;gt;&lt;/code&gt; for special slides&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Set site-wide defaults in &lt;code&gt;config/_default/params.yaml&lt;/code&gt; under &lt;code&gt;slides.branding&lt;/code&gt;!&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Smith, J. et al. (2024). &lt;em&gt;Open Science Presentations&lt;/em&gt;. Nature Methods.&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>TransReg: Cross-transformer as the Auto-registration Module for Multi-view Mammogram Mass Detection</title><link>https://chiphan1110.github.io/publications/preprint/</link><pubDate>Fri, 01 Dec 2023 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/publications/preprint/</guid><description/></item><item><title>Embed Media</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/media/</link><pubDate>Tue, 24 Oct 2023 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/media/</guid><description>&lt;p&gt;
is designed to give technical content creators a seamless experience. You can focus on the content and the HugoBlox Kit which this template is built upon handles the rest.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Embed videos, podcasts, code, LaTeX math, and even test students!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On this page, you&amp;rsquo;ll find some examples of the types of technical content that can be rendered with Hugo Blox.&lt;/p&gt;
&lt;h2 id="video"&gt;Video&lt;/h2&gt;
&lt;p&gt;Teach your course by sharing videos with your students. Choose from one of the following approaches:&lt;/p&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/D2vj0WcvH5c?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;p&gt;&lt;strong&gt;Youtube&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{{&amp;lt; youtube w7Ft2ymGmfc &amp;gt;}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Bilibili&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{{&amp;lt; bilibili id=&amp;quot;BV1WV4y1r7DF&amp;quot; &amp;gt;}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Video file&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Videos may be added to a page by either placing them in your &lt;code&gt;assets/media/&lt;/code&gt; media library or in your
, and then embedding them with the &lt;em&gt;video&lt;/em&gt; shortcode:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{{&amp;lt; video src=&amp;quot;my_video.mp4&amp;quot; controls=&amp;quot;yes&amp;quot; &amp;gt;}}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="podcast"&gt;Podcast&lt;/h2&gt;
&lt;p&gt;You can add a podcast or music to a page by placing the MP3 file in the page&amp;rsquo;s folder or the media library folder and then embedding the audio on your page with the &lt;em&gt;audio&lt;/em&gt; shortcode:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{{&amp;lt; audio src=&amp;quot;ambient-piano.mp3&amp;quot; &amp;gt;}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Try it out:&lt;/p&gt;
&lt;audio controls &gt;
&lt;source src="ambient-piano.mp3" type="audio/mpeg"&gt;
&lt;/audio&gt;
&lt;h2 id="test-students"&gt;Test students&lt;/h2&gt;
&lt;p&gt;Provide a simple yet fun self-assessment by revealing the solutions to challenges with the &lt;code&gt;spoiler&lt;/code&gt; shortcode:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; spoiler text=&amp;#34;👉 Click to view the solution&amp;#34; &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;You found me!
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; /spoiler &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;renders as&lt;/p&gt;
&lt;details class="spoiler " id="spoiler-2"&gt;
&lt;summary class="cursor-pointer"&gt;👉 Click to view the solution&lt;/summary&gt;
&lt;div class="rounded-lg bg-neutral-50 dark:bg-neutral-800 p-2"&gt;
You found me 🎉
&lt;/div&gt;
&lt;/details&gt;
&lt;h2 id="math"&gt;Math&lt;/h2&gt;
&lt;p&gt;HugoBlox Kit supports a Markdown extension for $\LaTeX$ math. You can enable this feature by toggling the &lt;code&gt;math&lt;/code&gt; option in your &lt;code&gt;config/_default/params.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;To render &lt;em&gt;inline&lt;/em&gt; or &lt;em&gt;block&lt;/em&gt; math, wrap your LaTeX math with &lt;code&gt;{{&amp;lt; math &amp;gt;}}$...${{&amp;lt; /math &amp;gt;}}&lt;/code&gt; or &lt;code&gt;{{&amp;lt; math &amp;gt;}}$$...$${{&amp;lt; /math &amp;gt;}}&lt;/code&gt;, respectively.&lt;/p&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-blue-100 dark:bg-blue-900 border-blue-500"
data-callout="note"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-blue-600 dark:text-blue-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Note&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;We wrap the LaTeX math in the Hugo Blox &lt;em&gt;math&lt;/em&gt; shortcode to prevent Hugo rendering our math as Markdown. This callout now uses the standard Markdown alert syntax!&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Example &lt;strong&gt;math block&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-latex" data-lang="latex"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;{{&lt;/span&gt;&amp;lt; math &amp;gt;&lt;span class="nb"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt;$$&lt;/span&gt;&lt;span class="nb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;\gamma&lt;/span&gt;&lt;span class="nb"&gt;_{n} &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\frac&lt;/span&gt;&lt;span class="nb"&gt;{ &lt;/span&gt;&lt;span class="nv"&gt;\left&lt;/span&gt;&lt;span class="nb"&gt; | &lt;/span&gt;&lt;span class="nv"&gt;\left&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;\mathbf&lt;/span&gt;&lt;span class="nb"&gt; x_{n} &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\mathbf&lt;/span&gt;&lt;span class="nb"&gt; x_{n&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="nb"&gt;} &lt;/span&gt;&lt;span class="nv"&gt;\right&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;^T &lt;/span&gt;&lt;span class="nv"&gt;\left&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;\nabla&lt;/span&gt;&lt;span class="nb"&gt; F &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;\mathbf&lt;/span&gt;&lt;span class="nb"&gt; x_{n}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\nabla&lt;/span&gt;&lt;span class="nb"&gt; F &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;\mathbf&lt;/span&gt;&lt;span class="nb"&gt; x_{n&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\right&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\right&lt;/span&gt;&lt;span class="nb"&gt; |}{&lt;/span&gt;&lt;span class="nv"&gt;\left&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\|\nabla&lt;/span&gt;&lt;span class="nb"&gt; F&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;\mathbf&lt;/span&gt;&lt;span class="nb"&gt;{x}_{n}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\nabla&lt;/span&gt;&lt;span class="nb"&gt; F&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;\mathbf&lt;/span&gt;&lt;span class="nb"&gt;{x}_{n&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\right&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\|&lt;/span&gt;&lt;span class="nb"&gt;^&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="nb"&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;$$&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;{{&lt;/span&gt;&amp;lt; /math &amp;gt;&lt;span class="nb"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;renders as&lt;/p&gt;
$$\gamma_{n} = \frac{ \left | \left (\mathbf x_{n} - \mathbf x_{n-1} \right )^T \left [\nabla F (\mathbf x_{n}) - \nabla F (\mathbf x_{n-1}) \right ] \right |}{\left \|\nabla F(\mathbf{x}_{n}) - \nabla F(\mathbf{x}_{n-1}) \right \|^2}$$
&lt;p&gt;Example &lt;strong&gt;inline math&lt;/strong&gt; &lt;code&gt;{{&amp;lt; math &amp;gt;}}$\nabla F(\mathbf{x}_{n})${{&amp;lt; /math &amp;gt;}}&lt;/code&gt; renders as $\nabla F(\mathbf{x}_{n})$
.&lt;/p&gt;
&lt;p&gt;Example &lt;strong&gt;multi-line math&lt;/strong&gt; using the math linebreak (&lt;code&gt;\\&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-latex" data-lang="latex"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;{{&lt;/span&gt;&amp;lt; math &amp;gt;&lt;span class="nb"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt;$$&lt;/span&gt;&lt;span class="nb"&gt;f&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;k;p_{&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="nb"&gt;}^{&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nb"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt; &lt;/span&gt;&lt;span class="nv"&gt;\begin&lt;/span&gt;&lt;span class="nb"&gt;{cases}p_{&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="nb"&gt;}^{&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nb"&gt;} &amp;amp; &lt;/span&gt;&lt;span class="nv"&gt;\text&lt;/span&gt;&lt;span class="nb"&gt;{if }k&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="nb"&gt;, &lt;/span&gt;&lt;span class="nv"&gt;\\&lt;/span&gt;&lt;span class="nb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt;p_{&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="nb"&gt;}^{&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nb"&gt;} &amp;amp; &lt;/span&gt;&lt;span class="nv"&gt;\text&lt;/span&gt;&lt;span class="nb"&gt;{if }k&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;\end&lt;/span&gt;&lt;span class="nb"&gt;{cases}&lt;/span&gt;&lt;span class="s"&gt;$$&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;{{&lt;/span&gt;&amp;lt; /math &amp;gt;&lt;span class="nb"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;renders as&lt;/p&gt;
$$
f(k;p_{0}^{*}) = \begin{cases}p_{0}^{*} &amp; \text{if }k=1, \\
1-p_{0}^{*} &amp; \text{if }k=0.\end{cases}
$$
&lt;h2 id="code"&gt;Code&lt;/h2&gt;
&lt;p&gt;HugoBlox Kit utilises Hugo&amp;rsquo;s Markdown extension for highlighting code syntax. The code theme can be selected in the &lt;code&gt;config/_default/params.yaml&lt;/code&gt; file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;```python
import pandas as pd
data = pd.read_csv(&amp;quot;data.csv&amp;quot;)
data.head()
```
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;renders as&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;pd&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;data.csv&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="inline-images"&gt;Inline Images&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;{{&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;python&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;&amp;gt;}}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Python&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;renders as&lt;/p&gt;
&lt;p&gt;
&lt;span class="inline-block pr-1"&gt;
&lt;svg style="height: 1em; transform: translateY(0.1em);" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 448 512" fill="currentColor"&gt;&lt;path d="M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"/&gt;&lt;/svg&gt;
&lt;/span&gt; Python&lt;/p&gt;
&lt;h2 id="did-you-find-this-page-helpful-consider-sharing-it-"&gt;Did you find this page helpful? Consider sharing it 🙌&lt;/h2&gt;</description></item><item><title>Experience</title><link>https://chiphan1110.github.io/experience/</link><pubDate>Tue, 24 Oct 2023 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/experience/</guid><description/></item><item><title>A Novel Transparency Strategy-based Data Augmentation Approach for BI-RADS Classification of Mammograms</title><link>https://chiphan1110.github.io/publications/ssp-2023/</link><pubDate>Sun, 01 Jan 2023 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/publications/ssp-2023/</guid><description/></item><item><title>Exploring Cultural Alignment and Bias in Large Language Model: A Vietnamese Contextual Study</title><link>https://chiphan1110.github.io/publications/cultural-alignment-llm/</link><pubDate>Sun, 01 Jan 2023 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/publications/cultural-alignment-llm/</guid><description/></item><item><title>Buttons</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/button/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/button/</guid><description>&lt;p&gt;A modern, customizable button shortcode with gradient styling, icons, and smart link handling.&lt;/p&gt;
&lt;h2 id="basic-usage"&gt;Basic Usage&lt;/h2&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-351ac412531c23e422b81c6422c17da5"
href="https://chiphan1110.github.io/contact"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Contact Us"
&gt;
&lt;span&gt;Contact Us&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-99f90e9d2b754ffe3fc7b4f9d280ab9e"
href="https://example.com"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-secondary-500 to-secondary-600 hover:from-secondary-600 hover:to-secondary-700 active:from-secondary-700 active:to-secondary-800 text-white shadow-lg shadow-secondary-500/25 hover:shadow-xl hover:shadow-secondary-500/30 hover:scale-105 active:scale-95 focus:ring-secondary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Visit External Site"
&gt;
&lt;span&gt;Visit External Site&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;The above buttons are created with:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;/contact&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Contact Us&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;https://example.com&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;new_tab&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;true&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;secondary&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Visit External Site&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="style-variants"&gt;Style Variants&lt;/h2&gt;
&lt;h3 id="primary-default"&gt;Primary (Default)&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-33f0c5949dceb4f2158940543a6d11f0"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Primary Button"
&gt;
&lt;span&gt;Primary Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;primary&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Primary Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="secondary"&gt;Secondary&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-654c665d9c02125e00b3c2638e02ff31"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-secondary-500 to-secondary-600 hover:from-secondary-600 hover:to-secondary-700 active:from-secondary-700 active:to-secondary-800 text-white shadow-lg shadow-secondary-500/25 hover:shadow-xl hover:shadow-secondary-500/30 hover:scale-105 active:scale-95 focus:ring-secondary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Secondary Button"
&gt;
&lt;span&gt;Secondary Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;secondary&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Secondary Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="outline"&gt;Outline&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-569954ebe8d760dfbd5f8dd8d491e972"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-white dark:bg-zinc-900 border-2 border-primary-500 text-primary-600 dark:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-950/50 hover:border-primary-600 active:bg-primary-100 dark:active:bg-primary-950 shadow-md hover:shadow-lg hover:scale-105 active:scale-95 focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Outline Button"
&gt;
&lt;span&gt;Outline Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;outline&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Outline Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="ghost"&gt;Ghost&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-e8d694dcc82ccc6b692376347eb1210c"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-transparent text-primary-600 dark:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-950/50 active:bg-primary-100 dark:active:bg-primary-950 hover:scale-105 active:scale-95 focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Ghost Button"
&gt;
&lt;span&gt;Ghost Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;ghost&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Ghost Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="sizes"&gt;Sizes&lt;/h2&gt;
&lt;h3 id="small"&gt;Small&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-9edd9a4164984b892472dc4cb0d94acb"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-3 py-1.5 text-sm rounded-lg"
role="button"
aria-label="Small Button"
&gt;
&lt;span&gt;Small Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="medium-default"&gt;Medium (Default)&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-917c91b5df194ee244bcb8dd7d4916c5"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Medium Button"
&gt;
&lt;span&gt;Medium Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="large"&gt;Large&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-c9ef1eeebbeac0de80c5666baeda508c"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-6 py-3 text-lg rounded-lg"
role="button"
aria-label="Large Button"
&gt;
&lt;span&gt;Large Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="extra-large"&gt;Extra Large&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-c38da6a61bc9a2511c12a071b05d1527"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-8 py-4 text-xl rounded-lg"
role="button"
aria-label="Extra Large"
&gt;
&lt;span&gt;Extra Large&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;sm&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Small Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;md&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Medium Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;lg&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Large Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;xl&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Extra Large&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="alignment"&gt;Alignment&lt;/h2&gt;
&lt;h3 id="left-default"&gt;Left (Default)&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-46275a2130718485193b07442854e305"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Left Aligned"
&gt;
&lt;span&gt;Left Aligned&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="center"&gt;Center&lt;/h3&gt;
&lt;div class="text-center"&gt;
&lt;a
id="button-2e7c6d0545131be865f91f4dcb47ebd3"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Center Aligned"
&gt;
&lt;span&gt;Center Aligned&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="right"&gt;Right&lt;/h3&gt;
&lt;div class="text-right"&gt;
&lt;a
id="button-09d01d6786049ba2a63f2cafd484e60e"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Right Aligned"
&gt;
&lt;span&gt;Right Aligned&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;align&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;left&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Left Aligned&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;align&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;center&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Center Aligned&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;align&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;right&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Right Aligned&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="with-icons"&gt;With Icons&lt;/h2&gt;
&lt;h3 id="icon-before-text"&gt;Icon Before Text&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-2070b64a1b12b8165d04699a5e4f0a4d"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Download"
&gt;
&lt;span class="flex-shrink-0"&gt;
&lt;svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;span&gt;Download&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="icon-after-text"&gt;Icon After Text&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-213c46a162adc66071b38a55c26716e3"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Continue"
&gt;
&lt;span&gt;Continue&lt;/span&gt;
&lt;span class="flex-shrink-0"&gt;
&lt;svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;arrow-down-tray&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Download&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;arrow-right&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon_position&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;right&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Continue&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="rounded-corners"&gt;Rounded Corners&lt;/h2&gt;
&lt;h3 id="small-radius"&gt;Small Radius&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-f306324e9ea3297cc7149761131e0e41"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded"
role="button"
aria-label="Small Radius"
&gt;
&lt;span&gt;Small Radius&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="medium-radius-default"&gt;Medium Radius (Default)&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-d519a3255417739cb8197b9869248dec"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="Medium Radius"
&gt;
&lt;span&gt;Medium Radius&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="large-radius"&gt;Large Radius&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-920afdfab9e2ab0e88cb5046924cd223"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-xl"
role="button"
aria-label="Large Radius"
&gt;
&lt;span&gt;Large Radius&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;h3 id="pill-shape"&gt;Pill Shape&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-464be1a963c8f63cf75275ea2137551a"
href="#"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-4 py-2 text-base rounded-full"
role="button"
aria-label="Pill Button"
&gt;
&lt;span&gt;Pill Button&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rounded&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;sm&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Small Radius&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rounded&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;md&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Medium Radius&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rounded&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;lg&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Large Radius&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;#&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rounded&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;full&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Pill Button&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="advanced-examples"&gt;Advanced Examples&lt;/h2&gt;
&lt;h3 id="call-to-action-button"&gt;Call-to-Action Button&lt;/h3&gt;
&lt;div class="text-center"&gt;
&lt;a
id="button-62059f8d62052633590d3f60ec092595"
href="https://chiphan1110.github.io/signup"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-primary-500 to-primary-600 hover:from-primary-600 hover:to-primary-700 active:from-primary-700 active:to-primary-800 text-white shadow-lg shadow-primary-500/25 hover:shadow-xl hover:shadow-primary-500/30 hover:-translate-y-0.5 hover:scale-[1.02] active:scale-[0.98] focus:ring-primary-500/50 px-6 py-3 text-lg rounded-lg"
role="button"
aria-label="Get Started Today"
&gt;
&lt;span class="flex-shrink-0"&gt;
&lt;svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.59 14.37q.159.666.16 1.38a6 6 0 0 1-6 6v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.9 14.9 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.9 14.9 0 0 0-2.58 5.84m2.699 2.7q-.155.032-.311.06a15 15 0 0 1-2.448-2.448l.06-.312m-2.24 2.39a4.49 4.49 0 0 0-1.757 4.306q.341.054.696.054a4.5 4.5 0 0 0 3.61-1.812M16.5 9a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;span&gt;Get Started Today&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;/signup&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;primary&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;lg&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;align&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;center&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;rocket-launch&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Get Started Today&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="external-link-with-new-tab"&gt;External Link with New Tab&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-2cb1bb8bbb2590cc46a8ead690d2da77"
href="https://github.com/hugo-blox/kit"
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-white dark:bg-zinc-900 border-2 border-primary-500 text-primary-600 dark:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-950/50 hover:border-primary-600 active:bg-primary-100 dark:active:bg-primary-950 shadow-md hover:shadow-lg hover:scale-105 active:scale-95 focus:ring-primary-500/50 px-4 py-2 text-base rounded-lg"
role="button"
aria-label="View on GitHub"
&gt;
&lt;span&gt;View on GitHub&lt;/span&gt;
&lt;span class="flex-shrink-0"&gt;
&lt;svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;https://github.com/hugo-blox/kit&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;new_tab&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;true&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;outline&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;arrow-top-right-on-square&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon_position&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;right&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;View on GitHub&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="download-button"&gt;Download Button&lt;/h3&gt;
&lt;div class="text-left"&gt;
&lt;a
id="button-72ec86801f391f16b84b269ade9d2995"
href="https://chiphan1110.github.io/files/document.pdf"
class="inline-flex items-center gap-2 font-medium no-underline transition-all duration-300 ease-out transform-gpu focus:outline-none focus:ring-4 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-zinc-900 disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none bg-gradient-to-br from-secondary-500 to-secondary-600 hover:from-secondary-600 hover:to-secondary-700 active:from-secondary-700 active:to-secondary-800 text-white shadow-lg shadow-secondary-500/25 hover:shadow-xl hover:shadow-secondary-500/30 hover:scale-105 active:scale-95 focus:ring-secondary-500/50 px-4 py-2 text-base rounded-full"
role="button"
aria-label="Download PDF"
&gt;
&lt;span class="flex-shrink-0"&gt;
&lt;svg class="w-4 h-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m.75 12l3 3m0 0l3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;span&gt;Download PDF&lt;/span&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;/files/document.pdf&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;secondary&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;document-arrow-down&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;rounded&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;full&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;Download PDF&lt;span class="cp"&gt;{{&lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="parameters"&gt;Parameters&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&lt;code&gt;#&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Required.&lt;/strong&gt; Button destination URL (internal or external)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;text&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Inner content&lt;/td&gt;
&lt;td&gt;Button text (overrides shortcode content)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;new_tab&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whether to open link in new tab&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;style&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&lt;code&gt;primary&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Button style: &lt;code&gt;primary&lt;/code&gt;, &lt;code&gt;secondary&lt;/code&gt;, &lt;code&gt;outline&lt;/code&gt;, &lt;code&gt;ghost&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&lt;code&gt;md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Button size: &lt;code&gt;sm&lt;/code&gt;, &lt;code&gt;md&lt;/code&gt;, &lt;code&gt;lg&lt;/code&gt;, &lt;code&gt;xl&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;align&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&lt;code&gt;left&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Button alignment: &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;icon&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;Icon name from
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;icon_position&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&lt;code&gt;left&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Icon position: &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rounded&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;&lt;code&gt;md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Border radius: &lt;code&gt;sm&lt;/code&gt;, &lt;code&gt;md&lt;/code&gt;, &lt;code&gt;lg&lt;/code&gt;, &lt;code&gt;xl&lt;/code&gt;, &lt;code&gt;full&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;disabled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Whether button should be disabled&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="security-features"&gt;Security Features&lt;/h2&gt;
&lt;p&gt;The button shortcode automatically handles security for external links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;External links&lt;/strong&gt; get &lt;code&gt;rel=&amp;quot;noreferrer&amp;quot;&lt;/code&gt; attribute&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;External links opening in new tab&lt;/strong&gt; get &lt;code&gt;rel=&amp;quot;noopener noreferrer&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internal links opening in new tab&lt;/strong&gt; get &lt;code&gt;rel=&amp;quot;noopener&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This ensures safe navigation while maintaining functionality.&lt;/p&gt;
&lt;h2 id="accessibility"&gt;Accessibility&lt;/h2&gt;
&lt;p&gt;The button shortcode includes built-in accessibility features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Proper &lt;code&gt;role=&amp;quot;button&amp;quot;&lt;/code&gt; attribute&lt;/li&gt;
&lt;li&gt;&lt;code&gt;aria-label&lt;/code&gt; support&lt;/li&gt;
&lt;li&gt;Keyboard focus indicators&lt;/li&gt;
&lt;li&gt;High contrast focus rings&lt;/li&gt;
&lt;li&gt;Disabled state handling&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Callouts</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/callout/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/callout/</guid><description>&lt;p&gt;Hugo Blox supports GitHub and Obsidian-style Markdown callouts for maximum compatibility and content portability.&lt;/p&gt;
&lt;p&gt;Callouts are a useful feature to draw attention to important or related content such as notes, hints, or warnings in your articles.&lt;/p&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;h3 id="basic-callout-types"&gt;Basic Callout Types&lt;/h3&gt;
&lt;p&gt;Hugo Blox supports all 15+ callout types from
:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Information &amp;amp; Notes:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!NOTE]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;This is a note callout with important information that users should know.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-blue-100 dark:bg-blue-900 border-blue-500"
data-callout="note"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-blue-600 dark:text-blue-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Note&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;This is a note callout with important information that users should know.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!INFO]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Alternative info callout - same styling as NOTE.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-blue-100 dark:bg-blue-900 border-blue-500"
data-callout="info"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-blue-600 dark:text-blue-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9-3.75h.008v.008H12z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Info&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Alternative info callout - same styling as NOTE.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!ABSTRACT]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Use for abstracts, summaries, or TL;DR sections.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-cyan-100 dark:bg-cyan-900 border-cyan-500"
data-callout="abstract"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-cyan-600 dark:text-cyan-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48 48 0 0 0-1.123-.08m-5.801 0q-.099.316-.1.664c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75a2.3 2.3 0 0 0-.1-.664m-5.8 0A2.25 2.25 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0q-.563.035-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125zM6.75 12h.008v.008H6.75zm0 3h.008v.008H6.75zm0 3h.008v.008H6.75z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Abstract&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Use for abstracts, summaries, or TL;DR sections.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Actions &amp;amp; Tasks:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!TODO]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;This is something that needs to be done.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-blue-100 dark:bg-blue-900 border-blue-500"
data-callout="todo"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-blue-600 dark:text-blue-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 12.75L11.25 15L15 9.75M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Todo&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;This is something that needs to be done.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!TIP]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Here&amp;#39;s a helpful tip to make your workflow more efficient!
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-emerald-100 dark:bg-emerald-900 border-emerald-500"
data-callout="tip"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-emerald-600 dark:text-emerald-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 18v-5.25m0 0a6 6 0 0 0 1.5-.189m-1.5.189a6 6 0 0 1-1.5-.189m3.75 7.478a12.1 12.1 0 0 1-4.5 0m3.75 2.383a14.4 14.4 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Tip&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Here&amp;rsquo;s a helpful tip to make your workflow more efficient!&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!SUCCESS]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Great job! This operation completed successfully.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-green-100 dark:bg-green-900 border-green-500"
data-callout="success"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-green-600 dark:text-green-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 12.75L11.25 15L15 9.75M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Success&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Great job! This operation completed successfully.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Questions &amp;amp; Interactive:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!QUESTION]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;What do you think about this approach? Let us know!
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-yellow-100 dark:bg-yellow-900 border-yellow-500"
data-callout="question"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-yellow-700 dark:text-yellow-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.879 7.519c1.172-1.025 3.071-1.025 4.243 0c1.171 1.025 1.171 2.687 0 3.712q-.308.268-.67.442c-.746.361-1.452.999-1.452 1.827v.75M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9 5.25h.008v.008H12z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Question&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;What do you think about this approach? Let us know!&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!EXAMPLE]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Here&amp;#39;s a practical example of how to implement this feature.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-purple-100 dark:bg-purple-900 border-purple-500"
data-callout="example"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-purple-600 dark:text-purple-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104q-.376.034-.75.082m.75-.082a24.3 24.3 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104q.377.034.75.082M19.8 15.3l-1.57.393A9.07 9.07 0 0 1 12 15a9.07 9.07 0 0 0-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.3 48.3 0 0 1 12 21a48 48 0 0 1-8.135-.687c-1.718-.293-2.3-2.379-1.067-3.61L5 14.5"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Example&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Here&amp;rsquo;s a practical example of how to implement this feature.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!QUOTE]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;&amp;#34;The best way to predict the future is to invent it.&amp;#34; - Alan Kay
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-gray-100 dark:bg-gray-800 border-gray-500"
data-callout="quote"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-gray-600 dark:text-gray-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193q-.51.041-1.02.072v3.091l-3-3q-2.031 0-4.02-.163a2.1 2.1 0 0 1-.825-.242m9.345-8.334a2 2 0 0 0-.476-.095a48.6 48.6 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.5 48.5 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402c-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235q.865.113 1.74.194V21l4.155-4.155"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Quote&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;&amp;ldquo;The best way to predict the future is to invent it.&amp;rdquo; - Alan Kay&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Warnings &amp;amp; Errors:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!WARNING]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Be careful! This action might have unexpected consequences.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-orange-100 dark:bg-orange-900 border-orange-500"
data-callout="warning"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-orange-600 dark:text-orange-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0zM12 15.75h.007v.008H12z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Warning&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Be careful! This action might have unexpected consequences.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!CAUTION]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Danger! This operation is irreversible and could cause data loss.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-red-100 dark:bg-red-900 border-red-500"
data-callout="caution"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-red-600 dark:text-red-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0zM12 15.75h.007v.008H12z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Caution&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Danger! This operation is irreversible and could cause data loss.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!IMPORTANT]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;This is critical information that users must understand to proceed.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-purple-100 dark:bg-purple-900 border-purple-500"
data-callout="important"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-purple-600 dark:text-purple-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9 3.75h.008v.008H12z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Important&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;This is critical information that users must understand to proceed.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!DANGER]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;This is extremely dangerous - proceed with extreme caution!
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-red-100 dark:bg-red-900 border-red-500"
data-callout="danger"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-red-600 dark:text-red-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0zM12 15.75h.007v.008H12z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Danger&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;This is extremely dangerous - proceed with extreme caution!&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!FAILURE]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;This operation failed. Check your configuration and try again.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-red-100 dark:bg-red-900 border-red-500"
data-callout="failure"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-red-600 dark:text-red-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m9.75 9.75l4.5 4.5m0-4.5l-4.5 4.5M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Failure&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;This operation failed. Check your configuration and try again.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!BUG]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;Known issue: This feature doesn&amp;#39;t work properly in Safari &amp;lt; 14.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-red-100 dark:bg-red-900 border-red-500"
data-callout="bug"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-red-600 dark:text-red-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 12.75q1.724 0 3.383.237c1.037.146 1.866.966 1.866 2.013c0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24 24 0 0 1 12 12.75m0 0c2.883 0 5.647.508 8.208 1.44a24 24 0 0 1-1.153 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44c.125 2.105.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 0 0 2.248-2.354M12 12.75a2.25 2.25 0 0 1-2.248-2.354M12 8.25q1.494-.001 2.922-.236c.403-.066.74-.358.795-.762a3.8 3.8 0 0 0-.399-2.25M12 8.25q-1.493-.001-2.922-.236c-.402-.066-.74-.358-.795-.762a3.73 3.73 0 0 1 .4-2.253M12 8.25a2.25 2.25 0 0 0-2.248 2.146M12 8.25a2.25 2.25 0 0 1 2.248 2.146M8.683 5a6 6 0 0 1-1.155-1.002c.07-.63.27-1.222.574-1.747M8.683 5a3.75 3.75 0 0 1 6.635 0m0 0c.427-.283.815-.62 1.155-.999a4.5 4.5 0 0 0-.575-1.752M4.921 6a24 24 0 0 0-.392 3.314a24 24 0 0 0 5.223 1.082M19.08 6q.308 1.622.392 3.314a24 24 0 0 1-5.223 1.082"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Bug&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;Known issue: This feature doesn&amp;rsquo;t work properly in Safari &amp;lt; 14.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 id="custom-titles"&gt;Custom Titles&lt;/h3&gt;
&lt;p&gt;You can customize the title of any callout:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;[!WARNING]+ Custom Warning Title
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;&amp;gt; &lt;/span&gt;&lt;span class="ge"&gt;This warning has a custom title instead of just &amp;#34;Warning&amp;#34;.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="callout flex px-4 py-3 mb-6 rounded-md border-l-4 bg-orange-100 dark:bg-orange-900 border-orange-500"
data-callout="warning"
data-callout-metadata=""&gt;
&lt;span class="callout-icon pr-3 pt-1 text-orange-600 dark:text-orange-300"&gt;
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0zM12 15.75h.007v.008H12z"/&gt;&lt;/svg&gt;
&lt;/span&gt;
&lt;div class="callout-content dark:text-neutral-300"&gt;
&lt;div class="callout-title font-semibold mb-1"&gt;Custom Warning Title&lt;br&gt;&lt;/div&gt;
&lt;div class="callout-body"&gt;&lt;p&gt;This warning has a custom title instead of just &amp;ldquo;Warning&amp;rdquo;.&lt;/p&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3 id="legacy-syntax-deprecated"&gt;Legacy Syntax (Deprecated)&lt;/h3&gt;
&lt;p&gt;The old shortcode syntax still works but shows a deprecation warning:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; callout note &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;This still works but is deprecated. Use the Markdown syntax above!
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; /callout &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="css-customization"&gt;CSS Customization&lt;/h3&gt;
&lt;p&gt;Hugo Blox generates callouts with semantic CSS classes and data attributes, making customization easy. Each callout has:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Base class: &lt;code&gt;.callout&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Type-specific data attribute: &lt;code&gt;data-callout=&amp;quot;note&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Component classes: &lt;code&gt;.callout-icon&lt;/code&gt;, &lt;code&gt;.callout-title&lt;/code&gt;, &lt;code&gt;.callout-content&lt;/code&gt;, &lt;code&gt;.callout-body&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Custom CSS Example&lt;/strong&gt; (add to your &lt;code&gt;assets/css/custom.css&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;/* Customize NOTE callouts */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;callout&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;data-callout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;note&amp;#34;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-left-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="mi"&gt;-1&lt;/span&gt;&lt;span class="kt"&gt;px&lt;/span&gt; &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;/* Make SUCCESS callouts pulse */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;callout&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;data-callout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;success&amp;#34;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;pulse&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="kt"&gt;s&lt;/span&gt; &lt;span class="kc"&gt;infinite&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;/* Custom icon styling */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;callout-icon&lt;/span&gt; &lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;transform&lt;/span&gt; &lt;span class="mf"&gt;0.2&lt;/span&gt;&lt;span class="kt"&gt;s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;callout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;hover&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;callout-icon&lt;/span&gt; &lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c"&gt;/* Dark mode overrides */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="k"&gt;media&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;prefers-color-scheme&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;dark&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;callout&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;data-callout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;warning&amp;#34;&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;92&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;border-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;245&lt;/span&gt; &lt;span class="mi"&gt;158&lt;/span&gt; &lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This approach matches
, ensuring your styles work across platforms.&lt;/p&gt;
&lt;h3 id="benefits-of-the-new-syntax"&gt;Benefits of the New Syntax&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Portable&lt;/strong&gt;: Works with GitHub, Obsidian, and other Markdown editors&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Standard&lt;/strong&gt;: Uses widely-adopted Markdown callout syntax&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clean&lt;/strong&gt;: No Hugo-specific shortcodes needed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Future-proof&lt;/strong&gt;: Supported by the latest Hugo versions (0.132.0+)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customizable&lt;/strong&gt;: Semantic CSS classes and data attributes for easy styling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Complete&lt;/strong&gt;: All 15+ Obsidian callout types supported&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multilingual&lt;/strong&gt;: Callout titles are automatically translated based on your site&amp;rsquo;s language (and can be customized in the language packs)&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Cards</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/cards/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/cards/</guid><description>&lt;p&gt;A Hugo extension to create cards. Cards can be shown as links or as plain text.&lt;/p&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;div class="hb-cards mt-4 grid gap-4 not-prose" style="--hb-cols: 1;"&gt;
&lt;a
class="hb-card group"href="../" &gt;
&lt;span class="hb-card-title p-4"&gt;
&lt;svg style="height: 1em; width: 1em;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"&gt;&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.26 10.147a60 60 0 0 0-.491 6.347A48.6 48.6 0 0 1 12 20.904a48.6 48.6 0 0 1 8.232-4.41a61 61 0 0 0-.491-6.347m-15.482 0a51 51 0 0 0-2.658-.813A60 60 0 0 1 12 3.493a60 60 0 0 1 10.399 5.84q-1.345.372-2.658.814m-15.482 0A51 51 0 0 1 12 13.489a50.7 50.7 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5a.75.75 0 0 0 0 1.5m0 0v-3.675A55 55 0 0 1 12 8.443m-7.007 11.55A5.98 5.98 0 0 0 6.75 15.75v-1.5"/&gt;&lt;/svg&gt;Learn Shortcodes&lt;/span&gt;&lt;/a&gt;
&lt;a
class="hb-card group"&gt;
&lt;span class="hb-card-title p-4"&gt;A card without an icon or link&lt;/span&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;is rendered by:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; cards &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {{&amp;lt; card url=&amp;#34;../callout&amp;#34; title=&amp;#34;Callout&amp;#34; icon=&amp;#34;academic-cap&amp;#34; &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; {{&amp;lt; card url=&amp;#34;&amp;#34; title=&amp;#34;A card without an icon&amp;#34; &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; /cards &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="options"&gt;Options&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;icon&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Name of the icon. Defaults to
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;title&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Title heading for the card.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;subtitle&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Subtitle heading (supports Markdown).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;url&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;URL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;</description></item><item><title>Internationalization (i18n)</title><link>https://chiphan1110.github.io/courses/hugo-blox/reference/i18n/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/reference/i18n/</guid><description>&lt;p&gt;Hugo Blox enables you to easily edit the interface text as well as translating your site into multiple languages using Hugo&amp;rsquo;s
feature.&lt;/p&gt;
&lt;p&gt;View the full docs at
&lt;/p&gt;</description></item><item><title>Spoilers</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/toggle/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/toggle/</guid><description>&lt;p&gt;A Hugo shortcode to toggle collapsible content.&lt;/p&gt;
&lt;h2 id="example"&gt;Example&lt;/h2&gt;
&lt;details class="spoiler " id="spoiler-0"&gt;
&lt;summary class="cursor-pointer"&gt;Click to view the spoiler&lt;/summary&gt;
&lt;div class="rounded-lg bg-neutral-50 dark:bg-neutral-800 p-2"&gt;
&lt;p&gt;You found me!&lt;/p&gt;
&lt;p&gt;Markdown is &lt;strong&gt;supported&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/details&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; spoiler text=&amp;#34;Click to view the spoiler&amp;#34; &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;This is the content of the details.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Markdown is **supported**.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{&amp;lt; /spoiler &amp;gt;}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Steps</title><link>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/steps/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://chiphan1110.github.io/courses/hugo-blox/guide/formatting/steps/</guid><description>&lt;p&gt;Display a series of steps, such as for a tutorial.&lt;/p&gt;
&lt;h2 id="example"&gt;Example&lt;/h2&gt;
&lt;div class="hb-steps"&gt;
&lt;h3 id="step-1"&gt;Step 1&lt;/h3&gt;
&lt;p&gt;The first step here&amp;hellip;&lt;/p&gt;
&lt;h3 id="step-2"&gt;Step 2&lt;/h3&gt;
&lt;p&gt;The second step here&amp;hellip;&lt;/p&gt;
&lt;h3 id="step-3"&gt;Step 3&lt;/h3&gt;
&lt;p&gt;The third step here&amp;hellip;&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id="usage"&gt;Usage&lt;/h2&gt;
&lt;p&gt;Use the Markdown level-3 headings to represent step titles within the &lt;code&gt;steps&lt;/code&gt; shortcode:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{% steps %}}
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Step 1
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The first step here...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Step 2
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The second step here...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;### Step 3
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;The third step here...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;{{% /steps %}}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item></channel></rss>