<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>HMPL.js Forem: HMPL.js</title>
    <description>The latest articles on HMPL.js Forem by HMPL.js (@hmpljs).</description>
    <link>https://hmpljs.forem.com/hmpljs</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F9852%2Fffcf1c01-7d4b-4298-ad99-7d957738466a.png</url>
      <title>HMPL.js Forem: HMPL.js</title>
      <link>https://hmpljs.forem.com/hmpljs</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://hmpljs.forem.com/feed/hmpljs"/>
    <language>en</language>
    <item>
      <title>📢 We're opening a list of community projects! You can participate.</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Thu, 20 Nov 2025 20:08:33 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/were-opening-a-list-of-community-projects-you-can-participate-31ge</link>
      <guid>https://hmpljs.forem.com/hmpljs/were-opening-a-list-of-community-projects-you-can-participate-31ge</guid>
      <description>&lt;p&gt;Today we are pleased to finally present a great idea that has been around for a long time, but we never managed to implement it.&lt;/p&gt;

&lt;p&gt;Constant delays due to new versions and other things have been somewhat of a drag, but now we're opening a list of community projects you can create or connect to.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔎 What's the point?
&lt;/h2&gt;

&lt;p&gt;There are many different lists on the internet with interesting projects in various programming fields, and we thought it would be a great idea to open one in our small community.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftsrq5y6s03sbf4plmbzt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftsrq5y6s03sbf4plmbzt.png" alt="Projects list" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We've noticed that, in essence, to develop the project, people can not only write about it and contribute code to the main repository, but also create and develop their own applications using the template language.&lt;/p&gt;

&lt;p&gt;Specifically for this purpose, we have also opened a section on the website where we also add information about such projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb9w84vbxscnnbicche69.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb9w84vbxscnnbicche69.png" alt="Section" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think you'll find this interesting!&lt;/p&gt;

&lt;h2&gt;
  
  
  💬 Feedback
&lt;/h2&gt;

&lt;p&gt;We value your opinion! Do you think a list like this would be of interest to developers, and why? It would be interesting to read.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/hmpl-language/projects" rel="noopener noreferrer"&gt;The list itself&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hmpl-lang.dev/projects" rel="noopener noreferrer"&gt;Section on the website&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Major module update!</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Mon, 17 Nov 2025 17:13:38 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/major-module-update-31p5</link>
      <guid>https://hmpljs.forem.com/hmpljs/major-module-update-31p5</guid>
      <description>&lt;p&gt;Hello everyone! In this short article, I'd like to talk about the new versions we recently released.&lt;/p&gt;

&lt;p&gt;It would seem that the modules are quite utilitarian and there is no particular point in updating them, but nevertheless, it is worth keeping them up to date today, and we will talk about some of the changes in them today.&lt;/p&gt;

&lt;p&gt;Stay informed!&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ vite-plugin-hmpl and hmpl-loader
&lt;/h2&gt;

&lt;p&gt;In case you weren't aware, &lt;code&gt;.hmpl&lt;/code&gt; actually has its own file extension. Loading it requires loaders, which were created specifically for Vite and WebPack. For these, we've updated the settings validation, which relies on the following types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;interface HMPLCompileOptions {
  memo?: boolean;
  autoBody?: boolean | HMPLAutoBodyOptions;
  allowedContentTypes?: HMPLContentTypes;
  sanitize?: HMPLSanitize;
  disallowedTags?: HMPLDisallowedTags;
  sanitizeConfig?: Config;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A small, but also quite interesting update.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌳 hmpl-dom
&lt;/h2&gt;

&lt;p&gt;This module is designed to use templating language syntax without npm or other add-ons. Nothing else is needed, just a single index.html file and that's it. In this update, we've added &lt;code&gt;hmpl-dom.runtime.js&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mnfhvy0yl4qassv876d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4mnfhvy0yl4qassv876d.png" alt="runtime" width="325" height="127"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is also quite an update. They've also updated the README files and other texts everywhere, but that's not really important in the context of releases.&lt;/p&gt;

&lt;h2&gt;
  
  
  💬 Feedback
&lt;/h2&gt;

&lt;p&gt;You can write your thoughts about the new features in the comments, it will be interesting to read! Or, there is a thematic &lt;a href="https://discord.com/invite/KFunMep36n" rel="noopener noreferrer"&gt;Discord channel&lt;/a&gt; for questions and suggestions, there I or someone else will try to answer!&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ This project is Open Source
&lt;/h2&gt;

&lt;p&gt;So you can take part in it too! This also means you can use it for commercial purposes:&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;https://github.com/hmpl-language/hmpl&lt;/a&gt; (Star Us ★)&lt;br&gt;
Website: &lt;a href="https://hmpl-lang.dev" rel="noopener noreferrer"&gt;https://hmpl-lang.dev&lt;/a&gt;&lt;br&gt;
Full list of changes: &lt;a href="https://hmpl-lang.dev/changelog" rel="noopener noreferrer"&gt;https://hmpl-lang.dev/changelog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thank you very much for reading the article!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtxmqls5kzofyy2uwt3m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtxmqls5kzofyy2uwt3m.jpg" alt="thanks" width="563" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>New major HMPL version 3.2.0 🕶</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Wed, 12 Nov 2025 20:50:59 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/new-major-version-320-79e</link>
      <guid>https://hmpljs.forem.com/hmpljs/new-major-version-320-79e</guid>
      <description>&lt;p&gt;Today's vibe is to talk about the new version of the template language. We've been working on this project for a year and a half now, and, man, this is definitely the level of seriousness we're looking for.&lt;/p&gt;

&lt;p&gt;You might think that after all this time, things could be done much better. That's true, but the fact is, what we have is really, really cool.&lt;/p&gt;

&lt;p&gt;Let's take a look at the new version and see what we've prepared :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flusw6xal8eksw9j7m7i2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flusw6xal8eksw9j7m7i2.gif" alt="watch" width="87" height="96"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Bind
&lt;/h2&gt;

&lt;p&gt;Articles usually fill you with unnecessary fluff, whether on topic or not. I like to do that too, of course, but let's get straight to the most important thing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"{{requestStatus}} class1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Text&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
{{#request
  src="/api/getHTML"
  bind="{{requestStatus}}"
}}{{/request}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;result:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"hmpl-status-requestStatus-200 class1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Text&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, now instead of indicators you can write custom classes and other attributes in general.&lt;/p&gt;

&lt;p&gt;It's worth noting that the functionality itself is unique in that I took the code from Cample, a previous project that is one of the fastest on the internet. Working on it has finally helped me, as this speed will now also transfer to the template language implementation :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02rtwnc81lfgi96mhpu6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02rtwnc81lfgi96mhpu6.png" alt="Benchmark" width="168" height="648"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://krausest.github.io/js-framework-benchmark/2025/table_chrome_142.0.7444.60.html" rel="noopener noreferrer"&gt;Benchmark&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  👀 How is it with HATEOAS?
&lt;/h2&gt;

&lt;p&gt;One of the key goals of a template language is to conveniently create applications on a HATEOAS architecture. That is, when we receive routes from our API that we can use to interact with the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "id": 10,
  "name": "Lenovo Laptop",
  "price": 899.99,
  "inStock": true,
  "_links": {
    "self":        { "href": "/products/10" },
    "add_to_cart": { "href": "/cart", "method": "POST" },
    "category":    { "href": "/categories/laptops" },
    "related":     { "href": "/products?relatedTo=10" },
    "reviews":     { "href": "/products/10/reviews" }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this application paradigm, we understand that future versions of the template language will be aimed at convenient interaction with the server in this format. Because when we work in a regular application, we have to know all these routes, whereas here we simply describe the component, and then the necessary API routes are returned to us.&lt;/p&gt;




&lt;p&gt;Repo: &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;https://github.com/hmpl-language/hmpl&lt;/a&gt;&lt;br&gt;
Full list of changes: &lt;a href="https://hmpl-lang.dev/changelog" rel="noopener noreferrer"&gt;https://hmpl-lang.dev/changelog&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>📢 HMPL v3.1: New major update!</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Sat, 25 Oct 2025 18:56:23 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/hmpl-v31-new-major-update-124p</link>
      <guid>https://hmpljs.forem.com/hmpljs/hmpl-v31-new-major-update-124p</guid>
      <description>&lt;p&gt;We've finally finished one of the most long-awaited updates, which brings us a little closer to one of the best tools for creating HATEOAS apps in the world (we hope)!&lt;/p&gt;

&lt;p&gt;We've done a lot of interesting things with it. Since the project hasn't had any code updates for a while, this is a breath of fresh air that will boost its usability.&lt;/p&gt;

&lt;p&gt;Today, we'll be talking primarily about app security, keeping apps up to date, and more. So, let's get started!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnaylv968uku77gl8vi6x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnaylv968uku77gl8vi6x.png" alt="Docs" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔏 Improving security
&lt;/h2&gt;

&lt;p&gt;When working with Hypermedia, unlike other tools, we pay special attention to the security of incoming data from the server. Therefore, one of our solutions was integration with &lt;a href="https://www.npmjs.com/package/dompurify" rel="noopener noreferrer"&gt;DOMPurify&lt;/a&gt;, which cleans incoming HTML of potentially dangerous markup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- 
Response before:
&amp;lt;script&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;div&amp;gt;My component&amp;lt;/div&amp;gt;
--&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
  {{#request
    src="/api/get-my-component"
    sanitize=true
  }}{{/request}}
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- 
Response afer:
&amp;lt;div&amp;gt;My component&amp;lt;/div&amp;gt;
--&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, the problem arose that with default sanitizing we get fairly predictable application behavior, which is generally safe, but not flexible. Therefore, we introduce the &lt;code&gt;sanitizeConfig&lt;/code&gt; property.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 Response before:
 &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;math&amp;gt;&amp;lt;/math&amp;gt;
*/&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;templateFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,{&lt;/span&gt;
  &lt;span class="na"&gt;sanitize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sanitizeConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;USE_PROFILES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;html&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="cm"&gt;/**
 Response after:
 &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's based on &lt;code&gt;Config&lt;/code&gt; with DOMPurify and allows, for example, blocking MathML from the application, as well as a lot of other customizations. This makes the tool truly comprehensive, and it will process even the most bizarre responses as the developer originally intended, without any boilerplate.&lt;/p&gt;

&lt;p&gt;This property has been added to &lt;code&gt;compile&lt;/code&gt; and is not planned to be moved to block helpers.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ Changing arguments for the get function
&lt;/h2&gt;

&lt;p&gt;This is one of the most controversial changes, in my opinion, and one we've been thinking about for a long time. It would seem that if there are more than two arguments, then the properties should be immediately converted to an object, but this proved difficult.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;before:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;elementObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;templateFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="p"&gt;...&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;after:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;elementObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;templateFn&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;prop&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="p"&gt;...&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It would seem that you almost always use only two arguments in &lt;code&gt;get&lt;/code&gt;, but if we were to work with the same context, we'd have to represent the arguments as an array and access them by index. Alternatively, we could specify unused variable names, but then linters wouldn't allow this code, so we believe the approach we've implemented is better.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We would just like to know your opinion, did we do the right thing?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  💬 Feedback
&lt;/h2&gt;

&lt;p&gt;You can write your thoughts about the new features in the comments, it will be interesting to read! Or, there is a thematic &lt;a href="https://discord.com/invite/KFunMep36n" rel="noopener noreferrer"&gt;Discord channel&lt;/a&gt; for questions and suggestions, there I or someone else will try to answer!&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ This project is Open Source
&lt;/h2&gt;

&lt;p&gt;So you can take part in it too! This also means you can use it for commercial purposes:&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;https://github.com/hmpl-language/hmpl&lt;/a&gt; (Star Us ★)&lt;br&gt;
Website: &lt;a href="https://hmpl-lang.dev" rel="noopener noreferrer"&gt;https://hmpl-lang.dev&lt;/a&gt;&lt;br&gt;
Full list of changes: &lt;a href="https://hmpl-lang.dev/changelog" rel="noopener noreferrer"&gt;https://hmpl-lang.dev/changelog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thank you very much for reading the article!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtxmqls5kzofyy2uwt3m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtxmqls5kzofyy2uwt3m.jpg" alt="thanks" width="563" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>📢 HMPL is participating in Hacktoberfest 2025!</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Thu, 02 Oct 2025 19:31:27 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/hmpl-is-participating-in-hacktoberfest-2025-1bn1</link>
      <guid>https://hmpljs.forem.com/hmpljs/hmpl-is-participating-in-hacktoberfest-2025-1bn1</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest2025"&gt;2025 Hacktoberfest Writing Challenge&lt;/a&gt;: Maintainer Spotlight&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hello everyone! This is the second year in a row that our project is participating in Hacktoberfest.&lt;/p&gt;

&lt;p&gt;This is a huge milestone for us, as the project has grown quite significantly over this time. There's more code, it's become better, but most importantly, we've had the opportunity to work with so many great developers!&lt;/p&gt;

&lt;p&gt;And this year, we'd like to do more, and we've prepared a huge number of cool tasks that you can complete.&lt;/p&gt;

&lt;p&gt;Well, let's get started! 🏎️&lt;/p&gt;




&lt;h2&gt;
  
  
  👻 About the festival
&lt;/h2&gt;

&lt;p&gt;This festival has been held since 2013. Here, you can discover a sea of ​​interesting open-source projects, participation in which will give you valuable experience that will help you in your career.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbf12385w87gui1amtv9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbf12385w87gui1amtv9.png" alt="Festival" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There, you'll also be able to meet a wide range of developers from all over the world. And as a nice bonus, you'll receive badges that you can attach to your resume or to your GitHub README.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌱 Our participation there
&lt;/h2&gt;

&lt;p&gt;As I mentioned earlier, our first festival was in 2024. Back then, we were uploading an old repository. It had about 50 stars at the time. I'd show a screenshot, but the old Discord channel is now closed, so the messages there have been deleted. There are only forks of the old removed repository, but the pull requests are not preserved.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95uf6txruqjxgxtxbet2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95uf6txruqjxgxtxbet2.png" alt="First repo" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But still, back then, when I was working on the project alone, it was really cool to get a pull request from a developer for a fix to my code for the first time in my life! It just so happened to be Hacktoberfest time. Therefore, I am grateful to this festival.&lt;/p&gt;




&lt;h2&gt;
  
  
  👀 What now?
&lt;/h2&gt;

&lt;p&gt;We've prepared a lot for today, so you can participate in the project's development! Here's a short list of what we've prepared for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;🐛 We have 25+ issues that will suit both experienced users and beginners&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🌱 If your pull request is successful, your GitHub profile will be posted on our website. You can share it with potential employers if you wish.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And also just respect from our team :)&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Useful links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;https://github.com/hmpl-language/hmpl&lt;/a&gt; (We would be glad if you give us a star☆)&lt;/li&gt;
&lt;li&gt;Issues: &lt;a href="https://github.com/hmpl-language/hmpl/issues" rel="noopener noreferrer"&gt;https://github.com/hmpl-language/hmpl/issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Official Hacktoberfest website: &lt;a href="https://hacktoberfest.com" rel="noopener noreferrer"&gt;https://hacktoberfest.com&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;Thank you all for reading this article!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;We'd be delighted if you'd like to become a contributor to our project!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
      <category>opensource</category>
      <category>devchallenge</category>
    </item>
    <item>
      <title>LocalStorage vs SessionStorage vs Cookies: A Complete Guide 🗄️</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Wed, 06 Aug 2025 22:31:40 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/localstorage-vs-sessionstorage-vs-cookies-a-complete-guide-3m6d</link>
      <guid>https://hmpljs.forem.com/hmpljs/localstorage-vs-sessionstorage-vs-cookies-a-complete-guide-3m6d</guid>
      <description>&lt;p&gt;When we talk about such a topic as data storage, we immediately remember these 3 concepts. But here's the problem, we often use them unconsciously.&lt;/p&gt;

&lt;p&gt;We are used to storing tokens in sessionStorage, but not everyone can answer why exactly. Other concepts follow the same scenario. All these issues have long been decided for us by the modules that we use, and this is sad, because you need to know about this, even if you do not understand websites at all.&lt;/p&gt;

&lt;p&gt;In this article, I tried to prepare for you the ultimate guide so that you do not have any misunderstandings about what is used and for what.&lt;/p&gt;

&lt;p&gt;Well, let's get started!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkr7vqmbffcff2t4xtkz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkr7vqmbffcff2t4xtkz.gif" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🗄️ LocalStorage
&lt;/h2&gt;

&lt;p&gt;Before we start with LocalStorage, it's worth taking a short detour and talking about what storage is.&lt;/p&gt;

&lt;p&gt;Simply put, &lt;strong&gt;storage is&lt;/strong&gt; a dedicated place where the browser stores information. In JavaScript, such storages are represented as objects available via the &lt;code&gt;window&lt;/code&gt; object’s properties with reserved names, or through dedicated variables.&lt;/p&gt;

&lt;p&gt;Now, let's go back. There is a LocalStorage storage, which we access through the &lt;code&gt;localStorage&lt;/code&gt; object. In this object itself, what is important now, the data is stored even when we close the tab or the browser itself. Suitable for large amounts of data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Save a value&lt;/span&gt;
&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;theme&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dark&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Retrieve a value&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;theme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;theme&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "dark"&lt;/span&gt;

&lt;span class="c1"&gt;// Remove a value&lt;/span&gt;
&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;theme&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Clear all storage&lt;/span&gt;
&lt;span class="nx"&gt;localStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's a good place to store long-lived data, such as settings, cached data, etc.&lt;/p&gt;




&lt;h2&gt;
  
  
  🕓 SessionStorage
&lt;/h2&gt;

&lt;p&gt;SessionStorage is similar to LocalStorage; the difference is that while &lt;code&gt;localStorage&lt;/code&gt; is partitioned by origin only, &lt;code&gt;sessionStorage&lt;/code&gt; is partitioned by both origin and browser tabs (top-level browsing contexts). The data in &lt;code&gt;sessionStorage&lt;/code&gt; is only kept for the duration of the page session. Suitable for large amounts of data.&lt;/p&gt;

&lt;p&gt;That is, if you close a tab in your browser, all your data in this storage will be cleared.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Save a value&lt;/span&gt;
&lt;span class="nx"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;authToken&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;123456&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Retrieve a value&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;authToken&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "123456"&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;templateFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hmpl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s2"&gt;`&amp;lt;div&amp;gt;
    {{#request src="/api/my-component.html"}}
      {{#indicator trigger="pending"}}
        &amp;lt;p&amp;gt;Loading...&amp;lt;/p&amp;gt;
      {{/indicator}}
    {{/request}}
  &amp;lt;/div&amp;gt;`&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;templateFn&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;})).&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Remove a value&lt;/span&gt;
&lt;span class="nx"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;authToken&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Clear all storage&lt;/span&gt;
&lt;span class="nx"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suitable for temporary tokens, as well as for data that is needed within the framework of while you are sitting at the site, that is, session data.&lt;/p&gt;




&lt;h2&gt;
  
  
  🍪 Cookies
&lt;/h2&gt;

&lt;p&gt;And now, probably the most popular storage, which is on everyone's lips with modern web application users, is cookies. The banner with them is constantly displayed, but many miss the point: "what are they for?" In fact, this is a small storage (in size later), which stores temporary data (that is, data that will be deleted after a certain period). Suitable for small amounts of data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Set a cookie&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;username=John; path=/; max-age=3600&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// expires in 1 hour&lt;/span&gt;

&lt;span class="c1"&gt;// Read cookies&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "username=John"&lt;/span&gt;

&lt;span class="c1"&gt;// Update a cookie&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;username=Mike; path=/; max-age=3600&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Delete a cookie&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookie&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;username=; path=/; max-age=0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This data is often used in all sorts of tracking on websites. How many people clicked, how someone moves the cursor, etc. Also, when working with authentication, this storage is often used.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article, we looked at LocalStorage, SessionStorage, and Cookies, which perform different tasks for storing data in the browser. Choosing the right storage method depends on the lifetime of the data, the volume limitation, and the need to access it from the server. The right choice will allow you to improve performance, security, and the quality of the user experience.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Thank you very much for reading this article ❤️!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;P.S. Also, don't forget to help me and star HMPL!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hmpl-language/hmpl" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🌱 Star HMPL&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>📢 New Docs: How We Revamped Our Documentation with Astro Starlight 🌌</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Tue, 22 Jul 2025 22:50:03 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/new-docs-how-we-revamped-hmpl-documentation-with-astro-starlight-19ce</link>
      <guid>https://hmpljs.forem.com/hmpljs/new-docs-how-we-revamped-hmpl-documentation-with-astro-starlight-19ce</guid>
      <description>&lt;p&gt;Today is one of the most important days in the future development of the template language. &lt;/p&gt;

&lt;p&gt;We have produced really comprehensive and clear &lt;a href="https://hmpl-lang.dev/introduction" rel="noopener noreferrer"&gt;documentation&lt;/a&gt; that looks very professional :)&lt;/p&gt;

&lt;p&gt;In this article, I would like to consider the process of its creation, as well as tell you &lt;strong&gt;how you can make it&lt;/strong&gt; and &lt;strong&gt;how it will be useful to you&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's get started!🏎️&lt;/p&gt;




&lt;h2&gt;
  
  
  👀 Why did we choose Astro Starlight for the new documentation?
&lt;/h2&gt;

&lt;p&gt;I would like to point out that this is not an advertisement, no one paid us. So, let's be honest. Previously, we used VuePress. It is a really cool tool for creating documentation, but we encountered problems that we will describe below.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. 💎 Design
&lt;/h3&gt;

&lt;p&gt;First of all, it's the design. Just compare the design there and here:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VuePress&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jcy3f64w4xyhd2k8vju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jcy3f64w4xyhd2k8vju.png" alt="VuePress"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Starlight&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fry9xv0qi5f7g2xz8t72x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fry9xv0qi5f7g2xz8t72x.png" alt="Starlight"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Different people like different designs. These are two good designs, but we used a similar design for about a year. We literally got tired of it, so we chose the first option as the most popular today.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. 🌊 Freshness
&lt;/h3&gt;

&lt;p&gt;Still, we understand that VuePress needs to be replaced either with VitePress or with Docus from NuxtLabs (which recently joined Vercel). This point, with a full understanding of the two projects, also played a huge role in the choice of the platform.&lt;/p&gt;

&lt;p&gt;We, one way or another, work on Vue for projects and are unlikely to choose something else for open source, but the fact is that we will not go anywhere from this design, which reminds us of it everywhere.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh83vdqehg6sbl3cnx7bi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh83vdqehg6sbl3cnx7bi.png" alt="astrojs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, when we looked at other platforms, it wasn't profitable for us to switch to anything other than Vue, but we also needed something new. Starlight came out somewhere around 2023 (or was actively starting to promote itself), so we decided it was a good option.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Support for old files
&lt;/h3&gt;

&lt;p&gt;All of VuePress was built on &lt;code&gt;.md&lt;/code&gt; files. It was important for us to transfer it to a platform where it would also be. In the case of Astro, it does support data files. It was only necessary to make a header for old files, but, in general, it is not critical.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: Introduction
description: Learn about HMPL
---

## How it works?

The HTML you use on your site is enhanced by adding special blocks that resemble components in syntax...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, a nice bonus in all this was that the problem with the &lt;code&gt;{{code}}&lt;/code&gt; construct was no longer relevant. HMPL uses the following construction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;{{#request}}{{/request}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we had to wrap this expression in a &lt;code&gt;pre&lt;/code&gt; tag quite often, so that it wouldn't cause errors when compiled into HTML. But, with Astro Starlight there is no such problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  📚 New in documentation
&lt;/h2&gt;

&lt;p&gt;In general, almost everything (except the content related to the technical part). New components: &lt;code&gt;Tabs&lt;/code&gt;, &lt;code&gt;Result&lt;/code&gt;, &lt;code&gt;Steps&lt;/code&gt; and so on, all this makes the documentation literally a work of art.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5kyrujw2tiwsu7epcuj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo5kyrujw2tiwsu7epcuj.png" alt="Steps"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With such components, it became much easier to understand how the module works. Previously, for the technical part, we used &lt;code&gt;ecmarkup&lt;/code&gt;, but then we realized that it would not be able to give full control over the technical documentation, but just show what is obtained.&lt;/p&gt;

&lt;p&gt;Also, almost all the texts were updated, a bunch of new things were added. It felt like a novel came out in terms of the number of words, not documentation 🥶&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚙️ How can you add this documentation to your project?
&lt;/h2&gt;

&lt;p&gt;First of all, you will need to install &lt;a href="https://nodejs.org/en/download" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; version 18 or higher, and run the command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx astro add starlight
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, you will need to configure the site config, which is located in &lt;code&gt;astro.config.mjs&lt;/code&gt;, we can only show ours as an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// @ts-check&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;astro/config&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;starlight&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@astrojs/starlight&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;vue&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@astrojs/vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;starlightThemeNova&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;starlight-theme-nova&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;site&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://hmpl-lang.dev&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;integrations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;vue&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="nf"&gt;starlight&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;HMPL Documentation&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Server-oriented customizable templating for JavaScript. Alternative to HTMX and Alpine.js.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;customCss&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/styles/main.css&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="na"&gt;logo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/assets/logo.svg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;expressiveCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;themes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;min-light&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;min-light&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;useStarlightDarkModeSwitch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;shiki&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;langAlias&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;hmpl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;Search&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./src/components/Stars.astro&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;editLink&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://github.com/hmpl-language/hmpl/edit/main/www/app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;favicon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;favicon.ico&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;social&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;github&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GitHub&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://github.com/hmpl-language/hmpl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="na"&gt;sidebar&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Start Here&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Introduction&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/introduction&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Getting Started&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/getting-started&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Installation&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/installation&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And, there are most of the sidebar and other parameters that are repeated, I will not indicate all 200+ lines here.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Conclusion
&lt;/h2&gt;

&lt;p&gt;When choosing a documentation platform, it is important to consider many different things: from your past work to the number of people in the team. If we were to make documentation purely in Vue, it would take us a couple of months. In this article, we tried to show what kind of documentation can be made and how you can make it as cool as ours (well, we think ours is cool 👽)&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Links:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hmpl-lang.dev/introduction" rel="noopener noreferrer"&gt;The documentation itself&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/vuepress?activeTab=code" rel="noopener noreferrer"&gt;VuePress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/@astrojs/starlight?activeTab=code" rel="noopener noreferrer"&gt;Starlight&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Thank you very much for reading this article ❤️!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What do you think of the new documentation? It will be interesting to know in the comments!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;P.S. Also, don't forget to help me and star HMPL!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hmpl-language/hmpl" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;🌱 Star HMPL&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>📢 HMPL-DOM v0.0.1 Released: Write Reactive HTML Without JavaScript</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Sun, 29 Jun 2025 21:19:34 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/hmpl-dom-v001-release-the-most-important-module-4783</link>
      <guid>https://hmpljs.forem.com/hmpljs/hmpl-dom-v001-release-the-most-important-module-4783</guid>
      <description>&lt;p&gt;Hello! This is not clickbait. I thought for a long time about what to call this article, but it is hard to convey in words what is felt. Therefore, I wrote simply as I felt.&lt;/p&gt;

&lt;p&gt;For a long year we have been supplementing the template language, but the range of applied use was quite limited. We developed within the framework of the template paradigm, but, in essence, it was correct, but in an applied &lt;a href="https://github.com/hmpl-language/hmpl-dom" rel="noopener noreferrer"&gt;project&lt;/a&gt; it is still quite difficult to implement this without something serious.&lt;/p&gt;

&lt;p&gt;By serious I mean a framework, or something like that, that supported the syntax by default, but, in fact, if jsx has react, then it is quite difficult to build a structure on it, since it itself is structural.&lt;/p&gt;

&lt;p&gt;Therefore, we took a different path, which I will try to describe in this article 🔎&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lpjzm33bm4gmvym0u1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lpjzm33bm4gmvym0u1l.png" alt="Repository"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Structural modules and the real DOM
&lt;/h2&gt;

&lt;p&gt;Whatever anyone says, the time of template languages ​​is a bit different. Today, many people look at artificial intelligence as something breakthrough. And it is, but the fact is that it is not everything in our world. About 10 years ago, there was active development of various template languages, but now you are more likely to find 1000 new AI projects than one with templates.&lt;/p&gt;

&lt;p&gt;And this is not surprising, because with the advent of jsx, ejs and handlebars, we can consider that this topic has exhausted itself and humanity can no longer come up with anything better. Maybe it is so, but only in some aspects. We interact with the server in the same way, and php to js, ​​no matter how much you want, you can’t normally attach it.&lt;/p&gt;

&lt;p&gt;So, as an experiment, we created this project to move this topic forward.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"container"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  {{#request src="/api/my-component.html"}}
    {{#indicator trigger="pending"}}
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Loading...&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    {{/indicator}}
  {{/request}}
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;HTMX, no matter what SEO techniques they use and how caricatured they are in some sense, have nevertheless proven over 10-12 years of work on the topic that this topic is truly relevant in development. Together with Alpine.js, we see that not all people want to work on frameworks. This is correct, but it is also difficult and cumbersome on the other hand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This topic&lt;/strong&gt;, for some reason, was actively developed in attributes 3-4 years ago, but &lt;strong&gt;for some reason no one looks at template languages&lt;/strong&gt;. It's as if the hype on them passed 10 years ago and everyone thinks that they are relics of the past, but this is not so.&lt;/p&gt;

&lt;p&gt;We believe that this topic is not forgotten, but we cannot deny the fact that today most of such projects are based on working with the real DOM. There is simply no escape from this.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔥 Hype on attributes
&lt;/h2&gt;

&lt;p&gt;Anyone who thinks that in the world of development &lt;strong&gt;hype can be out of nowhere is wrong&lt;/strong&gt;. Today, there are facts that in the state of the market today, people are not ready to switch to something more monumental, since it is easier to sit down at the framework. Therefore, working with the real DOM, when we connect only a couple of files - this is important. If you remember the same Docsify, to create documentation you do not need to install a bunch of packages that are not related to JS at all, as is done with Jekyll, this is the whole point.&lt;/p&gt;

&lt;p&gt;Therefore, no matter how much we develop the theme of the template language, in a vacuum it is quite difficult to use, therefore, in fact, an obvious decision was made to supplement the functionality with a new module, which is called &lt;strong&gt;hmpl-dom&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Example&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;template&lt;/span&gt; &lt;span class="na"&gt;hmpl&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
          {{#request src="/api/my-component.html"}}
            {{#indicator trigger="pending"}}
              &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"indicator"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Loading...&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
            {{/indicator}}
          {{/request}}
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/json5/dist/index.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/dompurify/dist/purify.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/hmpl-js/dist/hmpl.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/hmpl-dom/dist/hmpl-dom.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks to him, we combined the approach of a template language with working with a real DOM. I am convinced that attributes by definition, no matter how extensible they seem (like in Alpine.js, when you write expressions with functions there), they cannot be a full-fledged replacement.&lt;/p&gt;

&lt;p&gt;Yes, they have their advantages, but it's not about them, it's about working with the real DOM without js.&lt;/p&gt;




&lt;h2&gt;
  
  
  👀 What if I need to pass &lt;code&gt;RequestInit&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;No one will move away from js, even in such an implementation. Its meaning is in the choice of using js or not, as well as in the simplicity that is currently on the market.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;index.html&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&lt;/span&gt; &lt;span class="na"&gt;data-hmpl&lt;/span&gt; &lt;span class="na"&gt;data-config-id=&lt;/span&gt;&lt;span class="s"&gt;"clicker-config"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;data-action=&lt;/span&gt;&lt;span class="s"&gt;"increment"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"btn"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Click!&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&amp;gt;&lt;/span&gt;
      Clicks: {{#request src="/api/clicks" after="click:#btn"}}{{/request}}
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;script.js&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;init&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hmpl-dom&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;clicker-config&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;memo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;templateFunction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
          &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAttribute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;data-action&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can still pass everything that was done before. It's just another level of nesting, when we had it before only within one compile function, now in a whole connected chain of templates, where a separate templateFunction is created for each (yes, we wouldn't take outerHTML from the entire page, because that would be just stupid.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Links
&lt;/h2&gt;

&lt;p&gt;More about this project you can find here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/hmpl-language/hmpl-dom" rel="noopener noreferrer"&gt;Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hmpl-lang.dev/dom.html" rel="noopener noreferrer"&gt;Documentation Page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, if you want to support us, you can put a star on our main project. Thanks!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hmpl-language/hmpl" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;💎 Star HMPL ★&lt;/a&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Feedback
&lt;/h2&gt;

&lt;p&gt;We would be very grateful for your assessment of this module and the whole idea of ​​working with real DOM. ❤️&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thank you for reading this article!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>From 0 To 500 GitHub Stars: Our Year-Long Adventure🔥</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Thu, 19 Jun 2025 19:42:16 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/from-0-to-500-github-stars-our-year-long-adventure-1bg4</link>
      <guid>https://hmpljs.forem.com/hmpljs/from-0-to-500-github-stars-our-year-long-adventure-1bg4</guid>
      <description>&lt;p&gt;Hello everyone! Today, we would like to share a big event for us that happened the other day. Our project on GitHub received 500 stars!&lt;/p&gt;

&lt;p&gt;This is really cool because a lot of effort was put into this project not only by me, but also by dozens of other &lt;a href="https://github.com/hmpl-language/hmpl/graphs/contributors" rel="noopener noreferrer"&gt;contributors&lt;/a&gt; and thousands of people who liked, commented, and simply watched our journey for a long time.&lt;/p&gt;

&lt;p&gt;There was a lot, from deleting the repository to opening new plugins for WebPack and Vite. In this article, I will try to briefly tell our path and also how we managed to get so many stars.&lt;/p&gt;

&lt;p&gt;Well, let's not delay. Let's begin! 🚙&lt;/p&gt;




&lt;h2&gt;
  
  
  📚 History of &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;HMPL.js&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It all started with the idea of ​​combining old developments of the Cample.js framework with the template language. The first steps were quite meager and before what the pattern language is now, was still very far.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3pr1v1ucdmzjgueo8jyr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3pr1v1ucdmzjgueo8jyr.png" alt="history" width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There were several repositories and this is the second one we started in November last year. During this time, we spent most of the months simply developing the project, finishing some things. But only since February, we started to be active in social networks 🌐.&lt;/p&gt;

&lt;p&gt;We have already written several articles about how growth has been going on over this time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/hmpljs/our-project-got-100-first-stars-on-github-50jf"&gt;100 Stars&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/hmpljs/our-project-got-100-second-stars-on-github-2cl0"&gt;200 Stars&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today, it is interesting to look at the time, what was written then and now. There I tell in detail about what history was, but here there is no special sense in repeating.&lt;/p&gt;

&lt;h2&gt;
  
  
  👀 What is this project?
&lt;/h2&gt;

&lt;p&gt;If anyone doesn't know, then HMPL is a small template language for displaying UI from server to client. It is based on customizable requests sent to the server via fetch and processed into ready-made HTML. What does this mean? It's probably better to show it in code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;compile&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hmpl-js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;templateFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s2"&gt;`&amp;lt;div&amp;gt;
    &amp;lt;button class="getHTML"&amp;gt;Get HTML!&amp;lt;/button&amp;gt;
    {{#request
      src="/api/test"
      after="click:.getHTML"
      repeat=false
    }}
      {{#indicator trigger="pending"}}
        &amp;lt;p&amp;gt;Loading...&amp;lt;/p&amp;gt;
      {{/indicator}}
    {{/request}}
  &amp;lt;/div&amp;gt;`&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wrapper&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;elementObj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;templateFn&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;wrapper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;appendChild&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;elementObj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In essence, this is an add-on for HTML to implement a &lt;strong&gt;Server-Side Application&lt;/strong&gt;. That is, this is not a render on the server, but the case when we mount components from the server on the client.&lt;/p&gt;




&lt;h2&gt;
  
  
  🌱 Why do people give stars to a project on GitHub?
&lt;/h2&gt;

&lt;p&gt;I don't know myself, to be honest. Maybe the project is not bad, I don't know. But, in my opinion, first of all, people put stars because they &lt;strong&gt;see the project&lt;/strong&gt; on their screen to begin with.&lt;/p&gt;

&lt;p&gt;No matter how stupid it is, if a person doesn't see or hear something, then he doesn't know about it. But how can we make people know? Probably, writing on the Internet and telling people in person is the most effective option :)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsl9u6wzoa0v0mvmwsdy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpsl9u6wzoa0v0mvmwsdy.png" alt="search" width="200" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today, there are many ways to tell people about what you do. The most effective way for us to get the word out is dev.to, but you can also use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐈‍⬛ ProductHunt&lt;/li&gt;
&lt;li&gt;🦋 BlueSky&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And other social networks, there are simply a huge number of them today, just choose for any taste. The main thing, in any business, is frequency and quality. Do not think that one entry will be interesting to someone. This, as I have already realized on myself, &lt;strong&gt;is daily work&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  ❤️ And finally...
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0825t4tmowy9pu7ivkk6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0825t4tmowy9pu7ivkk6.png" alt="Thanks!" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And don't forget to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💎 Star &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;HMPL.js on GitHub&lt;/a&gt; to support the project&lt;/li&gt;
&lt;li&gt;💬 Join the &lt;a href="https://discord.gg/KFunMep36n" rel="noopener noreferrer"&gt;HMPL Discord community&lt;/a&gt; for wishes, solving problems, and just communication&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I replaced Alpine.js in my app with this alternative 🔥</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Tue, 17 Jun 2025 20:10:56 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/i-replaced-alpinejs-in-my-app-with-this-alternative-kgk</link>
      <guid>https://hmpljs.forem.com/hmpljs/i-replaced-alpinejs-in-my-app-with-this-alternative-kgk</guid>
      <description>&lt;p&gt;Typically, things like Alpine.js are compared to frameworks like Next.js because of their advantages over them.&lt;/p&gt;

&lt;p&gt;Now we’re diving into something far more &lt;strong&gt;relevant&lt;/strong&gt;. Both modules (Alpine.js and HMPL) work directly with HTML, and both are meant to bring logic closer to markup. That makes this comparison much more grounded.&lt;/p&gt;

&lt;p&gt;Today, we're replacing &lt;a href="https://github.com/alpinejs/alpine" rel="noopener noreferrer"&gt;Alpine.js&lt;/a&gt; in a project with &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;HMPL&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let’s get started! 🏎️&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ From simple examples
&lt;/h2&gt;

&lt;p&gt;Let’s start with the most basic clicker example. With Alpine.js, you’d probably write something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt;
  &lt;span class="na"&gt;x-data&lt;/span&gt;
  &lt;span class="na"&gt;x-fetch:clicker=&lt;/span&gt;&lt;span class="s"&gt;"{
    url: '/click',
    method: 'POST'
  }"&lt;/span&gt;
  &lt;span class="na"&gt;x-init=&lt;/span&gt;&lt;span class="s"&gt;"$fetch.clicker"&lt;/span&gt;
  &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"clicker-container"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Alpine Clicker&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;  
  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"click-count"&lt;/span&gt; &lt;span class="na"&gt;x-text=&lt;/span&gt;&lt;span class="s"&gt;"$fetch.clicker.data?.count ?? 0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;  
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"click-button"&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;click=&lt;/span&gt;&lt;span class="s"&gt;"$fetch.clicker"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Click&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks great and, most importantly, &lt;strong&gt;works&lt;/strong&gt;. Now let’s look at the HMPL.js version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;templateFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hmpl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`
    &amp;lt;div class="clicker-container"&amp;gt;
      &amp;lt;h1&amp;gt;HMPL Clicker&amp;lt;/h1&amp;gt;
      &amp;lt;div class="click-count" id="counter"&amp;gt;
        {{#request src="/click" after="click:#btn"}}
        {{/request}}
      &amp;lt;/div&amp;gt;
      &amp;lt;button id="btn"&amp;gt;Click!&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  `&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;clicker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;templateFn&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;body&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;clicker&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, we have two different philosophies: Alpine.js works declaratively inside the HTML itself, while HMPL compiles templates and dynamically renders them via JS. But the &lt;strong&gt;interface is conceptually similar&lt;/strong&gt; - actions tied to events, data updates in the DOM. The difference lies in control and flexibility.&lt;/p&gt;

&lt;p&gt;Also, it would be great if you supported the project with your star! Thanks ❤️!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hmpl-language/hmpl" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;💎 Star HMPL ★&lt;/a&gt;
 &lt;/p&gt;


&lt;h2&gt;
  
  
  🔍 Built-in limitations
&lt;/h2&gt;

&lt;p&gt;Alpine.js, while powerful in its simplicity, isn't inherently built around a server-oriented paradigm. It's a client enhancement tool meant for light interactivity, not full templating or server-side rendering. This makes it great for progressive enhancement but somewhat limiting when building applications that rely heavily on server-driven content.&lt;/p&gt;

&lt;p&gt;Because Alpine doesn't natively treat the server as a central part of the UI lifecycle, integrating complex request flows or handling server state often feels bolted on. Even with plugins like &lt;code&gt;@alpinejs/fetch&lt;/code&gt;, you're still mostly wiring client-side logic, manually coordinating fetch calls, and managing reactive state in the browser.&lt;/p&gt;

&lt;p&gt;This client-heavy approach can get cumbersome as your app scales. Form submissions, conditional loading, dynamic content updates, all require increasingly verbose JavaScript bindings or hacks involving &lt;code&gt;x-init&lt;/code&gt;, external methods, and nested directives. Alpine gives you control, but often without abstraction.&lt;/p&gt;

&lt;p&gt;In contrast, a templating language like HMPL is designed with the server at the core. It embraces server-rendered HTML and fetch-driven reactivity natively. You don't have to manually coordinate state or requests - it's declarative, context-aware, and built for scenarios where the server and the UI work in unison.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔗 Complex example
&lt;/h2&gt;

&lt;p&gt;Let’s take a more advanced example, a registration form with loading indicator. Here's what it might look like in Alpine.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;x-data=&lt;/span&gt;&lt;span class="s"&gt;"formComponent()"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"wrapper"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;submit.prevent=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-example"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"login"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Login: &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"login"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"login"&lt;/span&gt; &lt;span class="na"&gt;x-model=&lt;/span&gt;&lt;span class="s"&gt;"form.login"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&amp;lt;br/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Password: &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"password"&lt;/span&gt; &lt;span class="na"&gt;x-model=&lt;/span&gt;&lt;span class="s"&gt;"form.password"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"form-example"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt; &lt;span class="na"&gt;value=&lt;/span&gt;&lt;span class="s"&gt;"Register!"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;template&lt;/span&gt; &lt;span class="na"&gt;x-if=&lt;/span&gt;&lt;span class="s"&gt;"loading"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"indicator"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Loading...&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"response"&lt;/span&gt; &lt;span class="na"&gt;x-text=&lt;/span&gt;&lt;span class="s"&gt;"responseText"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;formComponent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;form&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;login&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="na"&gt;loading&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;responseText&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;submit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/register&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;form&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;responseText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's see how the same can be done in HMPL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;templateFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hmpl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`
    &amp;lt;div id="wrapper"&amp;gt;
      &amp;lt;form onsubmit="event.preventDefault();" id="form"&amp;gt;
        &amp;lt;div class="form-example"&amp;gt;
          &amp;lt;label for="login"&amp;gt;Login: &amp;lt;/label&amp;gt;
          &amp;lt;input type="text" name="login" id="login" required /&amp;gt;&amp;lt;br/&amp;gt;
          &amp;lt;label for="password"&amp;gt;Password: &amp;lt;/label&amp;gt;
          &amp;lt;input type="password" name="password" id="password" required /&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="form-example"&amp;gt;
          &amp;lt;input type="submit" value="Register!" /&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/form&amp;gt;
      &amp;lt;p&amp;gt;
        {{#request
          src="/api/register"
          after="submit:#form"
          repeat=true
        }}
          {{#indicator trigger="pending"}}
            &amp;lt;div class="indicator"&amp;gt;
              &amp;lt;p&amp;gt;Loading...&amp;lt;/p&amp;gt;
            &amp;lt;/div&amp;gt;
          {{/indicator}}
        {{/request}}
      &amp;lt;/p&amp;gt;
      &amp;lt;div id="response"&amp;gt;{{response.body}}&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  `&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initFn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;target&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;submitter&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="na"&gt;credentials&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;same-origin&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;templateFn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;initFn&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With HMPL, we gain &lt;strong&gt;granular control&lt;/strong&gt;. You can intercept the event, access the &lt;code&gt;FormData&lt;/code&gt;, customize headers, control indicators, all within a declarative template structure.&lt;/p&gt;




&lt;h2&gt;
  
  
  📊 Size comparison
&lt;/h2&gt;

&lt;p&gt;Let's not ignore the size difference.&lt;/p&gt;

&lt;p&gt;Alpine.js is incredibly small, and with minimal functionality it stays tiny. Here’s a quick visual:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 Alpine.js:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnyx5kfrf5d2gygfp9max.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnyx5kfrf5d2gygfp9max.png" alt="Alpine"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 HMPL:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftf9l7o7dbh96n4t8uahf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftf9l7o7dbh96n4t8uahf.png" alt="HMPL"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So yes, Alpine lose the size game. But the gap isn’t massive — and if you're building something more interactive or server-driven, the slight size increase might be worth the &lt;strong&gt;added flexibility&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Also, in a &lt;a href="https://github.com/hmpl-language/app-size-comparison" rel="noopener noreferrer"&gt;broader comparison&lt;/a&gt;, HMPL still performs surprisingly well:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0e0k47pz1878ovtgzdn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0e0k47pz1878ovtgzdn.png" alt="comparison"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, the smaller the feature set, the smaller the final JS bundle, but that also means you’ll need to write more imperative logic outside the HTML.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ Conclusion
&lt;/h2&gt;

&lt;p&gt;Alpine.js is a great choice for projects that need simple, inline reactivity without the complexity of larger frameworks. But in this article, I wanted to present an alternative.&lt;/p&gt;

&lt;p&gt;HMPL offers a &lt;strong&gt;more modern, customizable&lt;/strong&gt; approach to server-driven UI. If your app requires dynamic data handling, advanced request logic, or full fetch control — HMPL might be a better fit.&lt;/p&gt;

&lt;p&gt;In the end, it’s all about the &lt;strong&gt;right tool for the right job&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Thanks for reading this article ❤️!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What’s your take on this comparison? Let me know in the comments!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Useful links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;HMPL Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/alpinejs/alpine" rel="noopener noreferrer"&gt;Alpine.js Repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>🐜 HMPL.js: Small Template Language. Reduce the build size several times 📦</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Fri, 13 Jun 2025 16:09:18 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/hmpljs-small-template-language-reduce-the-build-size-several-times-k94</link>
      <guid>https://hmpljs.forem.com/hmpljs/hmpljs-small-template-language-reduce-the-build-size-several-times-k94</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;When you work with modern frameworks, the first question that comes up is the size of the bundle you generate. &lt;/p&gt;

&lt;p&gt;Yes, of course not first and foremost, but the client doesn't care how the developers do the project. He wants the site to load quickly!&lt;/p&gt;

&lt;p&gt;So, in this article I would like to look at a small template language that will help you make the same application, but with much less effort.&lt;/p&gt;

&lt;p&gt;Well, let's see what this project is 🔎&lt;/p&gt;




&lt;h2&gt;
  
  
  👀 Is there an example of reducing the build size?
&lt;/h2&gt;

&lt;p&gt;We'll take a specific application on &lt;a href="https://nextjs.org" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt; and &lt;a href="https://hmpl-lang.dev" rel="noopener noreferrer"&gt;HMPL.js&lt;/a&gt; and see how much it will weigh in the end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 Next.js build:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydt3kbxhj8o75lyd6o9q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydt3kbxhj8o75lyd6o9q.png" alt="Next.js"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;📦 HMPL.js build:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzmxg8et44ddfg1v84t4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbzmxg8et44ddfg1v84t4.png" alt="HMPL"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This build is &lt;strong&gt;10x smaller&lt;/strong&gt; than the Next.js build. Moreover, we keep the interface in its original form, without losing any advantages (except for indexing by robots).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1u8mjxo486dhka39fuy8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1u8mjxo486dhka39fuy8.png" alt="Interface"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is just a regular landing page without any frills. Just a couple of animations in the banner and a countdown for a limited offer.&lt;/p&gt;

&lt;p&gt;Also, it would be great if you supported the project with your star! Thanks ❤️!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hmpl-language/hmpl" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;💎 Star HMPL ★&lt;/a&gt;
 &lt;/p&gt;


&lt;h2&gt;
  
  
  📊 How does it compare to other modules?
&lt;/h2&gt;

&lt;p&gt;Obviously, it's not entirely fair to take Next.js, since it's a bit different, but nevertheless it's fair, because our goal is to make a site with a good interface, and for this purpose all means are good.&lt;/p&gt;

&lt;p&gt;But let's try to compare it with similar modules:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyt9mr5851h67yb29p5u6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyt9mr5851h67yb29p5u6.png" alt="Comparison"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here too it is clear that the applications from &lt;a href="https://github.com/hmpl-language/app-size-comparison" rel="noopener noreferrer"&gt;this&lt;/a&gt; test are smaller in the result, even if we compare them with Alpine.js, which essentially does the same thing.&lt;/p&gt;


&lt;h2&gt;
  
  
  🖋 What does the syntax of a template language look like?
&lt;/h2&gt;

&lt;p&gt;The template language provides the following block extension for HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"wrapper"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  {{#request src="/api/my-component.html"}}
    {{#indicator trigger="pending"}}
      &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"my-indicator"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Loading...&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    {{/indicator}}
  {{/request}}
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, we are describing a certain component (which is not really a component, since it is a helper block), but nevertheless, for general understanding it is perfect. Instead of it (like &lt;code&gt;outerHTML&lt;/code&gt;), we load the HTML that comes to us from the server.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Try this project
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Package Manager&lt;/strong&gt;: You can install it by typing &lt;code&gt;npm i hmpl-js&lt;/code&gt; in the terminal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CDN Method&lt;/strong&gt;: You can load these libraries directly from a CDN by embedding the following script tags in your HTML:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/json5/dist/index.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/dompurify/dist/purify.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://unpkg.com/hmpl-js/dist/hmpl.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Setup&lt;/strong&gt;: If you prefer offline usage, download the files and host them yourself - functionality remains identical.
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ✅ Our code is Open Source
&lt;/h2&gt;

&lt;p&gt;So you can take part in it too! We welcome activity and want to make this project better!&lt;/p&gt;

&lt;p&gt;GtiHub Repository: &lt;a href="https://github.com/hmpl-language/hmpl" rel="noopener noreferrer"&gt;https://github.com/hmpl-language/hmpl&lt;/a&gt;&lt;br&gt;
Website: &lt;a href="https://hmpl-lang.dev" rel="noopener noreferrer"&gt;https://hmpl-lang.dev&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Thank you very much for reading this article! I hope this project will be useful to you! ❤️&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;💬 &lt;em&gt;What do you think? It will be interesting to know in the comments!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>📢We did it...</title>
      <dc:creator>Anthony Max</dc:creator>
      <pubDate>Mon, 02 Jun 2025 07:23:29 +0000</pubDate>
      <link>https://hmpljs.forem.com/hmpljs/we-did-it-41hp</link>
      <guid>https://hmpljs.forem.com/hmpljs/we-did-it-41hp</guid>
      <description>&lt;p&gt;Hello everyone! Today is one of the most important days in the history of our project - we are &lt;a href="https://www.producthunt.com/posts/hmpl-js" rel="noopener noreferrer"&gt;launching on ProductHunt&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Over the course of a year, we created a framework, refined the syntax, added functionality, improved documentation, and much more!&lt;/p&gt;

&lt;p&gt;More than &lt;a href="https://github.com/hmpl-language/hmpl/graphs/contributors" rel="noopener noreferrer"&gt;20 contributors&lt;/a&gt; helped the project become a little better in code, I would really like not to lose their contribution, but to show everyone how cool it is done. In this article, we will talk about this&lt;/p&gt;

&lt;p&gt;Let's get started! 🏎️&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Preparing for launch
&lt;/h2&gt;

&lt;p&gt;Probably one of the longest sessions. It took me a week to create the pictures and video - this is the basis. But I think it was worth it.&lt;/p&gt;

&lt;p&gt;But first you need to come up with a description text, specify a tagline and upload a logo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F047kusxh62y2rry5wkas.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F047kusxh62y2rry5wkas.png" alt="Product name"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can specify an emoji in the product description, but it is better not to, and to do it only in the attached comment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1wp5ij90esohcke4f5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1wp5ij90esohcke4f5d.png" alt="Description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quite trivial fields that are filled in quickly. By the way, sometimes they are not saved, so prepare all the content at once.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎬 Launch Media
&lt;/h2&gt;

&lt;p&gt;So, about the pictures - this was one of the longest stages. To create something incomprehensible from scratch is not obvious, and it also has to show the product beautifully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2lyqy25dfgm746fjvym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu2lyqy25dfgm746fjvym.png" alt="Example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The complexity of our project is that it is not a Software As A Service product. I can't just throw in screenshots from the service and add text. Here I had to think about what would work well.&lt;/p&gt;

&lt;p&gt;The video took up most of the time. It's not clear what to do and how to do it.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/2Md6S9Cb1Q0"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;It seems like the video turned out well. All these transitions, of course, took a long time to make, but I think that this also looks good.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 About development
&lt;/h2&gt;

&lt;p&gt;We have been doing this project for a year now and have written many articles on this topic. Every major update leaves its mark, everything is built publicly.&lt;/p&gt;

&lt;p&gt;Many people helped the project become a little better, thank you! Some helped with code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv0gb88gzgegi47qpnvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv0gb88gzgegi47qpnvf.png" alt="Graph"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And someone with a comment, a like, a review of the project. I think this is important.&lt;/p&gt;




&lt;h2&gt;
  
  
  🐈‍⬛ A little bit about ProductHunt
&lt;/h2&gt;

&lt;p&gt;I like the atmosphere that has been built on this platform! Most small projects have received the most necessary thing - feedback on what you are doing.&lt;/p&gt;

&lt;p&gt;If you did something wrong, people can politely tell you about it. A bunch of forums on projects, an active community - all this makes this service one of the necessary ones for developers today.&lt;/p&gt;




&lt;h2&gt;
  
  
  🐜 Our launch
&lt;/h2&gt;

&lt;p&gt;You can support us on ProductHunt🌱:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.producthunt.com/posts/hmpl-js" class="crayons-btn crayons-btn--primary" rel="noopener noreferrer"&gt;💎 HMPL Launch&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptidhx19w38odufoesne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fptidhx19w38odufoesne.png" alt="ProductHunt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thank you very much for reading this article❤️!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
