<?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>DEV Community: Mister Gold</title>
    <description>The latest articles on DEV Community by Mister Gold (@bandantonio).</description>
    <link>https://dev.to/bandantonio</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%2Fuser%2Fprofile_image%2F1155150%2Fbfb9de41-cf79-4a6d-af92-ba2f786e486d.jpeg</url>
      <title>DEV Community: Mister Gold</title>
      <link>https://dev.to/bandantonio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bandantonio"/>
    <language>en</language>
    <item>
      <title>Aurora Borealis VS Code Theme</title>
      <dc:creator>Mister Gold</dc:creator>
      <pubDate>Mon, 11 Sep 2023 18:50:42 +0000</pubDate>
      <link>https://dev.to/bandantonio/aurora-borealis-vs-code-theme-1kpa</link>
      <guid>https://dev.to/bandantonio/aurora-borealis-vs-code-theme-1kpa</guid>
      <description>&lt;p&gt;Hello everyone,&lt;/p&gt;

&lt;p&gt;I would like to show you my first extension that I've created for VS Code some time ago - a color theme called &lt;a href="https://marketplace.visualstudio.com/items?itemName=mister-gold.aurora-borealis-theme"&gt;Aurora Borealis&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It is an elegant dark theme featuring two hand-picked color variations: Main and Calm. You can preview each of them by clicking the button under the screenshots below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main&lt;/strong&gt;:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jcazZFYc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/bandantonio/aurora-borealis-vscode-theme/raw/HEAD/showcase-main.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jcazZFYc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/bandantonio/aurora-borealis-vscode-theme/raw/HEAD/showcase-main.png" alt="Aurora Borealis" width="800" height="499"&gt;&lt;/a&gt; &lt;a href="https://vscode.dev/theme/mister-gold.aurora-borealis-theme"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zTEfS-HE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://img.shields.io/badge/-live%2520preview-blue%3Fstyle%3Dfor-the-badge%26logo%3Dvisual-studio-code%26logoColor%3Dwhite" alt="Live Preview" width="141" height="28"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Calm&lt;/strong&gt;:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SGPTEEHZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/bandantonio/aurora-borealis-vscode-theme/raw/HEAD/showcase-calm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SGPTEEHZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://github.com/bandantonio/aurora-borealis-vscode-theme/raw/HEAD/showcase-calm.png" alt="Aurora Borealis Calm" width="800" height="499"&gt;&lt;/a&gt; &lt;a href="https://vscode.dev/theme/mister-gold.aurora-borealis-theme/Aurora%20Borealis%20Calm"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ENDChPog--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://img.shields.io/badge/-calm%2520theme%2520live%2520preview-blue%3Fstyle%3Dfor-the-badge%26logo%3Dvisual-studio-code%26logoColor%3Dwhite" alt="Live Preview" width="231" height="28"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To install this theme in your VS Code instance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Ctrl/Cmd+Shift+P&lt;/code&gt;, type &lt;strong&gt;Color Theme&lt;/strong&gt; and select &lt;strong&gt;Preferences: Color Theme&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;dark themes&lt;/strong&gt; section, select &lt;strong&gt;Aurora Borealis&lt;/strong&gt; or &lt;strong&gt;Aurora Borealis Calm&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;I would be happy to hear your feedback and ideas you may have regarding this theme. You can share them in the comments below or in the &lt;a href="https://marketplace.visualstudio.com/items?itemName=mister-gold.aurora-borealis-theme"&gt;theme's Marketplace page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you like this theme, please give it a 5🌟 rating and share with your friends. &lt;/p&gt;

&lt;p&gt;Thank you! 💜🫶&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>showdev</category>
      <category>vscode</category>
      <category>themes</category>
    </item>
    <item>
      <title>Create extension pack for Visual Studio Code</title>
      <dc:creator>Mister Gold</dc:creator>
      <pubDate>Wed, 06 Sep 2023 21:47:18 +0000</pubDate>
      <link>https://dev.to/bandantonio/create-extension-pack-for-visual-studio-code-461k</link>
      <guid>https://dev.to/bandantonio/create-extension-pack-for-visual-studio-code-461k</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;I've been using VS Code since early 2016 not so long after its initial release. With all the features and customization capabilities it provides out-of-the-box, I strongly believe it's the best code editor to date. Not to mention the extensions ecosystem that makes VS Code almost almighty. You can find extensions for anything you may think of, and even if you haven't thought of something, there is still an extension for that. 😄 &lt;/p&gt;

&lt;p&gt;Once you get used to VS Code, you will have more extensions installed. At some point, you may even start crafting a custom list of your favorite extensions. They can range from general ones, to project or language-specific ones. As the list inevitably grows big, managing it becomes a bit of a hassle. Sometimes you can even forget what extensions you have installed, and what they do. 😄 How can you work around this? Well, one of the ways is to create your own extension pack.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the heck is an extension pack?
&lt;/h2&gt;

&lt;p&gt;An extension pack is a collection of extensions that you can install in one click. Bundling your extensions into a single package provides certain benefits. For example, you can have one pack with 'global' extensions, another pack for specific projects, etc. Or, you can have different packs for different activities, like, writing code, tests, documentation, etc. Coupled with VS Code Workspaces, extension packs give you more flexibility and control over your extensions.&lt;/p&gt;

&lt;p&gt;Extension packs are also useful for sharing your extensions with your friends or colleagues. Finally, you can create a pack to back up your extensions and then restore them on a new machine or after a fresh VS Code installation when you haven't configured sync yet (or if you don't want to use it).&lt;/p&gt;

&lt;p&gt;Well, long story short, let's get to the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To create your extension pack, you need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com/download" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt; or &lt;a href="https://code.visualstudio.com/insiders/" rel="noopener noreferrer"&gt;VS Code Insiders&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nodejs.org/en/download/" rel="noopener noreferrer"&gt;Node.js + npm&lt;/a&gt; and &lt;a href="https://git-scm.com/downloads" rel="noopener noreferrer"&gt;Git&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;(optional) To publish your extension pack, you need &lt;a href="https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token" rel="noopener noreferrer"&gt;Personal Access Token (PAT)&lt;/a&gt;. After completing this step, you should have your account created on the &lt;a href="https://marketplace.visualstudio.com" rel="noopener noreferrer"&gt;Visual Studio Marketplace&lt;/a&gt;, an organization in &lt;a href="https://dev.azure.com" rel="noopener noreferrer"&gt;Azure DevOps&lt;/a&gt; and Personal Access Token (PAT) generated.&lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;h2&gt;
  
  
  Create an extension pack
&lt;/h2&gt;

&lt;p&gt;In this tutorial, you will create a simple pack with a few extensions and then publish the pack to the Visual Studio Marketplace. This is how it will look like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;locally:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Ffds2nx00trz1967u40c8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ffds2nx00trz1967u40c8.png" alt="VS Code extension pack"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;after publishing:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fe6s0nxnee7itcdsxey2u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fe6s0nxnee7itcdsxey2u.png" alt="Extension page"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you want to check the source files right away, go to the &lt;a href="https://github.com/bandantonio/vscode-ext-pack-tutorial.git" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; that I created for this tutorial.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new folder for your extension pack (you can name it any way you want) and open it in VS Code.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the folder, create a &lt;code&gt;package.json&lt;/code&gt; file that is an extension &lt;a href="https://code.visualstudio.com/api/references/extension-manifest" rel="noopener noreferrer"&gt;manifest file&lt;/a&gt;. The content of the file is the following:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"my-first-pack"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"displayName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mister Gold Extension Pack"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.0.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"preview"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"publisher"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"mister-gold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"icon"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"icon.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"My own extension pack"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"categories"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Extension Packs"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"extensionPack"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"engines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"vscode"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^1.76.0"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"repository"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"git"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://github.com/bandantonio/vscode-ext-pack-tutorial.git"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;I want to point out the following important parameters:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;name&lt;/code&gt; - id of your extension pack.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;publisher&lt;/code&gt; - the name of the publisher. If you want to publish your extension pack, this must be the id of your account in Visual Studio Marketplace.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;extensionPack&lt;/code&gt; - list of extensions to include in your pack. Let's leave it empty for now.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;engines&lt;/code&gt; - VS Code version(s) that your extension pack is compatible with. Setting up the current version and onwards is good enough.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;repository&lt;/code&gt; - link to the repository where your extension pack is hosted. For now, to keep publishing simple, you can use your GitHub profile link.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Add an icon for your extension pack. The &lt;code&gt;icon&lt;/code&gt; parameter specified above, points to a non-existent file. You can use the &lt;a href="/images/create-vscode-extension-pack/icon.png"&gt;one from the screenshot&lt;/a&gt; or create your own. The icon size must be 128x128 pixels (256x256 for Retina displays).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a &lt;code&gt;README.md&lt;/code&gt; file with the following content:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Mister Gold Extension Pack&lt;/span&gt;

Hello world! this is my extension pack for VS Code.
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a &lt;code&gt;CHANGELOG.md&lt;/code&gt; file with the following content:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Changelog&lt;/span&gt;

All notable changes to the "my-first-pack" extension pack will be documented in this file.

&lt;span class="gu"&gt;## 0.0.1&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Initial release
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a &lt;code&gt;LICENSE&lt;/code&gt; file with the following content:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;MIT License
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's test the extension pack by creating a VSIX package using &lt;code&gt;@vscode/vsce&lt;/code&gt; CLI tool. For convenience, you can use the &lt;code&gt;npx&lt;/code&gt; command to run the tool without installing it globally:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @vscode/vsce package
Need to &lt;span class="nb"&gt;install &lt;/span&gt;the following packages:
  @vscode/vsce
Ok to proceed? &lt;span class="o"&gt;(&lt;/span&gt;y&lt;span class="o"&gt;)&lt;/span&gt; y
 DONE  Packaged: /vscode-extension-pack/my-first-pack-0.0.1.vsix &lt;span class="o"&gt;(&lt;/span&gt;7 files, 5.44KB&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, you should see a new file in your folder: &lt;code&gt;my-first-pack-0.0.1.vsix&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fv054zo2yc2h4303jw3zl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fv054zo2yc2h4303jw3zl.png" alt="VSIX package created"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To install the package, execute the following command in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# if you use VS Code&lt;/span&gt;
code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; my-first-pack-0.0.1.vsix

&lt;span class="c"&gt;# if you use VS Code Insiders&lt;/span&gt;
code-insiders &lt;span class="nt"&gt;--install-extension&lt;/span&gt; my-first-pack-0.0.1.vsix
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, you should see the extension pack in the list of installed extensions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fo8dt766i67yzw3a92wy2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fo8dt766i67yzw3a92wy2.png" alt="Extension pack installed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So far, so good! At the moment, the extension does nothing useful yet, but it works. Let's proceed to the most interesting part and add some extensions to the pack.&lt;/p&gt;

&lt;p&gt;But first, you need to uninstall the 'dummy' extension pack. To do it, you need to use the extension's id that you can find under the More Info section as &lt;code&gt;Identifier&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fegfzllpc3j0t8vubnriy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fegfzllpc3j0t8vubnriy.png" alt="Extension pack id"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TIP:&lt;/strong&gt; Extension ID consists of the &lt;code&gt;publisher&lt;/code&gt; and &lt;code&gt;name&lt;/code&gt; parameters from the &lt;code&gt;package.json&lt;/code&gt; file and has the following format: &lt;code&gt;publisher.name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can also right-click on the extension in the Extensions view and select &lt;code&gt;Copy Extension ID&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# if you use VS Code&lt;/span&gt;
code &lt;span class="nt"&gt;--uninstall-extension&lt;/span&gt; mister-gold.my-first-pack

&lt;span class="c"&gt;# if you use VS Code Insiders&lt;/span&gt;
code-insiders &lt;span class="nt"&gt;--uninstall-extension&lt;/span&gt; mister-gold.my-first-pack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding extensions to your pack is a process of adding their ids to the &lt;code&gt;extensionPack&lt;/code&gt; section of your &lt;code&gt;package.json&lt;/code&gt; file. For this tutorial, I will add the following extensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Live Server (id: &lt;code&gt;ritwickdey.liveserver&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Material Icon Theme (id: &lt;code&gt;pkief.material-icon-theme&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Docker (id: &lt;code&gt;ms-azuretools.vscode-docker&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Astro (id: &lt;code&gt;astro-build.astro-vscode&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can follow along with the same extensions or choose your own. With the extensions listed above, the &lt;code&gt;extensionPack&lt;/code&gt; section of the &lt;code&gt;package.json&lt;/code&gt; file will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"extensionPack"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"ritwickdey.liveserver"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"pkief.material-icon-theme"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"ms-azuretools.vscode-docker"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"astro-build.astro-vscode"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you need to create a new VSIX package and install it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @vscode/vsce package                                  
 DONE  Packaged: /vscode-extension-pack/my-first-pack-0.0.1.vsix &lt;span class="o"&gt;(&lt;/span&gt;7 files, 5.57KB&lt;span class="o"&gt;)&lt;/span&gt;

code-insiders &lt;span class="nt"&gt;--install-extension&lt;/span&gt; my-first-pack-0.0.1.vsix
Installing extensions...
Extension &lt;span class="s1"&gt;'my-first-pack-0.0.1.vsix'&lt;/span&gt; was successfully installed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the Extensions view and check that all the extensions that you've added to your pack are installed:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Flwl5tyak04epsi6pqlmo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Flwl5tyak04epsi6pqlmo.png" alt="Pack installed"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also note the grey badge in the bottom left of the pack icon. It shows the number of extensions the pack includes.&lt;/p&gt;

&lt;p&gt;Great! At this point, you have a working extension pack that you can customize any way you want and share as a VSIX package. If this scenario is good enough for you, feel free to stop reading this tutorial here. For those who want a complete experience, let's proceed to the next step and publish the extension pack to the Visual Studio Marketplace.&lt;/p&gt;

&lt;h2&gt;
  
  
  Publish an extension pack
&lt;/h2&gt;

&lt;p&gt;If you're reading this section, it means that you've already completed the second step in the Prerequisites section. If not, please do it now.&lt;/p&gt;

&lt;p&gt;You can publish your extension pack in two ways: using the &lt;code&gt;@vscode/vsce&lt;/code&gt; CLI tool or using the Visual Studio Marketplace website. But who cares about the website? Real ninjas use the command line.&lt;/p&gt;

&lt;p&gt;Before publishing your extension pack, you can test your publisher's PAT using &lt;code&gt;vsce&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# vsce login &amp;lt;publisher name&amp;gt;&lt;/span&gt;
npx @vscode/vsce login mister-gold

https://marketplace.visualstudio.com/manage/publishers/
Personal Access Token &lt;span class="k"&gt;for &lt;/span&gt;publisher &lt;span class="s1"&gt;'mister-gold'&lt;/span&gt;: &lt;span class="k"&gt;****************************************************&lt;/span&gt;

The Personal Access Token verification succeeded &lt;span class="k"&gt;for &lt;/span&gt;the publisher &lt;span class="s1"&gt;'mister-gold'&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you are ready to publish your extension pack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @vscode/vsce publish
 INFO  Publishing &lt;span class="s1"&gt;'mister-gold.my-first-pack v0.0.1'&lt;/span&gt;...
 INFO  Extension URL &lt;span class="o"&gt;(&lt;/span&gt;might take a few minutes&lt;span class="o"&gt;)&lt;/span&gt;: https://marketplace.visualstudio.com/items?itemName&lt;span class="o"&gt;=&lt;/span&gt;mister-gold.my-first-pack
 INFO  Hub URL: https://marketplace.visualstudio.com/manage/publishers/mister-gold/extensions/my-first-pack/hub
 DONE  Published mister-gold.my-first-pack v0.0.1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! Your extension pack was successfully published and it is now accessible via the specified Extension URL.&lt;/p&gt;

&lt;p&gt;Check that now your extension pack is available:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;in VS Code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fn7nmhn9ho10o1bwrwrsz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fn7nmhn9ho10o1bwrwrsz.png" alt="In search 1"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.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%2Fnwwc2liakdtk997d0n36.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnwwc2liakdtk997d0n36.png" alt="Extension page"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;in Marketplace:&lt;br&gt;
&lt;a href="https://media.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%2Fk0rdw8im533jth165dar.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fk0rdw8im533jth165dar.png" alt="In Marketplace"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; The currently published extension may differ from the one showed in this tutorial. Please refer to the &lt;a href="https://github.com/bandantonio/vscode-ext-pack-tutorial.git" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; for the exact version of source files used when creating this tutorial.&lt;/p&gt;




&lt;p&gt;Well, that's it for this article. Thanks for reading. I hope you enjoyed it!&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>extensions</category>
      <category>development</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Stop Using Markdown For Documentation</title>
      <dc:creator>Mister Gold</dc:creator>
      <pubDate>Wed, 06 Sep 2023 20:37:29 +0000</pubDate>
      <link>https://dev.to/bandantonio/stop-using-markdown-for-documentation-1l20</link>
      <guid>https://dev.to/bandantonio/stop-using-markdown-for-documentation-1l20</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://mister-gold.pro/posts/do-not-use-markdown-for-docs/" rel="noopener noreferrer"&gt;Originally published in 2018&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hi everyone!&lt;/p&gt;

&lt;p&gt;Today I want to explain why Markdown is a poor writing tool that you should avoid using in your documentation.&lt;/p&gt;

&lt;p&gt;Markdown is the most renowned lightweight markup language on the Internet. It is used in readme documents, introduction guides, wiki pages, blog posts, comments. Its popularity is based on simplicity and low writing threshold. You can learn all the syntax in &lt;a href="http://commonmark.org/help/" rel="noopener noreferrer"&gt;60 seconds&lt;/a&gt; and start writing your first document with your favorite IDE almost in no time. This is especially good when composing quick notes to describe what the product does and basic usage commands. GitHub and &lt;a href="https://mister-gold.pro/posts/pelican-on-gitlab-pages/" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt; even allow developers to automatically initiate new repositories with README.md file, though both projects support a multitude of languages, including Asciidoc and reStructuredText.&lt;/p&gt;

&lt;p&gt;Let me guess your question - how can such a popular tool be so bad? Does it really have many drawbacks? In fact, there are more of them than you might imagine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does Markdown fail?
&lt;/h2&gt;

&lt;p&gt;I would like to outline the most annoying and frustrating limitations that may turn your experience when writing technical documentation with Markdown into a nightmare.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lack of specification&lt;/strong&gt;. Since its launch in 2004, Markdown has had no technical specification except for that defined by John Gruber in his &lt;a href="https://daringfireball.net/projects/markdown/" rel="noopener noreferrer"&gt;blog post&lt;/a&gt;. The absence of strong guidelines forced different projects to create their own rules of how Markdown should be parsed. As the result, the base Markdown syntax can have an extra set of features available only in a particular specification. For example, abbreviations or footnotes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Flavors&lt;/strong&gt;. To mitigate the existing limitations due to the lack of specification, projects (especially static site generators) built on top of Markdown introduce new flavors with their own syntax. Currently, the list of flavors contains &lt;a href="https://github.com/commonmark/CommonMark/wiki/Markdown-Flavors" rel="noopener noreferrer"&gt;41(!) entries&lt;/a&gt;. It is obvious that some of these flavors are incompatible with each other or even incomplete, so you have to keep in mind which flavor version you use to avoid syntax and build mistakes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Extensibility&lt;/strong&gt;. Markdown doesn't have an extension system that would allow you to extend the language without affecting the way it is parsed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Semantic Meaning&lt;/strong&gt;. With Markdown you can only write text. It means that if you need to grab the reader's attention with some kind of notes or tips, you have to embed HTML. The lack of semantic support is a problem for a few reasons:

&lt;ul&gt;
&lt;li&gt;Markdown is now dependent on specific HTML classes, and page design&lt;/li&gt;
&lt;li&gt;Document content is no longer portable to other output formats&lt;/li&gt;
&lt;li&gt;Conversion to other markup tools and page designs becomes much harder&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lock-In and Lack of Portability&lt;/strong&gt;. The tons of flavors and the lack of semantic support results in a lock-in. The more documentation you have, the more you are tied to the existing configuration. After that, it is hard to migrate to another tool, as custom-defined HTML classes and flavor's features won't work outside the current set of tools and page designs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Any alternatives?
&lt;/h2&gt;

&lt;p&gt;Markdown has two serious competitors: reStructuredText (rST) and AsciiDoc. Both are very similar in syntax and have a stronger set of features than Markdown. And the most important - both are designed to create documentation. I was using these plain-text formats for some time and Asciidoc appeared to be more interesting to me. So, let's give it a small overview.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does AsciiDoc succeed?
&lt;/h2&gt;

&lt;p&gt;AsciiDoc is deprived of the shortcomings I mentioned above for Markdown. In addition, AsciiDoc has some killing features that don't exist in Markdown, including:&lt;/p&gt;

&lt;h3&gt;
  
  
  Code Blocks
&lt;/h3&gt;

&lt;p&gt;AsciiDoc allows you to add "live" code snippets directly from source files. With this kind of inclusion, you don't have to worry about outdated examples in documentation as they will be updated automatically once the source code is changed. For example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

include::source_code.js []


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It is also possible to include a part of a source file using &lt;code&gt;tag&lt;/code&gt; attribute. So, you place the section that should be included between these tags:&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;// tag::code_example[]&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;num2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;num2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// end::code_example[]&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and then include this section using &lt;code&gt;include&lt;/code&gt; directive:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

include::source_code.js[tag=code_example]


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Attributes
&lt;/h3&gt;

&lt;p&gt;Attributes are used to enable internal features or hold replacement content like variables. For example:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

[options="header,footer,autowidth"]
|===
| Cell A | Cell B
|===


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The example above shows three defined attributes for a table. More details about tables I described here.&lt;/p&gt;

&lt;p&gt;Another example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

:toc: right
:document_version: 1.1.0


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The first attribute displays Table of Contents on the right-hand side of the main content, whereas the second one includes a dynamic value of the document version within the content:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

The current document version is {document_version}.


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In AsciiDoc, each element has its own set of attributes that allows you to flexibly configure this element. For example, with attributes for images you can add an alternative title, dimensions, external link, define floating and role. In Markdown, the only way to do the same is to use inline HTML.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conditional directives
&lt;/h3&gt;

&lt;p&gt;Attributes are the key to another cool AsciiDoc feature: conditional content inclusion. With special directives &lt;code&gt;ifdef&lt;/code&gt;, &lt;code&gt;ifndef&lt;/code&gt;, and &lt;code&gt;ifeval&lt;/code&gt; you can control what content should be displayed depending on certain conditions are met.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;ifdef&lt;/code&gt; directive to show content if the specified attribute is set:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

ifdef::github[]
This content will be displayed for GitHub users only.
endif::[]


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Conversely, &lt;code&gt;ifndef&lt;/code&gt; directive is used to hide content if the specified attribute is not set:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

ifdef::github[]
This content will not be displayed for GitHub users.
endif::[]


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;ifeval&lt;/code&gt; directive shows content if the expression inside the square brackets evaluates to &lt;code&gt;true&lt;/code&gt;. This may be helpful to show instructions only for particular versions of documentation:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

ifeval::[{api_version} &amp;lt; 2.0.0]
If you want to use API methods available in version {api_version}, use the following endpoint: {% raw %}`https://example.com/api/v1/
endif::[]
```

### Building Blocks

Building blocks are special components to include non-paragraph text, such as code listings, quotes, tables, etc. This gives you a greater flexibility in adding versatile content in your document.

For example, you can add a listing block like this:

```
----
This is an example of a _listing block_.
The content inside is displayed as &amp;lt;pre&amp;gt; text.
----
```

or like this by adding callouts for additional information right in the sample:

```
[source,ruby]
----
require 'asciidoctor'  # &amp;lt;1&amp;gt;

Asciidoctor.convert_file 'mysample.adoc'  # &amp;lt;2&amp;gt;
----
&amp;lt;1&amp;gt; Imports the library
&amp;lt;2&amp;gt; Reads, parses, and converts the file
```

![Asciidoctor-callouts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qtcq5i4sm9bmm26byc92.png)

Another powerful block is an _open block_. It can act as any other block and contain any information you want. This may be useful as a non-intrusive way of including content. For example:

```
[sidebar]
.Related information
--
This is aside text.

It is used to present information related to the main content.
--
```

### Admonitions

AsciiDoc supports 5 types of admonitions out-of-the-box: Note, Tip, Important, Caution, Warning. The great thing here is that admonition can also encapsulate any block content. If you remember, in Markdown admonitions are some sort of blockquotes and writing a section that includes examples with special formatting is a total disappointment. In AsciiDoc, you just add the desired content with the selected type of the admonition.

### IDs, anchors, and classes

In Markdown (I mean, base syntax), the only thing you can do is to override the auto-generated heading anchor with your own user-friendly slug. With AsciiDoc, you can add a custom anchor almost anywhere: on a section title or discrete heading, on a paragraph, on a block, on a link or inline image, on listing or literal block, on a phrase, and so forth.

For example:

ID for a paragraph

```
[[notice]]
This paragraph gets a lot of attention.

or

[#notice]
This paragraph gets a lot of attention.
```

Furthermore, classes and additional attributes are available for links. The base syntax looks as follows:

```
link:url[optional link text, optional target attribute, optional role attribute]
```

So, you can write something like that:

```
Mister Gold Blog was created by https://mister-gold.pro/[*Antonio*^, role="green"].
```

and receive a link with bold green text that will be opened in a new tab. Again, these manipulations are possible with no hints of inline HTML or hardcoded CSS classes in it.

![Asciidoctor-link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a9r8b2z3d4lsf6xwudhh.png)

### Tables

Tables are available in Markdown as well. But what can you do with them? Align content... aaaand... that's it. Asciidoc provides a variety of ways to control the size, style, and layout of content within columns. Span over columns and rows, add nested tables, duplicate content across columns, and even display table in landscape mode - I bet this is the best experience with table formatting you ever had.

Some examples:

**Different table width**

```
[cols="50,20,30"]
|===
|Cell in column 1, row 1
|Cell in column 2, row 1
|Cell in column 3, row 1

|Cell in column 1, row 2
|Cell in column 2, row 2
|Cell in column 3, row 2
|===
```

![Asciidoctor-table-width](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hkd1rearb80mhlwahzub.png)

**Spanned rows**

```
|===

|Cell in column 1, row 1 |Cell in column 2, row 1 |Cell in column 3, row 1

.2+|Content in a single cell that spans rows 2 and 3
|Cell in column 2, row 2
|Cell in column 3, row 2

|Cell in column 2, row 3
|Cell in column 3, row 3

|===
```

![Asciidoctor-table-spanned](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfd08yw7gwy5z7aifhqf.png)

**Nested table**

```
[cols="1,2a"]
|===
| Col 1 | Col 2

| Cell 1.1
| Cell 1.2

| Cell 2.1
| Cell 2.2

[cols="2,1"]
!===
! Col1 ! Col2

! C11
! C12

!===

|===
```

![Asciidoctor-table-nested](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gbsj9p0l5pn6ogey5g1y.png)

### Other

Besides the joker features that stand out, AsciiDoc also has lots of syntax "tricks" that make documents more consistent. I will not dive into too many details here, just list some of them:

* hard breaks: you no longer need to insert blank lines to separate two paragraphs or pieces of content. Just add a plus sign at the end of the line and you're done!
* list continuation: add a descriptive paragraph or a building block directly to the parent or child list items.
* block titles: a small visual enhancement that makes content more readable.
* lists: with the help of built-in attributes you can make interesting modifications, like defining the starting number, creating a list with reversed numbering, or even a list with command listing without any text.
* math equations and formulas: to insert a math equation of any complexity, just set the `stem` attribute in the document’s header.

These tricks are almost unlimited - you will find more cool aspects, as you learn [AsciiDoc](https://asciidoctor.org/docs/asciidoc-writers-guide/) better.

## Conclusion

Actually, I was surprised by the fact that so many people think Markdown is a really powerful tool for documentation. Especially, considering the number of articles with the similar topic that appear on Medium. The premises for all these stories are almost identical. You start with a simple document or a set of documents. At this point, the instinct to choose Markdown is good. The fast learning curve and primitive syntax seem to be a winning combination. However, as your documentation evolves and you need something more complex, Markdown simplicity becomes the greatest shortcoming. Ultimately, you end up using flavors (to overcome native limitations) that wreck portability or searching for better alternatives.

It reminded me of two interesting blog posts that I found some time ago. In the first one, Eric Holscher (the co-founder of Read the Docs and Write the Docs) told [why you shouldn't use Markdown for documentation](http://ericholscher.com/blog/2016/mar/15/dont-use-markdown-for-technical-docs/). His article looked convincing, as I tend to trust the opinion of a person who has arguments against Markdown, while he is working on a product that supports both Markdown and reStructuredText. In the second [article](https://www.dabapps.com/blog/why-i-use-markdown-for-documentation/), Tom Christie tried to refute Eric's arguments. But his arguments were rather controversial as Tom described only his cases to use Markdown. The answer why Tom was sticking to Markdown was clear - his project is large (hosted with MkDocs), but has nothing more than code blocks under the hood. Markdown is good enough here, for sure.

As I said before, Markdown has lots of limitations out-of-the-box that cannot be resolved based on the existing CommonMark specifications. For example, sections reusage, source code inclusion or dynamic variables. As the result, Markdown fits only for creating basic documents like READMEs or simple knowledge bases.

AsciiDoc, in turn, offers better semantic richness, standardization, and support of multiple output formats (HTML, DocBook, PDF, and ePub). It also supports a broader range of syntax than Markdown, so the main focus was set on ensuring the maximum reusability of the content, whereas the syntax was designed to be extended as a core feature. This truly makes AsciiDoc the right investment as a complete, all-sufficient tool for creating documentation of any size, including auto-generated API docs.

And finally...

[According to John Gruber](https://daringfireball.net/projects/markdown/syntax#html), the inventor of Markdown:

&amp;gt; Markdown's syntax is intended for one purpose: to be used as a format for writing for the web.

So, I want to finish this article with the simplest conclusion ever:

&amp;gt; Do not use Markdown for things it was not designed to do. For example, to write documentation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>documentation</category>
      <category>markdown</category>
      <category>development</category>
      <category>writing</category>
    </item>
  </channel>
</rss>
