<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ markdown - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ markdown - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Fri, 08 May 2026 11:09:48 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/markdown/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Fix a Failing GitHub PR: Debugging CI, Lint Errors, and Build Errors Step by Step ]]>
                </title>
                <description>
                    <![CDATA[ While many guides explain how to set up Continuous Integration pipelines, not very many show you how to debug them when things go wrong across multiple layers. This is a common experience when contrib ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-fix-failing-github-pr-ci-lint-build-errors/</link>
                <guid isPermaLink="false">69e9033dbca83cce6c5f0209</guid>
                
                    <category>
                        <![CDATA[ GitHub ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ci-cd ]]>
                    </category>
                
                    <category>
                        <![CDATA[ debugging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Devops ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ qacheampong ]]>
                </dc:creator>
                <pubDate>Wed, 22 Apr 2026 17:19:57 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/uploads/covers/5e1e335a7a1d3fcc59028c64/29733bad-98af-4d6e-9fb6-93d55e8f87fd.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>While many guides explain how to set up Continuous Integration pipelines, not very many show you how to debug them when things go wrong across multiple layers.</p>
<p>This is a common experience when contributing to open source: you make a small change, open a pull request, and suddenly everything fails.</p>
<p>Not just one check, but multiple:</p>
<ul>
<li><p>Lint errors</p>
</li>
<li><p>YAML validation issues</p>
</li>
<li><p>Build failures</p>
</li>
<li><p>Deployment failures</p>
</li>
</ul>
<p>Even more confusing, you may see errors in parts of the codebase you didn’t modify.</p>
<p>In this article, you'll learn how to debug these issues step by step. The goal is not just to fix one pull request, but to understand how CI systems validate your changes.</p>
<p>This guide is based on a real debugging experience from contributing to an open source documentation project.</p>
<p>While this example comes from a documentation project, the debugging workflow applies to many repositories that use CI pipelines, linting tools, and automated builds.</p>
<h3 id="heading-table-of-contents">Table of Contents:</h3>
<ul>
<li><p><a href="#heading-understanding-the-ci-pipeline-whats-actually-happening">Understanding the CI Pipeline (What’s Actually Happening)</a></p>
</li>
<li><p><a href="#heading-how-a-ci-pipeline-processes-your-pull-request">How a CI Pipeline Processes Your Pull Request</a></p>
</li>
<li><p><a href="#heading-a-practical-debugging-workflow">A Practical Debugging Workflow</a></p>
<ul>
<li><p><a href="#heading-step-1-fix-authentication-and-permission-issues">Step 1: Fix Authentication and Permission Issues</a></p>
</li>
<li><p><a href="#heading-step-2-run-lint-checks-locally">Step 2: Run Lint Checks Locally</a></p>
</li>
<li><p><a href="#heading-step-3-fix-common-markdown-lint-errors">Step 3: Fix Common Markdown Lint Errors</a></p>
</li>
<li><p><a href="#heading-step-4-fix-yaml-inside-markdown-code-blocks">Step 4: Fix YAML Inside Markdown Code Blocks</a></p>
</li>
<li><p><a href="#heading-step-5-fix-build-errors-after-lint-passes">Step 5: Fix Build Errors After Lint Passes</a></p>
</li>
<li><p><a href="#heading-step-6-debug-cascading-ci-failures">Step 6: Debug Cascading CI Failures</a></p>
</li>
<li><p><a href="#heading-step-7-handle-git-issues-during-ci-debugging">Step 7: Handle Git Issues During CI Debugging</a></p>
</li>
</ul>
</li>
<li><p><a href="#heading-key-takeaways">Key Takeaways</a></p>
</li>
<li><p><a href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h3 id="heading-prerequisites"><strong>Prerequisites</strong></h3>
<p>To follow this guide, you should have:</p>
<ul>
<li><p>Basic familiarity with Git and pull requests</p>
</li>
<li><p>A GitHub account</p>
</li>
<li><p>Some exposure to CI/CD concepts (helpful but not required)</p>
</li>
</ul>
<h2 id="heading-understanding-the-ci-pipeline-whats-actually-happening"><strong>Understanding the CI Pipeline (What’s Actually Happening)</strong></h2>
<p>In many projects, you will see the term CI/CD, which stands for Continuous Integration and Continuous Deployment (or Delivery).</p>
<p>In this guide, we'll focus specifically on the CI part – that is, Continuous Integration. This refers to the automated checks that run when you push code or open a pull request. These checks validate your changes before they're merged into the main codebase.</p>
<p>CD (Continuous Deployment/Delivery), on the other hand, typically handles what happens after those checks pass, such as deploying the application.</p>
<p>Understanding this distinction is important because most of the issues we debug in this guide happen during the CI stage.</p>
<p>Most repositories run multiple automated checks when you open a pull request:</p>
<ul>
<li><p><strong>Linting tools</strong> (for example, markdownlint, yamllint) enforce formatting rules</p>
</li>
<li><p><strong>Build systems</strong> (for example, mdBook) validate structure and generate output</p>
</li>
<li><p><strong>Deployment checks</strong> (for example, Netlify) ensure that the site can be built and served</p>
</li>
<li><p><strong>Merge controllers</strong> (for example, Tide) enforce approval policies</p>
</li>
</ul>
<p>A key point to remember: CI systems validate the <strong>entire set of files in your commit,</strong> not just the lines you changed.</p>
<h2 id="heading-how-a-ci-pipeline-processes-your-pull-request"><strong>How a CI Pipeline Processes Your Pull Request</strong></h2>
<p>When you push code or open a pull request, the CI pipeline runs several checks in sequence.</p>
<p>Let’s visualize how these checks are connected in a typical CI pipeline.</p>
<img src="https://cdn.hashnode.com/uploads/covers/69d09527e466e2b762fdff59/9cecca6e-e000-46e3-a40e-cb353fc89ff8.png" alt="A CI pipeline diagram showing lint, build, and deployment steps with failure loops returning to code fixes." style="display:block;margin:0 auto" width="600" height="400" loading="lazy">

<p>Figure: A simplified CI pipeline showing how linting, build, and deployment checks are executed sequentially.</p>
<p>The above diagram shows a sequential CI pipeline with feedback loops, where failures at any stage return you to fix the issue before continuing.</p>
<p>Let’s break down what this diagram shows:</p>
<ol>
<li><p>You start by pushing code or opening a pull request.</p>
</li>
<li><p>The CI pipeline begins running automated checks.</p>
</li>
<li><p>The first set of checks typically includes linting tools like markdownlint or yamllint.</p>
<ul>
<li><p>If linting fails, the pipeline stops, and you must fix formatting issues before continuing.</p>
</li>
<li><p>If linting passes, the pipeline moves to the build step (for example, mdBook in documentation projects).</p>
</li>
<li><p>If the build fails, it usually means there is a structural issue, such as duplicate entries or invalid references.</p>
</li>
</ul>
</li>
<li><p>After a successful build, deployment checks (such as Netlify previews) run.</p>
<ul>
<li>If deployment fails, the issue is often related to configuration or build output.</li>
</ul>
</li>
<li><p>If all steps pass, the pull request becomes ready for review.</p>
</li>
</ol>
<h2 id="heading-a-practical-debugging-workflow"><strong>A Practical Debugging Workflow</strong></h2>
<h3 id="heading-step-1-fix-authentication-and-permission-issues">Step 1: Fix Authentication and Permission Issues</h3>
<p>Before CI runs, your push can fail due to authentication errors.</p>
<p>Example error:</p>
<pre><code class="language-shell">refusing to allow a Personal Access Token to create or update workflow
</code></pre>
<p>This happens because GitHub requires special permissions when your commit includes files under:</p>
<pre><code class="language-shell">.github/workflows/
</code></pre>
<p>The solution is to regenerate your Personal Access Token (PAT) with:</p>
<ul>
<li><p><code>repo</code> access</p>
</li>
<li><p><code>workflow</code> permission</p>
</li>
</ul>
<h3 id="heading-step-2-run-lint-checks-locally">Step 2: Run Lint Checks Locally</h3>
<p>Relying only on CI feedback slows you down because you have to push changes and wait for the pipeline to run before seeing errors.</p>
<p>Running checks locally allows you to catch issues immediately before pushing your code.</p>
<p>In practice, you should do both:</p>
<ul>
<li><p>Run checks locally to catch errors early and reduce iteration time</p>
</li>
<li><p>Use CI as the final validation to ensure your changes meet the repository’s standards</p>
</li>
</ul>
<p>Think of local checks as your first line of defense, and CI as the final gate before your code is accepted.</p>
<p>Here's an example (Markdown linting):</p>
<pre><code class="language-shell">npm install -g markdownlint-cli2
markdownlint-cli2 docs/**/*.md
</code></pre>
<h3 id="heading-step-3-fix-common-markdown-lint-errors">Step 3: Fix Common Markdown Lint Errors</h3>
<p>Here are some common issues you may encounter:</p>
<h4 id="heading-1-non-descriptive-links">1. Non-descriptive links</h4>
<p>Non-descriptive links like "here" don't give readers any context about where the link leads. This makes documentation harder to understand and less accessible, especially for users relying on screen readers.</p>
<p>Instead of writing:</p>
<pre><code class="language-shell">[here](https://example.com)
</code></pre>
<p>Use descriptive text like:</p>
<pre><code class="language-shell">[command help documentation](https://example.com)
</code></pre>
<h4 id="heading-2-line-length-violations">2. Line length violations</h4>
<p>Many projects enforce a maximum line length (often around 80 characters) to improve readability across different devices and editors.</p>
<p>If a line is too long, you can split it into multiple lines without changing the meaning.</p>
<p>To do this, break the line at natural points such as spaces between words or after punctuation. Avoid breaking words or disrupting the sentence structure.<br>For example:</p>
<pre><code class="language-shell">This is a long sentence that should be split across multiple
lines to satisfy lint rules.
</code></pre>
<h4 id="heading-3-list-indentation-issues">3. List indentation issues</h4>
<p>List indentation errors occur when nested list items aren't aligned consistently. This can break formatting and cause linting errors.</p>
<p>To avoid this, just make sure you use consistent spacing (usually 2 spaces per level).</p>
<p>Example (incorrect):</p>
<pre><code class="language-shell">- Item 1
 - Subitem
</code></pre>
<p>Correct version:</p>
<pre><code class="language-shell">- Item 1
  - Subitem
</code></pre>
<h3 id="heading-step-4-fix-yaml-inside-markdown-code-blocks">Step 4: Fix YAML Inside Markdown Code Blocks</h3>
<p>YAML has strict formatting rules, including proper indentation, key-value structure, and consistent spacing.</p>
<p>Even when YAML appears inside a markdown code block, tools like yamllint still validate its structure.</p>
<p>Example (incorrect):</p>
<pre><code class="language-yaml">metadata:
annotations:
</code></pre>
<p>Correct version:</p>
<pre><code class="language-yaml">metadata:
  annotations:
    capi.metal3.io/unhealthy: "true"
</code></pre>
<p>In the incorrect example, <code>annotations</code> is not properly nested under <code>metadata</code>, and no key-value pair is defined.</p>
<p>In the corrected version:</p>
<ul>
<li><p><code>annotations</code> is properly indented under <code>metadata</code></p>
</li>
<li><p>a valid key-value pair is added (<code>capi.metal3.io/unhealthy: "true"</code>)</p>
</li>
</ul>
<p>This structure satisfies YAML’s requirement for proper hierarchy and formatting.</p>
<h3 id="heading-step-5-fix-build-errors-after-lint-passes">Step 5: Fix Build Errors After Lint Passes</h3>
<p>Passing lint checks doesn't guarantee that your build will succeed.</p>
<p>This is because linting focuses on syntax and formatting, while the build process validates the structure and integrity of the entire project.</p>
<p>Build failures often occur due to issues such as:</p>
<ul>
<li><p>Duplicate entries in navigation files</p>
</li>
<li><p>Missing or incorrectly referenced files</p>
</li>
<li><p>Invalid configuration settings</p>
</li>
</ul>
<p>Even if your syntax is correct, the build system ensures everything connects properly.</p>
<p>For example, in documentation projects using tools like mdBook, a duplicate entry in <code>SUMMARY.md</code> can cause the build to fail even when all files pass lint checks.</p>
<h3 id="heading-step-6-debug-cascading-ci-failures">Step 6: Debug Cascading CI Failures</h3>
<p>CI pipelines are layered. One failure can trigger multiple downstream failures.</p>
<p>For example, imagine a YAML indentation error:</p>
<pre><code class="language-shell">YAML error → build fails → deploy fails → multiple checks fail
</code></pre>
<p>To fix this:</p>
<ol>
<li><p>Identify the first failing step in the CI logs</p>
</li>
<li><p>Fix that issue</p>
</li>
<li><p>Re-run the pipeline</p>
</li>
</ol>
<p>In this example, the YAML indentation error is the root cause. Once you fix the YAML formatting, the lint check passes, which allows the build to proceed and the deployment step to succeed.</p>
<p>This is why it is important to always fix the first failure in the pipeline rather than trying to address all errors at once.</p>
<h3 id="heading-step-7-handle-git-issues-during-ci-debugging">Step 7: Handle Git Issues During CI Debugging</h3>
<p>When working with updated branches, you may encounter:</p>
<ul>
<li><p>Diverged branches</p>
</li>
<li><p>Rebase conflicts</p>
</li>
<li><p>Push rejections</p>
</li>
</ul>
<p>To resolve these issues, you typically need to update your branch using one of two approaches:</p>
<h4 id="heading-option-1-rebase-clean-history">Option 1: Rebase (clean history)</h4>
<pre><code class="language-shell">git pull --rebase
</code></pre>
<p>Rebasing rewrites your commit history so your changes appear on top of the latest version of the branch.</p>
<p>Use carefully:</p>
<ul>
<li><p>Only rebase your own branches</p>
</li>
<li><p>Avoid rebasing shared branches</p>
</li>
</ul>
<h4 id="heading-option-2-merge-safer">Option 2: Merge (safer)</h4>
<pre><code class="language-shell">git pull --no-rebase
</code></pre>
<p>Merging preserves the full commit history and is safer when working with others, but it may introduce additional merge commits.</p>
<h4 id="heading-pushing-your-changes-safely">Pushing your changes safely</h4>
<p>After updating your branch, you may need to push changes:</p>
<pre><code class="language-shell">git push --force-with-lease
</code></pre>
<p>Avoid using:</p>
<pre><code class="language-shell">git push --force
</code></pre>
<p>The <code>--force</code> option can overwrite the other contributors’ work. The <code>--force-with-lease</code> option is safer because it only pushes if the remote branch has not changed unexpectedly.</p>
<h2 id="heading-key-takeaways"><strong>Key Takeaways</strong></h2>
<ul>
<li><p>CI validates your entire commit, not just the specific lines you changed</p>
</li>
<li><p>Linting and build systems enforce different rules</p>
</li>
<li><p>YAML inside markdown must be structurally correct</p>
</li>
<li><p>Documentation builds can fail due to structural issues</p>
</li>
<li><p>Running checks locally significantly reduces debugging time</p>
</li>
</ul>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Debugging a failing pull request isn't just about fixing syntax errors.</p>
<p>You also need to understand how different systems interact:</p>
<ul>
<li><p>Version control</p>
</li>
<li><p>CI pipelines</p>
</li>
<li><p>Linting tools</p>
</li>
<li><p>Build processes</p>
</li>
</ul>
<p>Once you understand how these systems work together, you can debug issues systematically instead of guessing.</p>
<p>The next time your pull request fails, you will know exactly where to start and how to fix it.</p>
<p>Debugging CI issues may feel overwhelming at first, but with a structured approach, you can turn failures into a clear path for improvement.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use Pandoc – An Open Source Tool for Technical Writers ]]>
                </title>
                <description>
                    <![CDATA[ Technical writers frequently navigate the complexities of various document formats and revisions. Pandoc, a free and open-source tool, offers a powerful solution to streamline these processes. In this tutorial, I'll explain the Pandoc's functionaliti... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-pandoc/</link>
                <guid isPermaLink="false">66bb8ac7d2bda3e431549198</guid>
                
                    <category>
                        <![CDATA[ Google Docs ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Vikram Aruchamy ]]>
                </dc:creator>
                <pubDate>Tue, 09 Jul 2024 15:33:40 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/07/pandoc-freecodecamp-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Technical writers frequently navigate the complexities of various document formats and revisions. <a target="_blank" href="https://pandoc.org/">Pandoc</a>, a free and open-source tool, offers a powerful solution to streamline these processes.</p>
<p>In this tutorial, I'll explain the Pandoc's functionalities, specifically focusing on two key areas that can significantly enhance the workflow for technical writers:</p>
<p><strong>Docs and Markdown Conversions</strong>: If you write in Google Docs to leverage their collaborative writing, editing, and review features, Pandoc empowers you to <a target="_blank" href="https://www.docstomarkdown.pro/convert-google-docs-to-markdown/">convert Google Docs into markdown</a> for publishing needs, and if you write in markdown, it helps you convert markdown to Google Docs or Microsoft Word for creating deliverables.</p>
<p><strong>Merging of Multiple Docs into One</strong>: If you work in the "content as component approach", Pandoc allows you to <a target="_blank" href="https://workspace.google.com/marketplace/app/merge_docs_pro/61337277026">merge multiple Google Docs into a single document</a> with a few commands for publishing needs.</p>
<p>You can also create scripts to automate these processes.</p>
<h2 id="heading-why-use-markdown-for-technical-writing">Why Use Markdown for Technical Writing?</h2>
<p><a target="_blank" href="https://www.freecodecamp.org/news/markdown-cheatsheet/">Markdown</a> is great for technical writers because it simplifies the writing process and improves collaboration. Here's why:</p>
<p><strong>Readability and Ease of Use</strong>: Markdown uses plain text symbols for formatting, making it clear and easy to learn. This lets you concentrate on writing clear content without getting caught up in styling complexities.</p>
<p><strong>Platform Independence</strong>: Markdown files are plain text, allowing you to write in any text editor on any device. This flexibility provides freedom in your writing environment and eliminates software compatibility concerns.</p>
<p><strong>Seamless Conversion with Free Tools</strong>: Free tools such as Pandoc offer format flexibility for markdown users, such as <a target="_blank" href="https://www.docstomarkdown.pro/convert-markdown-to-google-docs/">converting markdown to Google Docs</a>, Word documents, or HTML, ensuring compatibility with collaborative editing needs and final deliverables. This also extends to modern workflows, where large language models generate content in markdown. You can use ChatGPT or the Gemini API for creating initial drafts, integrate them with your writing, and then use Pandoc to convert the final document to Google Docs or Microsoft Word for team editing, feedback, and creating deliverables. This streamlined workflow empowers efficient and collaborative content creation.</p>
<p><strong>Version Control Friendly</strong>: Markdown's plain text nature enables seamless integration with version control systems like Git. This facilitates tracking changes, reverting to previous versions. This is particularly valuable for technical writing projects that often undergo revisions and involve multiple team members working on different sections.</p>
<h2 id="heading-why-merge-multiple-documents-into-one">Why Merge Multiple Documents into One?</h2>
<p>Technical writing often involves creating complex documents from smaller, reusable pieces. We call these pieces "content components." These components can be individual chapters, user guides, reference articles, or any other modular unit that contributes to the final product. In other words, content components are building blocks for bigger projects.</p>
<p>However, writing tools such as <a target="_blank" href="https://www.google.com/docs/about/">Google Docs</a> lack the ability to merge these components into a one document. This can be a major hurdle for projects like:</p>
<ol>
<li><strong>Technical Documentation:</strong> Building a user guide by assembling and reordering pre-written topics rather than crafting the entire document from scratch.</li>
<li><strong>Reference Guides:</strong> Consolidating multiple articles from a knowledge base into a single, printable reference manual.</li>
<li><strong>Book Authoring:</strong> Constructing a book by compiling individual chapters and appendices, streamlining the writing and editing process.</li>
</ol>
<p>In all these scenarios, the need to merge content components becomes crucial for creating well-structured and efficient documentation.</p>
<h2 id="heading-how-to-install-pandoc">How to Install Pandoc</h2>
<p>You can install Pandoc on your system using the packages available in the <a target="_blank" href="https://github.com/jgm/pandoc/releases">releases</a> list. The <a target="_blank" href="https://pandoc.org/installing.html">installation page</a> has a detailed tutorial on the steps to install it on different systems.</p>
<p>Once Pandoc is installed, you can use it in the command line to perform different document conversion operations as explained below.</p>
<h2 id="heading-how-to-convert-markdown-to-word-or-google-docs">How to Convert Markdown to Word or Google Docs</h2>
<p>To convert a markdown file to a Word document or Google Docs using Pandoc, follow these steps:</p>
<ol>
<li>Open a terminal or command prompt and navigate to the directory where your markdown file is located.</li>
<li>Run the following Pandoc command to convert your markdown file to a Word document:</li>
</ol>
<pre><code>pandoc input.md -o output.docx
</code></pre><p>Replace <code>input.md</code> with the name of your input markdown file, and <code>output.docx</code> with the desired name of your Word document.</p>
<p>To convert the Docx format into Google Docs, you can upload it to Google Drive and open it in Google Docs.</p>
<p>With these steps, you can convert your markdown files to Word documents or Google Docs using Pandoc.</p>
<h2 id="heading-how-to-convert-google-docs-or-word-to-markdown">How to Convert Google Docs or Word to Markdown</h2>
<p>In this section, I'll explain how to convert a Google Docs or Microsoft Word document into arkdown format.</p>
<p>While the Docs format is accepted by Pandoc, you cannot use the Google Docs URL directly with Pandoc. Therefore, you need to export the Google Doc into Docx format.</p>
<p>Go to <em>File</em> &gt; <em>Download</em> &gt; <em>Microsoft Word (.docx)</em> in your Google Doc to download the document in the <code>.docx</code> format as shown in the following image:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/07/Screenshot-2024-07-08-at-3.05.41-PM.png" alt="Image" width="600" height="400" loading="lazy">
<em>option to download document in .docx format</em></p>
<p>Now you'll have the Word document equivalent of the Google Docs.</p>
<p>To <a target="_blank" href="https://www.docstomarkdown.pro/convert-word-to-markdown/">convert the Word document to markdown</a> using Pandoc, run the following command in your terminal or command prompt:</p>
<pre><code>pandoc input.docx -o output.md
</code></pre><p>Replace <code>input.docx</code> with the name of your Word document, and <code>output.md</code> with the desired name of your markdown file.</p>
<h2 id="heading-how-to-merge-multiple-documents-into-one">How to Merge Multiple Documents into One</h2>
<p>To <a target="_blank" href="https://www.mergedocs.pro/">merge multiple Google Docs or Word documents into a single file</a> using Pandoc, you can follow these two steps:</p>
<ol>
<li>Convert individual documents to markdown using the Pandoc conversion command to convert each Google Doc or Word document into a separate markdown file (explained in the previous section).</li>
<li>Once you have individual markdown files, use the following Pandoc command to merge them into a single document.</li>
</ol>
<pre><code>pandoc file1.md file2.md -o merged_output.docx
</code></pre><p>Replace <code>file1.md</code> and <code>file2.md</code> with the names of your input markdown files. These files will be merged into one <code>merged_output.docx</code>.</p>
<p>You can use your desired output format instead of <code>merged_output.docx</code> based on your goals. For instance, you can create a single HTML file if you intend to publish it on the web, or use the markdown format if your publishing platform supports markdown.</p>
<p>This approach leverages Pandoc's strengths for format conversion and merging to achieve the desired outcome of a unified document.</p>
<p>For more information and helpful answers about using Pandoc, check out the <a target="_blank" href="https://pandoc.org/faqs.html">Pandoc FAQs</a>.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In conclusion, Pandoc is a powerful and versatile tool for technical writers, offering document conversion and merging capabilities. </p>
<p>With its ability to convert Google Docs into markdown and merge multiple documents into one, Pandoc streamlines the process of creating and publishing technical documentation.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Create Notice Blocks in Markdown ]]>
                </title>
                <description>
                    <![CDATA[ Markdown is a very popular lightweight markup language. It is used for writing documentation and even for creating a complete website. Therefore, almost all of us frequently use this markup language every once in a while. However, there are some limi... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-create-notice-blocks-in-markdown/</link>
                <guid isPermaLink="false">66b902c6472b70138041a576</guid>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Md. Fahim Bin Amin ]]>
                </dc:creator>
                <pubDate>Mon, 10 Jun 2024 09:00:51 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/06/Note--Tip--Warning---Caution-specific-blocks-in-MarkDown-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Markdown is a very popular lightweight markup language. It is used for writing documentation and even for creating a complete website. Therefore, almost all of us frequently use this markup language every once in a while.</p>
<p>However, there are some limitations to this language. In some cases, we can not add that much styling or modifications. </p>
<p>Luckily for us, there are five highlighting features for specific segment blocks such as notice, tip, caution, important, and warning. These are also applicable in GitHub Markdown as well. </p>
<p>In this article, I am going to talk about these features in detail.</p>
<h2 id="heading-video-walkthrough">Video Walkthrough</h2>
<p>If you would like to watch a complete video with step-by-step guidelines, then you can watch the video right now!</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/HMeCXobi90E" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-how-to-create-a-note-block-in-markdown">How to Create a Note Block in Markdown</h2>
<p>Use a Note block if you want to highlight information that users should take into account – even when they are just skimming the text.</p>
<p>To write any Note related segment, you need to start it with an angle bracket ( <code>&gt;</code> ), and then you need to specify the highlighting block as Note with <code>[!NOTE]</code>.</p>
<p>After that, you need to add an angle bracket ( <code>&gt;</code> ) in each new line that you want to include in your specific Note block.</p>
<p>If you want to close the Note block, then remove the additional angle bracket in the new line.</p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; [!NOTE]</span>
<span class="hljs-quote">&gt; I want the readers to read it carefully as it contains many important docs.</span>
</code></pre>
<p>Output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/06/Screenshot-2024-06-09-085135.png" alt="Image" width="600" height="400" loading="lazy">
<em>Note block</em></p>
<p>You see that the preview already has a nice Note related symbol.</p>
<h2 id="heading-how-to-create-a-tip-block-in-markdown">How to Create a Tip Block in Markdown</h2>
<p>Use a Tip block if you want to provide optional information to help a user be more successful.</p>
<p>To write any Tip related segment, you need to start it with an angle bracket ( <code>&gt;</code> ), and then you need to specify the highlighting block as Tip with <code>[!TIP]</code>.</p>
<p>After that, you need to add an angle bracket ( <code>&gt;</code> ) in each new line that you want to include in your specific Tip block.</p>
<p>If you want to close the Tip block, then remove the additional angle bracket in the new line. </p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; [!TIP]</span>
<span class="hljs-quote">&gt; Use the command line to detect and resolve the errors!</span>
</code></pre>
<p>Output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/06/Screenshot-2024-06-09-085600.png" alt="Image" width="600" height="400" loading="lazy">
<em>Tip block</em></p>
<p>You see that the preview already has a nice Tip related symbol.</p>
<h2 id="heading-how-to-create-a-warning-block-in-markdown">How to Create a Warning Block in Markdown</h2>
<p>Use a Warning block if you want to provide critical content that demands immediate user attention due to potential risks.</p>
<p>To write any Warning related segment, you need to start it with an angle bracket ( <code>&gt;</code> ), and then you need to specify the highlighting block as a Warning with <code>[!WARNING]</code>.</p>
<p>After that, you need to add an angle bracket ( <code>&gt;</code> ) in each new line that you want to include in your specific Warning block.</p>
<p>If you want to close the Warning block, then remove the additional angle bracket in the new line. </p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; [!WARNING]</span>
<span class="hljs-quote">&gt; DON'T DELETE THE `package.json` file!</span>
</code></pre>
<p>Output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/06/Screenshot-2024-06-09-085842.png" alt="Image" width="600" height="400" loading="lazy">
<em>Warning block</em></p>
<p>You see that the preview already has a nice Warning related symbol.</p>
<h2 id="heading-how-to-create-a-caution-block-in-markdown">How to Create a Caution Block in Markdown</h2>
<p>Use a caution block if you want to make users aware of the potential negative consequences of an action.</p>
<p>To write any Caution related segment, you need to start it with an angle bracket ( <code>&gt;</code> ), and then you need to specify the highlighting block as a Warning with <code>[!CAUTION]</code>.</p>
<p>After that you need to add an angle bracket ( <code>&gt;</code> ) in each new line that you want to include in your specific Caution block.</p>
<p>If you want to close the Caution block, then remove the additional angle bracket in the new line. </p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; [!CAUTION]</span>
<span class="hljs-quote">&gt; Don't execute the code without commenting the test cases.</span>
</code></pre>
<p>Output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/06/Screenshot-2024-06-09-090155.png" alt="Image" width="600" height="400" loading="lazy">
<em>Caution block</em></p>
<p>You see that the preview already has a nice Caution related symbol.</p>
<h2 id="heading-how-to-create-an-important-block-in-markdown">How to Create an Important Block in Markdown</h2>
<p>Use an important block if you want to provide crucial information that is necessary for users to succeed.</p>
<p>To write any Important related segment, you need to start it with an angle bracket ( <code>&gt;</code> ), and then you need to specify the highlighting block as a Warning with <code>[!IMPORTANT]</code>.</p>
<p>After that, you need to add an angle bracket ( <code>&gt;</code> ) in each new line that you want to include in your specific Important block.</p>
<p>If you want to close the Important block, then remove the additional angle bracket in the new line.</p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; [!IMPORTANT]  </span>
<span class="hljs-quote">&gt; Read the contribution guideline before adding a pull request.</span>
</code></pre>
<p>Output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/06/Screenshot-2024-06-09-090430.png" alt="Image" width="600" height="400" loading="lazy">
<em>Important block</em></p>
<p>You see that the preview already has a nice Important related symbol.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Thank you for reading the entire article. I hope you have learned something new here.</p>
<p>If you have enjoyed the procedures step-by-step, then don't forget to let me know on <a target="_blank" href="https://twitter.com/Fahim_FBA">Twitter/X</a> or <a target="_blank" href="https://www.linkedin.com/in/fahimfba/">LinkedIn</a>. I would appreciate it if you could endorse me for some relevant skillsets on <a target="_blank" href="https://www.linkedin.com/in/fahimfba/">LinkedIn</a>. I would also recommend you to subscribe to my <a target="_blank" href="https://youtube.com/@FahimAmin">YouTube channel</a> for regular programming related content.</p>
<p>You can follow me on <a target="_blank" href="https://github.com/FahimFBA">GitHub</a> as well if you are interested in open source. Make sure to check <a target="_blank" href="https://fahimbinamin.com/">my website</a> as well.</p>
<p>Thank you so much! 😀</p>
<h3 id="heading-reference">Reference</h3>
<p><a target="_blank" href="https://github.com/orgs/community/discussions/16925">[Markdown] An option to highlight a "Note" and "Warning" using blockquote (Beta) #16925</a></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Learn GitHub-Flavored Markdown Syntax and Formatting – With Examples ]]>
                </title>
                <description>
                    <![CDATA[ Markdown is a lightweight, open-source, easy-to-read and easy-to-write method of formatting text that you can use as plain text in any IDE or editor. When writing on GitHub, you can use Markdown syntax and HTML elements to extend Markdown's functiona... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/github-flavored-markdown-syntax-examples/</link>
                <guid isPermaLink="false">66d038a57d662cf201f5ec59</guid>
                
                    <category>
                        <![CDATA[ GitHub ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ syntax ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Rajdeep Singh ]]>
                </dc:creator>
                <pubDate>Thu, 11 Apr 2024 19:08:04 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/04/freecodecampl-github.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p><a target="_blank" href="https://en.wikipedia.org/wiki/Markdown">Markdown</a> is a lightweight, open-source, easy-to-read and easy-to-write method of formatting text that you can use as plain text in any IDE or editor.</p>
<p>When writing on GitHub, you can use Markdown syntax and HTML elements to extend Markdown's functionality. You can use Markdown syntax everywhere in GitHub, such as in the README file, wiki, comments, pull requests, and when creating issues.</p>
<p>For every software developer, learning markdown is an essential step along the path of your career.</p>
<p>To enhance Markdown's basic features, GitHub added some custom functionalities and created <a target="_blank" href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github">GitHub-Flavored Markdown</a>. With this, you can easily interact with other users in pull requests and issues by mentioning user, issue, and PR references and adding emoji.</p>
<p>This tutorial teaches you the basics of GitHub-Flavored Markdown so you can start using it in your projects.</p>
<p>All the code is <a target="_blank" href="https://github.com/officialrajdeepsingh/github-tutorial">available in the GitHub repository</a>.</p>
<h2 id="heading-github-flavored-markdown-syntax">GitHub-Flavored Markdown Syntax</h2>
<p>GitHub Flavored Markdown syntax is divided into two parts.</p>
<ol>
<li><a class="post-section-overview" href="#basis-formatting-syntax">Basic Formatting Syntax</a></li>
<li><a class="post-section-overview" href="#heading-advanced-formatting-syntax">Advanced Formatting Syntax</a></li>
</ol>
<p>We'll look at each one in detail below.</p>
<h3 id="heading-basic-formatting-syntax">Basic Formatting Syntax</h3>
<p>Basic formatting syntax applies to everyone. It contains fundamental essentials such as headings, code, images, quotes, links, and so on – things you'll need to know for writing.</p>
<ol>
<li><a class="post-section-overview" href="#heading-headings">Headings</a></li>
<li><a class="post-section-overview" href="#heading-paragraphs">Paragraphs</a></li>
<li><a class="post-section-overview" href="#comment">Comment</a></li>
<li><a class="post-section-overview" href="#heading-styling-text">Styling text</a></li>
<li><a class="post-section-overview" href="#heading-quotes">Quotes</a></li>
<li><a class="post-section-overview" href="#heading-code">Code</a></li>
<li><a class="post-section-overview" href="#heading-links">Links</a></li>
<li><a class="post-section-overview" href="#heading-images">Images</a></li>
<li><a class="post-section-overview" href="#heading-lists">Lists</a></li>
<li><a class="post-section-overview" href="#heading-mentioning-people-and-teams">Mentioning people and teams</a></li>
<li><a class="post-section-overview" href="#heading-referencing-issues-and-pull-requests">Referencing issues and pull requests</a></li>
<li><a class="post-section-overview" href="#using-emojis">Using emojis</a></li>
<li><a class="post-section-overview" href="#heading-footnotes">Footnotes</a></li>
<li><a class="post-section-overview" href="#heading-alerts">Alerts</a></li>
</ol>
<p>Note that the code samples mostly come from <a target="_blank" href="https://docs.github.com/en/get-started">GitHub's documentation</a>.</p>
<h3 id="heading-headings">Headings</h3>
<p>You can use the <code>#</code> symbol to create headings. One <code>#</code> creates an H1 heading, two create an H2 heading, and so on, like this:</p>
<pre><code class="lang-markdown"><span class="hljs-section"># A first-level heading</span>
<span class="hljs-section">## A second-level heading</span>
<span class="hljs-section">### A third-level heading</span>
<span class="hljs-section">#### A four-level heading</span>
<span class="hljs-section">##### A five-level heading</span>
<span class="hljs-section">###### A six-level heading</span>
</code></pre>
<h3 id="heading-paragraphs">Paragraphs</h3>
<p>To create paragraphs, you can use a blank line to separate one or more lines of text or paragraphs.</p>
<pre><code class="lang-markdown">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam est odio, commodo id diam sed, pulvinar sagittis tortor. Nam vestibulum purus eros. Sed congue, mi id pretium auctor, nibh augue iaculis arcu, eu tristique quam dolor at erat.

Quisque vel odio condimentum, mollis sem vitae, porta diam. Praesent ligula elit, condimentum eget ex sed, commodo sollicitudin sapien.


Proin volutpat faucibus nulla. Nullam eros sem, ultricies gravida nunc nec, dapibus posuere nisl. Nunc lacinia elementum turpis in pharetra. Aenean eu neque eros.
</code></pre>
<h3 id="heading-comments">Comments</h3>
<p>Comments are available in almost every programming language. They help developers write notes and add additional information to their code, helping other developers understand what's going on and how the code is working.</p>
<p>To add notes and additional information in Markdown, use the following syntax: <code>&lt;!--- Wrap text ---&gt;</code>.</p>
<p>Here's an example:</p>
<pre><code class="lang-markdown"><span class="xml"><span class="hljs-comment">&lt;!-- This content will not appear in the rendered Markdown --&gt;</span></span>
</code></pre>
<h3 id="heading-styling-text">Styling text</h3>
<p>You can apply basic styles to your text, such as bold, italic, strikethrough, subscript, or superscript, to improve readability and convey your point more clearly.</p>
<ol>
<li>For <strong>Bold</strong>, you can use the following syntax:  <code>**your text**</code></li>
<li>For <strong><em>italics</em></strong>, you can use the following syntax:  <code>*your text* or _your text_.</code></li>
<li>For <strong>strikethrough</strong>, you can use the following syntax: <code>~~your text~~</code></li>
<li>For <strong>subscript</strong>, you can use the following syntax:  <code>The subscript &lt;sub&gt; text &lt;/sub&gt; is here.</code></li>
<li>For <strong>superscript</strong>, you can use the following syntax:  <code>The superscript &lt;sup&gt; text &lt;/sup&gt; is here.</code></li>
</ol>
<pre><code class="lang-markdown"><span class="hljs-section">## Bold</span>

<span class="hljs-strong">**your text**</span>

<span class="hljs-section">## italics</span>

<span class="hljs-emphasis">*your text*</span>
<span class="hljs-emphasis">_your text_</span>

<span class="hljs-section">## strikethrough</span>

~~your text~~

<span class="hljs-section">## subscript</span>

The subscript <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">sub</span>&gt;</span></span> text <span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">sub</span>&gt;</span></span> is here.

<span class="hljs-section">## superscript</span>

The subscript <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">sup</span>&gt;</span></span> text <span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">sup</span>&gt;</span></span> is here.
</code></pre>
<h3 id="heading-quotes">Quotes</h3>
<p>A blockquote or quote is a sentence or paragraph formatted to let the reader know that you're quoting someone. To create a blockquote in Markdown, you can use the <code>&gt;</code> symbol.</p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; Text that is a quote</span>
</code></pre>
<h3 id="heading-code">Code</h3>
<p>Markdown files support two types of code samples: <strong>inline</strong> and <strong>code block</strong>.</p>
<ol>
<li>To add a code block in a Markdown file, use the following syntax: <code>``` your code ``` </code>.</li>
<li>To add inline code to the Markdown file, use the following syntax: <code>`your code` </code>.</li>
</ol>
<pre><code class="lang-markdown"><span class="hljs-section">## Code Block</span>
</code></pre>
<p>// ES5 syntax
var multiply = function(x, y) {
  return x * y;
};</p>
<p>// ES6 arrow function
var multiply = (x, y) =&gt; { return x * y; };</p>
<p>// Or even simpler
var multiply = (x, y) =&gt; x * y;</p>
<pre><code>
## Inline code 

JavaScript provides three different value comparison operations: strict equality using <span class="hljs-string">`===`</span>, loose equality using <span class="hljs-string">`==`</span>, and the <span class="hljs-string">`Object.is()`</span> method.
</code></pre><p>To support code highlighting in a code block, you can add an optional language identifier after your triple backticks (like JavaScript in the example below):</p>
<pre><code class="lang-markdown"><span class="hljs-section">## Code Block</span>

<span class="hljs-code">```javascript

// ES5 syntax
var multiply = function(x, y) {
  return x * y;
};

// ES6 arrow function
var multiply = (x, y) =&gt; { return x * y; };

// Or even simpler
var multiply = (x, y) =&gt; x * y;</span>
</code></pre>
<pre><code>
### Links

A markdown file divides links into two categories: **inline** and **relative**.

#### Inline links

To create an inline link <span class="hljs-keyword">in</span> a Markdown file, wrap the link text <span class="hljs-keyword">in</span> brackets <span class="hljs-string">`[ ]`</span> followed immediately by the URL <span class="hljs-keyword">in</span> parentheses <span class="hljs-string">`( )`</span>.

<span class="hljs-string">``</span><span class="hljs-string">`markdown
This site was built using [GitHub Pages](https://pages.github.com/).</span>
</code></pre><h4 id="heading-relative-links">Relative links</h4>
<p>Relative links are defined similarly to inline links but they change in the <code>[]</code> section: the <code>[]</code> section contains the path of the file in your repository. </p>
<p>You use relative links to link two files: for example, to link the CONTRIBUTING file into the README file.</p>
<pre><code class="lang-markdown">[<span class="hljs-string">Contribution guidelines</span>](<span class="hljs-link">docs/CONTRIBUTING.md</span>)
</code></pre>
<p>Relative links starting with <code>/</code> will be relative to the repository root. You can use all relative link operands, such as <code>./</code> and <code>../.</code>:</p>
<pre><code class="lang-markdown">[<span class="hljs-string">Contribution guidelines</span>](<span class="hljs-link">../docs/CONTRIBUTING.md</span>)
</code></pre>
<h3 id="heading-images">Images</h3>
<p>To add an image in a markdown file, add a <code>!</code> and then wrap the alt text in <code>[]</code>. Then, wrap the image link with parentheses <code>()</code>.</p>
<p>It looks like this:</p>
<pre><code class="lang-markdown">![<span class="hljs-string">Markdown</span>](<span class="hljs-link">https://img.shields.io/badge/markdown-%23000000.svg?style=for-the-badge&amp;logo=markdown&amp;logoColor=white</span>)
</code></pre>
<h3 id="heading-lists">Lists</h3>
<p>A list helps record essential information in order, which can be vital for the reader and makes it easy for people to understand and find information. </p>
<p>Markdown files support three types of lists:</p>
<ol>
<li>Ordered list</li>
<li>Unordered list</li>
<li>Task list</li>
</ol>
<h4 id="heading-ordered-list">Ordered list</h4>
<p>The first type is an ordered list. To create an ordered list, start with numbers followed by periods.</p>
<pre><code class="lang-markdown"><span class="hljs-bullet">1.</span> one
<span class="hljs-bullet">2.</span> two
<span class="hljs-bullet">3.</span> three
<span class="hljs-bullet">4.</span> four
</code></pre>
<h4 id="heading-unordered-list">Unordered list</h4>
<p>The second type is an unordered list. To create an unordered list, use <code>-</code>, <code>+</code> or <code>*</code> (depending on your preference - they'll all render as an unordered list):</p>
<pre><code class="lang-markdown"><span class="hljs-bullet">*</span> First item
<span class="hljs-bullet">*</span> Second item
<span class="hljs-bullet">*</span> Third item
<span class="hljs-bullet">*</span> Fourth item


<span class="hljs-bullet">-</span> First item
<span class="hljs-bullet">-</span> Second item
<span class="hljs-bullet">-</span> Third item
<span class="hljs-bullet">-</span> Fourth item

<span class="hljs-bullet">+</span> First item
<span class="hljs-bullet">+</span> Second item
<span class="hljs-bullet">+</span> Third item
<span class="hljs-bullet">+</span> Fourth item
</code></pre>
<h4 id="heading-task-list">Task list</h4>
<p>The third type is a task list. To create a task list, list items start with a hyphen, followed by a space, followed by square brackets <code>[]</code>. You can use an <code>x</code> in the bracket <code>[x]</code> to mark a task as complete.</p>
<pre><code class="lang-markdown"><span class="hljs-bullet">-</span> [x] #739
<span class="hljs-bullet">-</span> [ ] https://github.com/octo-org/octo-repo/issues/740
<span class="hljs-bullet">-</span> [ ] Add delight to the experience when all tasks are complete :tada:
</code></pre>
<h3 id="heading-mentioning-people-and-teams">Mentioning people and teams</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/username-in-github.png" alt="Mention users and teams in the markdown" width="600" height="400" loading="lazy">
<em>Mentioning users and teams in markdown</em></p>
<p>To mention a person or team in a GitHub markdown file, type <code>@</code>  and write the username or team username.</p>
<pre><code class="lang-markdown"><span class="hljs-section">## person or individual username</span>

@officialrajdeepsingh, check out the following change.

<span class="hljs-section">## Team or company</span>
The section blog theme is maintained by @frontendweb
</code></pre>
<h3 id="heading-referencing-issues-and-pull-requests">Referencing issues and pull requests</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/tag-and-refrence-with-markdown.png" alt="Issues and pull request" width="600" height="400" loading="lazy">
<em>Issues and pull requests</em></p>
<p>To mention issues and pull requests in a GitHub markdown file, type a <code>#</code>, then type the issue or pull request number or title. Then press either tab or enter to complete the highlighted result.</p>
<pre><code class="lang-markdown">Remove the default <span class="hljs-emphasis">_target blank in logo #93</span>
</code></pre>
<h3 id="heading-using-emoji">Using emoji</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/emoji-in-markdown.png" alt="Adding emoji in markdown." width="600" height="400" loading="lazy">
<em>Adding emoji in markdown.</em></p>
<p>To add an emoji to your writing, type the emoji's code between two colons. If you just type <code>:</code>, a list of suggested emojis on GitHub will appear. </p>
<p>Once you find the emoji you're looking for, press Tab or Enter to choose the highlighted result.</p>
<pre><code class="lang-markdown">Don't forget to leave a star on our repository! :star:
</code></pre>
<h3 id="heading-footnotes">Footnotes</h3>
<p>To add a footnote reference, add a caret and an identifier inside brackets <code>([^1])</code> using the following syntax:</p>
<pre><code class="lang-markdown">Here's a simple footnote,[^1] and here's a longer one.[^bignote]

[<span class="hljs-symbol">^1</span>]: <span class="hljs-link">This is the first footnote.</span>

[<span class="hljs-symbol">^bignote</span>]: <span class="hljs-link">Here's one with multiple paragraphs and code.</span>
</code></pre>
<h3 id="heading-alerts">Alerts</h3>
<p>Alerts are a Markdown extension based on the block quote syntax that you can use to emphasize important information.</p>
<p>GitHub Flavored Markdown supports five types of alerts: <code>[!NOTE]</code>, <code>[!TIP]</code>, <code>[!IMPORTANT]</code>, <code>[!WARNING]</code>, and <code>[!CAUTION]</code>. You can use any of them:</p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; [!NOTE]</span>
<span class="hljs-quote">&gt; Useful information that users should know, even when skimming content.</span>

<span class="hljs-quote">&gt; [!TIP]</span>
<span class="hljs-quote">&gt; Helpful advice for doing things better or more easily.</span>

<span class="hljs-quote">&gt; [!IMPORTANT]</span>
<span class="hljs-quote">&gt; Key information users need to know to achieve their goal.</span>

<span class="hljs-quote">&gt; [!WARNING]</span>
<span class="hljs-quote">&gt; Urgent info that needs immediate user attention to avoid problems.</span>

<span class="hljs-quote">&gt; [!CAUTION]</span>
<span class="hljs-quote">&gt; Advises about risks or negative outcomes of certain actions.</span>
</code></pre>
<p>The Alert syntax looks like this in the browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/alert.png" alt="Adding alert example in markdown." width="600" height="400" loading="lazy">
<em>Adding alert example in markdown.</em></p>
<h2 id="heading-advanced-formatting-syntax">Advanced Formatting Syntax</h2>
<p>This advanced formatting syntax section contains advanced use cases, such as adding diagrams and tables, collapsed sections, mathematical expressions, and more.</p>
<ol>
<li><a class="post-section-overview" href="#heading-creating-a-table">Creating a table</a></li>
<li><a class="post-section-overview" href="#heading-creating-a-collapsed-section">Creating a collapsed section</a></li>
<li><a class="post-section-overview" href="#heading-creating-diagrams">Creating diagrams</a></li>
<li><a class="post-section-overview" href="#heading-mathematical-expressions">Mathematical expressions</a></li>
</ol>
<h3 id="heading-creating-a-table">Creating a table</h3>
<p>To create tables in Markdown, you can use pipes <code>|</code> and hyphens <code>-</code>. Hyphens are used to create a column's header, while pipes are used to separate columns.</p>
<pre><code class="lang-markdown">| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |
</code></pre>
<p>The table looks like this in the browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/table-in-markdown.png" alt="Table example in markdown." width="600" height="400" loading="lazy">
<em>Table example in markdown.</em></p>
<h3 id="heading-creating-a-collapsed-section">Creating a collapsed section</h3>
<p>To create a collapsed section in a markdown file, you can use the <code>&lt;details&gt;</code> tag. This tag is an HTML element that you can easily use to extend the functionality of GitHub Flavored Markdown. Here's how it works:</p>
<pre><code class="lang-markdown"><span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">details</span>&gt;</span></span>
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">summary</span>&gt;</span></span>Click to here. <span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">summary</span>&gt;</span></span>

   ### You can add a message here

   You can add text within a collapsed section. 

   You can add an image or a code block, too.

   <span class="hljs-code">```ruby
     puts "Hello World"</span>
</code></pre>
<p></p>
<pre><code>
The collapsed syntax looks like <span class="hljs-built_in">this</span> <span class="hljs-keyword">in</span> the browser:

![Collapsed example <span class="hljs-keyword">in</span> markdown.](https:<span class="hljs-comment">//www.freecodecamp.org/news/content/images/2024/04/Collapsed-in-markdown.png)</span>
_Collapsed example <span class="hljs-keyword">in</span> markdown._

### Creating diagrams

To add diagrams to a Markdown file, use triple backticks and wrap them inside quadruple backticks. Then, tell which identifier (Mermaid, GeoJSON, TopJSON, ASCII STL) you used <span class="hljs-keyword">for</span> the diagram.

GitHub supports diagrams using four syntaxes: mermaid, geoJSON, topoJSON, and ASCII STL.

<span class="hljs-number">1.</span> [Mermaid](#heading-mermaid) 
<span class="hljs-number">2.</span> [GeoJSON and TopoJSON](#heading-geojson-and-topojson)
<span class="hljs-number">3.</span> [ASCII STL](#heading-ascii-stl)

#### Mermaid 

[Mermaid](https:<span class="hljs-comment">//mermaid.js.org) is a Markdown-inspired tool that renders text into diagrams. You can create flow charts, sequence diagrams, pie charts, and more with Mermaid.</span>

The GitHub-flavored Markdown has extended the functionality <span class="hljs-keyword">of</span> using Mermaid <span class="hljs-keyword">with</span> Markdown.

You can create flow charts, sequence diagrams, pie charts, and so on inside Markdown. GitHub handles the rest <span class="hljs-keyword">of</span> that. So how <span class="hljs-keyword">do</span> you render diagrams on the screen?

<span class="hljs-string">``</span><span class="hljs-string">`markdown
`</span><span class="hljs-string">``</span>mermaid
graph LR;
   A --  and --&gt; B -- to --&gt; C
</code></pre><pre><code>
The mermaid syntax looks like <span class="hljs-built_in">this</span> <span class="hljs-keyword">in</span> the browser.

![Mermaid example <span class="hljs-keyword">in</span> markdown.](https:<span class="hljs-comment">//www.freecodecamp.org/news/content/images/2024/04/mermaid-degram.png)</span>
_Mermaid example <span class="hljs-keyword">in</span> markdown._

#### GeoJSON and TopoJSON

You can use [GeoJSON](https:<span class="hljs-comment">//geojson.org/) or [TopoJSON](https://github.com/topojson/topojson) to add an interactive map to a GitHub repository in a README file or GitHub Wiki.</span>

You can use code block syntax to add an interactive map.

<span class="hljs-number">1.</span> GeoJSON can create a map by specifying coordinates. To add an interactive map, use the following syntax:  <span class="hljs-string">` `</span><span class="hljs-string">``</span>geojson  your code <span class="hljs-string">``</span><span class="hljs-string">` `</span>
<span class="hljs-number">2.</span> TopoJSON can create a map by specifying coordinates and shapes. To add an interactive map, use the following syntax: <span class="hljs-string">` `</span><span class="hljs-string">``</span>topojson  your code <span class="hljs-string">``</span><span class="hljs-string">` `</span>

**Example using GeoJSON:**

<span class="hljs-string">``</span><span class="hljs-string">`markdown
`</span><span class="hljs-string">``</span>geojson
{
  <span class="hljs-string">"type"</span>: <span class="hljs-string">"FeatureCollection"</span>,
  <span class="hljs-string">"features"</span>: [
    {
      <span class="hljs-string">"type"</span>: <span class="hljs-string">"Feature"</span>,
      <span class="hljs-string">"id"</span>: <span class="hljs-number">1</span>,
      <span class="hljs-string">"properties"</span>: {
        <span class="hljs-string">"ID"</span>: <span class="hljs-number">0</span>
      },
      <span class="hljs-string">"geometry"</span>: {
        <span class="hljs-string">"type"</span>: <span class="hljs-string">"Polygon"</span>,
        <span class="hljs-string">"coordinates"</span>: [
          [
              [<span class="hljs-number">-90</span>,<span class="hljs-number">35</span>],
              [<span class="hljs-number">-90</span>,<span class="hljs-number">30</span>],
              [<span class="hljs-number">-85</span>,<span class="hljs-number">30</span>],
              [<span class="hljs-number">-85</span>,<span class="hljs-number">35</span>],
              [<span class="hljs-number">-90</span>,<span class="hljs-number">35</span>]
          ]
        ]
      }
    }
  ]
}
</code></pre><pre><code>
**Example <span class="hljs-keyword">of</span> TopJSON:**

<span class="hljs-string">``</span><span class="hljs-string">`markdown
`</span><span class="hljs-string">``</span>topojson
{
  <span class="hljs-string">"type"</span>: <span class="hljs-string">"Topology"</span>,
  <span class="hljs-string">"transform"</span>: {
    <span class="hljs-string">"scale"</span>: [<span class="hljs-number">0.0005000500050005</span>, <span class="hljs-number">0.00010001000100010001</span>],
    <span class="hljs-string">"translate"</span>: [<span class="hljs-number">100</span>, <span class="hljs-number">0</span>]
  },
  <span class="hljs-string">"objects"</span>: {
    <span class="hljs-string">"example"</span>: {
      <span class="hljs-string">"type"</span>: <span class="hljs-string">"GeometryCollection"</span>,
      <span class="hljs-string">"geometries"</span>: [
        {
          <span class="hljs-string">"type"</span>: <span class="hljs-string">"Point"</span>,
          <span class="hljs-string">"properties"</span>: {<span class="hljs-string">"prop0"</span>: <span class="hljs-string">"value0"</span>},
          <span class="hljs-string">"coordinates"</span>: [<span class="hljs-number">4000</span>, <span class="hljs-number">5000</span>]
        },
        {
          <span class="hljs-string">"type"</span>: <span class="hljs-string">"LineString"</span>,
          <span class="hljs-string">"properties"</span>: {<span class="hljs-string">"prop0"</span>: <span class="hljs-string">"value0"</span>, <span class="hljs-string">"prop1"</span>: <span class="hljs-number">0</span>},
          <span class="hljs-string">"arcs"</span>: [<span class="hljs-number">0</span>]
        },
        {
          <span class="hljs-string">"type"</span>: <span class="hljs-string">"Polygon"</span>,
          <span class="hljs-string">"properties"</span>: {<span class="hljs-string">"prop0"</span>: <span class="hljs-string">"value0"</span>,
            <span class="hljs-string">"prop1"</span>: {<span class="hljs-string">"this"</span>: <span class="hljs-string">"that"</span>}
          },
          <span class="hljs-string">"arcs"</span>: [[<span class="hljs-number">1</span>]]
        }
      ]
    }
  },
  <span class="hljs-string">"arcs"</span>: [[[<span class="hljs-number">4000</span>, <span class="hljs-number">0</span>], [<span class="hljs-number">1999</span>, <span class="hljs-number">9999</span>], [<span class="hljs-number">2000</span>, <span class="hljs-number">-9999</span>], [<span class="hljs-number">2000</span>, <span class="hljs-number">9999</span>]],[[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>], [<span class="hljs-number">0</span>, <span class="hljs-number">9999</span>], [<span class="hljs-number">2000</span>, <span class="hljs-number">0</span>], [<span class="hljs-number">0</span>, <span class="hljs-number">-9999</span>], [<span class="hljs-number">-2000</span>, <span class="hljs-number">0</span>]]]
}
</code></pre><pre><code>
### ASCII STL

GitHub Flavored Markdown supports STL syntax. STL syntax allows you to add interactive <span class="hljs-number">3</span>D models <span class="hljs-keyword">in</span> markdown. You can use the following syntax: <span class="hljs-string">` `</span><span class="hljs-string">``</span>stl your code.<span class="hljs-string">``</span><span class="hljs-string">` `</span>

<span class="hljs-string">``</span><span class="hljs-string">`markdown
`</span><span class="hljs-string">``</span>stl
solid cube_corner
  facet normal <span class="hljs-number">0.0</span> <span class="hljs-number">-1.0</span> <span class="hljs-number">0.0</span>
    outer loop
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span>
      vertex <span class="hljs-number">1.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span>
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">1.0</span>
    endloop
  endfacet
  facet normal <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">-1.0</span>
    outer loop
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span>
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">1.0</span> <span class="hljs-number">0.0</span>
      vertex <span class="hljs-number">1.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span>
    endloop
  endfacet
  facet normal <span class="hljs-number">-1.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span>
    outer loop
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span>
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">1.0</span>
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">1.0</span> <span class="hljs-number">0.0</span>
    endloop
  endfacet
  facet normal <span class="hljs-number">0.577</span> <span class="hljs-number">0.577</span> <span class="hljs-number">0.577</span>
    outer loop
      vertex <span class="hljs-number">1.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span>
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">1.0</span> <span class="hljs-number">0.0</span>
      vertex <span class="hljs-number">0.0</span> <span class="hljs-number">0.0</span> <span class="hljs-number">1.0</span>
    endloop
  endfacet
endsolid
</code></pre><pre><code>
The STL syntax looks like <span class="hljs-built_in">this</span> <span class="hljs-keyword">in</span> the browser:

![STL example <span class="hljs-keyword">in</span> markdown.](https:<span class="hljs-comment">//www.freecodecamp.org/news/content/images/2024/04/stl-example.png)</span>
_STL example <span class="hljs-keyword">in</span> markdown._

### Mathematical expressions

You can add mathematical expressions, such <span class="hljs-keyword">as</span> equations, terms, formulas, and so on, to a GitHub markdown file. GitHub uses [LaTeX](https:<span class="hljs-comment">//www.cmor-faculty.rice.edu/~heinken/latex/symbols.pdf) formatted within Markdown. There are two ways to add these expressions:</span>

<span class="hljs-number">1.</span> Writing inline math expressions
<span class="hljs-number">2.</span> Writing math expressions <span class="hljs-keyword">as</span> code blocks

#### Writing inline math expressions

An inline math expression starts <span class="hljs-keyword">with</span> <span class="hljs-string">`$`</span> and ends <span class="hljs-keyword">with</span> <span class="hljs-string">`$`</span>. 

<span class="hljs-string">``</span><span class="hljs-string">`markdown
Inline math expression example: $\sqrt{3x-1}+(1+x)^2$</span>
</code></pre><p>The inline math syntax looks like this in the browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/math-exp.png" alt="Inline math expression example" width="600" height="400" loading="lazy">
<em>Inline math expression example</em></p>
<h4 id="heading-writing-math-expressions-as-code-blocks">Writing math expressions as code blocks</h4>
<p>To add a math expression's code block to the Markdown file, use the <code>```math</code> code block and wrap it inside <code>``` </code> backticks to display the expression as a block.</p>
<p>To add a math expression's code block to the Markdown file, use the ````math code block and wrap it inside triple backticks to display the expression as a block.</p>
<pre><code class="lang-markdown"><span class="hljs-code">```math
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)</span>
</code></pre>
<p>```</p>
<p>The math code block syntax looks like this in the browser:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/04/math-expre-.png" alt="Image" width="600" height="400" loading="lazy">
<em>Code block math expression example</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Markdown syntax works well in GitHub and all other central Git servers, such as GitLab, Gitea, and so on.</p>
<p>Different tools name their markdown differently. For example, GitHub extends markdown functionality in its own way and builds GitHub Flavored Markdown. GitLab also extends markdown functionality and builds and creates a GitLab-flavored markdown.</p>
<p>Markdown syntax is mostly the same in every Git service. But alerts, diagrams, and a few other features only work in GitHub Flavored Markdown.</p>
<h2 id="heading-reference">Reference</h2>
<ul>
<li>GitHub docs – <a target="_blank" href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github">quickstart for writing on GitHub</a></li>
<li>GitHub docs  – <a target="_blank" href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax">basic syntax</a></li>
<li>Tutorial about <a target="_blank" href="https://www.vanderveer.io/github-markdown-render-stl/">rendering STL in Markdown on GitHub</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Use Markdown in VSCode – Syntax and Examples ]]>
                </title>
                <description>
                    <![CDATA[ Markdown is a lightweight markup language for creating formatted text using a plain-text editor. It is widely used for creating README files, documentation, and other forms of text. Visual Studio Code (VSCode) is a popular source code editor that pro... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-markdown-in-vscode/</link>
                <guid isPermaLink="false">66b903972fd266308aa6ff62</guid>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Visual Studio Code ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Victoria (Burah) Poromon ]]>
                </dc:creator>
                <pubDate>Fri, 12 Jan 2024 17:46:22 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/01/Markdown-in-vscode-cover-photo.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Markdown is a lightweight markup language for creating formatted text using a plain-text editor. It is widely used for creating README files, documentation, and other forms of text.</p>
<p>Visual Studio Code (VSCode) is a popular source code editor that provides excellent support for Markdown, making it easy for developers, writers, and anyone creating textual content to use Markdown effectively.</p>
<p>To follow through this tutorial, you must have VSCode installed on your computer and know how to navigate it.</p>
<h2 id="heading-importance-of-using-markdown-in-visual-studio-code-vscode">Importance of Using Markdown in Visual Studio Code (VSCode)</h2>
<p>The combination of Markdown and VSCode provides a user-friendly and efficient environment for writing, editing, and formatting text, which makes it a suitable choice for developers, writers, and content creators.</p>
<p>The following are some of the key reasons to use markdown in VSCode:</p>
<ul>
<li>Markdown in VSCode supports code snippets and syntax highlighting for various programming languages, making it suitable for documenting code and technical content.</li>
<li>VSCode provides a built-in preview feature that you can access by clicking the preview icon at the screen's top right corner. This allows you to see your raw markdown file alongside what it will look like when you publish it on the internet. This feature also helps you spot and fix simple mistakes as you go.</li>
<li>Many project repositories on platforms like GitHub use Markdown for documentation. Getting familiar with Markdown in VSCode ensures a smooth transition when contributing to open-source projects or collaborating with teams using similar documentation standards.</li>
<li>You do not need to be connected to the internet to use markdown in VSCode. You can work offline and still have access to all its features.</li>
<li>For developers, you can easily push your document to GitHub using VSCode's built-in terminal. This also allows for multiple persons to review and work on the same document.</li>
</ul>
<h2 id="heading-how-to-create-a-markdown-file-in-vscode">How to Create a Markdown File in VSCode</h2>
<p>Follow the steps below to create your markdown file in VSCode:</p>
<ol>
<li>Create a folder on your computer to store your documents.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot--17--1.png" alt="Image" width="600" height="400" loading="lazy">
<em>An image showing you how to create a folder on the desktop page of your computer. (For windows)</em></p>
<ol start="2">
<li><p>Launch your VSCode app.</p>
</li>
<li><p>After launching your app, click on 'File', and then on 'Open Folder' to open the folder you just created.</p>
</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot--18-.png" alt="Image" width="600" height="400" loading="lazy">
<em>An image showing you how to open your folder from the VSCode app.</em></p>
<ol start="4">
<li>Inside your folder, click on the file symbol and create a file that ends with '.md'(For example, First-file.md).</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot--21--2.png" alt="Image" width="600" height="400" loading="lazy">
<em>An image showing you how to create a file inside your folder in VSCode.</em></p>
<ol start="5">
<li>Press enter after typing your file name and your document page will open up. You are now all set and can start writing.</li>
</ol>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/01/Screenshot--22-.png" alt="Image" width="600" height="400" loading="lazy">
<em>An image showing your file tab and your document page.</em></p>
<h2 id="heading-markdown-syntax">Markdown Syntax</h2>
<p>Markdown syntax is a collection of symbols/annotations you add to your text to tell each word or phrase what it should be doing.</p>
<p>Let's go through some of the most useful markdown syntax and features.</p>
<h3 id="heading-headers">Headers</h3>
<p>To create headers, add the pound/hash symbol (<code>#</code>) in front of your text. The number of pound symbols determines the header level.</p>
<p>For example:</p>
<pre><code class="lang-markdown"> # Header 1
 ## Header 2
 ### Header 3
 #### Header 4
 ##### Header 5
 ###### Header 6
</code></pre>
<p>Result:</p>
<h1 id="heading-header-1">Header 1</h1>
<h2 id="heading-header-2">Header 2</h2>
<h3 id="heading-header-3">Header 3</h3>
<h4 id="heading-header-4">Header 4</h4>
<h5 id="heading-header-5">Header 5</h5>
<h6 id="heading-header-6">Header 6</h6>
<h3 id="heading-lists">Lists</h3>
<p>There are two types of lists in Markdown, the ordered list and the unordered list. To create an ordered list, just use numbers followed by a period (like <code>1.</code>). To create an unordered list, add an asterisk, a plus sign, or a hyphen in front of your text (<code>*</code>, <code>+</code> or, <code>-</code>) and it will start an unordered list.</p>
<p>For example</p>
<pre><code class="lang-markdown">Ordered List
<span class="hljs-bullet"> 1.</span> First List
<span class="hljs-bullet"> 2.</span> Second List
<span class="hljs-bullet">    1.</span> Sublist 2.1
<span class="hljs-bullet">    2.</span> Sublist 2.2

 Unordered List
<span class="hljs-bullet"> *</span> List 1
<span class="hljs-bullet"> *</span> List 2
<span class="hljs-bullet">    +</span> Sublist 1.2
<span class="hljs-bullet">    +</span> Sublist 2.2
<span class="hljs-bullet"> -</span> Item a
<span class="hljs-bullet"> -</span> item b
</code></pre>
<p>Result</p>
<p>Ordered List</p>
<ol>
<li>First List</li>
<li><p>Second List</p>
<ol>
<li>Sublist 2.1</li>
<li>Sublist 2.2</li>
</ol>
<p>Unordered List</p>
</li>
<li>List 1</li>
<li>List 2<ul>
<li>Sublist 1.2</li>
<li>Sublist 2.2</li>
</ul>
</li>
<li>Item a</li>
<li>item b</li>
</ol>
<h3 id="heading-code">Code</h3>
<p>You can represent code in two ways in markdown: as inline code (like <code>this</code>), and as a codeblock (which you'll see below). </p>
<p>To create inline code, place your text within two backticks (``), for example:</p>
<pre><code class="lang-markdown"><span class="hljs-code">`inline code`</span>
</code></pre>
<p>Result:</p>
<p><code>inline code</code></p>
<p>To create a code block, enclose your code in triple backticks (```) at the beginning and end of the code block. You can also specify the programming language by adding the name of the language right after the first 3 backticks.</p>
<p>Here's an example:</p>
<pre><code class="lang-markdown">
</code></pre>
<p>def codeblock_example():
    print("Hello world!")</p>
<pre><code>
</code></pre><p>Result</p>
<pre><code>def codeblock_example():
    print(<span class="hljs-string">"Hello world!"</span>)
</code></pre><p>Here's an example code block in Python:</p>
<pre><code class="lang-python">```python
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">codeblock_example</span>():</span>
    print(<span class="hljs-string">"Hello world!"</span>)
</code></pre>
<pre><code>
Result

<span class="hljs-string">``</span><span class="hljs-string">`python
def codeblock_example():
    print("Hello world!")</span>
</code></pre><h3 id="heading-tables">Tables</h3>
<p>You can create a table using pipes and hyphens (<code>|</code> and <code>-</code>). The pipes divide your table into columns, while the hyphens create a horizontal line.</p>
<p>Here's an example of creating a basic table in Markdown:</p>
<pre><code class="lang-markdown">| Header 1 | Header 2 | Header 3 | Header 4 |
| -------- | -------- | -------- | -------- |
| Row 1, Col 1 | Row 1, Col 2 |Row 1, Col 3 | Row 1, Col 4 |
| Row 2, Col 1 | Row 2, Col 2 |Row 2, Col 3 | Row 2, Col 4 |
</code></pre>
<p>Result:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Header 1</td><td>Header 2</td><td>Header 3</td><td>Header 4</td></tr>
</thead>
<tbody>
<tr>
<td>Row 1, Col 1</td><td>Row 1, Col 2</td><td>Row 1, Col 3</td><td>Row 1, Col 4</td></tr>
<tr>
<td>Row 2, Col 1</td><td>Row 2, Col 2</td><td>Row 2, Col 3</td><td>Row 2, Col 4</td></tr>
</tbody>
</table>
</div><h3 id="heading-blockquotes">Blockquotes</h3>
<p>The greater than sign (<code>&gt;</code>) allows you to create a blockquote. You can add this sign in front of your statement or quote and it will indent and italicize the quote to set it apart from the rest of the text.</p>
<p>For example:</p>
<pre><code class="lang-markdown"><span class="hljs-quote">&gt; "The technology you use impresses no one. The experience you create with it is everything."</span>
<span class="hljs-quote">&gt; Sean Gerety - UX leader</span>
</code></pre>
<p>Result:</p>
<blockquote>
<p>"The technology you use impresses no one. The experience you create with it is everything." 
Sean Gerety - UX leader</p>
</blockquote>
<h3 id="heading-links">Links</h3>
<p>You can create or add links to your document using square brackets and parentheses (<code>[]</code> and <code>()</code>). Square brackets store the link text, while parentheses store the link URL.</p>
<p>For example:</p>
<pre><code class="lang-markdown">[<span class="hljs-string">freeCodeCamp</span>](<span class="hljs-link">https://www.freecodecamp.org/news/</span>)
</code></pre>
<p>Result:</p>
<p><a target="_blank" href="https://www.freecodecamp.org/news/">freeCodeCamp</a></p>
<p>The result is a clickable link that takes you to the freeCodeCamp site.</p>
<h3 id="heading-images">Images</h3>
<p>Adding images to your document is similar to adding links. The only difference is, you lead with an exclamation mark in front of the brackets and parentheses.</p>
<p>For example:</p>
<pre><code class="lang-markdown">![<span class="hljs-string">A cute cat image</span>](<span class="hljs-link">https://hips.hearstapps.com/hmg-prod/images/cute-cat-photos-1593441022.jpg?crop=1.00xw:0.753xh;0,0.153xh&amp;resize=1200:*</span>)
</code></pre>
<p><img src="https://hips.hearstapps.com/hmg-prod/images/cute-cat-photos-1593441022.jpg?crop=1.00xw:0.753xh;0,0.153xh&amp;resize=1200:*" alt="A cute cat image" width="1200" height="603" loading="lazy"></p>
<p>The result is the image of a cat.</p>
<h3 id="heading-emphasis">Emphasis</h3>
<p>To emphasize text or make it italic, you can wrap it in single (for italics) or double (for bold) asterisks or underscores (<code>*</code> or <code>_</code>).</p>
<p>For example:</p>
<pre><code class="lang-markdown"><span class="hljs-emphasis">*italic*</span> or <span class="hljs-emphasis">_italic_</span>
<span class="hljs-strong">**bold**</span> or <span class="hljs-strong">__bold__</span>
</code></pre>
<p>Result:</p>
<p><em>italic</em> or <em>italic</em>
<strong>bold</strong> or <strong>bold</strong></p>
<p>As you can see above, a single asterisk and underscore give your text an italic form while a double asterisk and underscore make your text bold.</p>
<h3 id="heading-escaping-characters"><strong>Escaping Characters</strong></h3>
<p>To display literal characters in markdown syntax, so they appear in your document without formatting it, you need to escape them using the backslash (<code>\</code>).</p>
<pre><code>\_literal underscore\_
</code></pre><p>Result:</p>
<p>_literal underscore_</p>
<h3 id="heading-html">HTML</h3>
<p>Markdown supports using HTML tags for more advanced formatting when there's a need for it.</p>
<p>Below are some of the ways you can use HTML tags in markdown:</p>
<ul>
<li>Images with HTML Attributes</li>
</ul>
<pre><code class="lang-markdown"><span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"image_url.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Alt text"</span> <span class="hljs-attr">width</span>=<span class="hljs-string">"300"</span> <span class="hljs-attr">height</span>=<span class="hljs-string">"200"</span>&gt;</span></span>
</code></pre>
<p>The HTML attribute within the image tag allows you to control properties like the width and height of the image.</p>
<ul>
<li>Styling with HTML and CSS</li>
</ul>
<pre><code class="lang-markdown"><span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"color:green"</span>&gt;</span></span>This is a green text.<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span></span>
</code></pre>
<p>Result:</p>
<p><span>This is a green text.</span></p>
<p>You can include inline CSS styles for more advanced styling in your document.</p>
<ul>
<li>Embedding Videos</li>
</ul>
<pre><code class="lang-markdown"><span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">iframe</span> <span class="hljs-attr">width</span>=<span class="hljs-string">"500"</span> <span class="hljs-attr">height</span>=<span class="hljs-string">"300"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://www.nova.com/embed/example-video"</span> <span class="hljs-attr">frameborder</span>=<span class="hljs-string">"0"</span> <span class="hljs-attr">allowfullscreen</span>&gt;</span></span><span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">iframe</span>&gt;</span></span>
</code></pre>
<p>You can embed videos in your document using the iframe HTML tag. The attributes within the tag allow you to control the video properties.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>This tutorial introduced you to using Markdown in VSCode. You learned how to initiate a Markdown file in VSCode, and you saw some common Markdown syntax. I hope you understand its importance for technical writers and content creators. </p>
<p>The synergy between Markdown and VSCode not only enhances productivity but also ensures a smooth transition into the world of standard documentation.</p>
<p>Whether you're writing technical documentation or contributing to collaborative coding efforts, you should now be equipped with a valuable skillset to help you effectively communicate and present your ideas.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Create a Static Markdown Blog with Deno and Deploy It ]]>
                </title>
                <description>
                    <![CDATA[ Deno is a runtime for JavaScript and TypeScript. The creator of Node.js built it, and while Node is built with C and C++, Deno is built with the Rust language. You might be wondering what some of the main differences between Node and Deno are. Well, ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-create-a-blog-with-deno/</link>
                <guid isPermaLink="false">66d038acd6e6a35e9f8e697d</guid>
                
                    <category>
                        <![CDATA[ blog ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Deno ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ TypeScript ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Rajdeep Singh ]]>
                </dc:creator>
                <pubDate>Tue, 13 Sep 2022 16:46:28 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/09/Create-a-Static-Markdown-Blog-with-Deno--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Deno is a runtime for JavaScript and TypeScript. The creator of Node.js built it, and while Node is built with C and C++, Deno is built with the Rust language.</p>
<p>You might be wondering what some of the main differences between Node and Deno are. Well, Rust is a low-level language similar to C and Java. It helps make Deno super fast, and Deno is also more secure than Node.</p>
<p>In this article, we will build a static markdown blog with Deno in less than five minutes. In the end, we'll deploy the markdown blog with Deno deploy.</p>
<p>We'll use Deno's third-party <a target="_blank" href="https://deno.land/x/blog">blog package</a> created by Ryan Dahl and another contributor for the blog</p>
<p>With the Deno blog module, you can create a fantastic blazing-fast blog. Then you can set up and deploy the blog with two lines of code. And it takes less than five minutes to configure it.</p>
<h3 id="heading-what-is-markdown">What is markdown?</h3>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Markdown">Markdown</a> is a lightweight markup language. It helps create consistently formatted text. To start working in markdown, you need an IDE that supports markdown and you'll need to create a file with a <code>.md</code> extension. Markdown typically supports written documents, blogs, and so on. </p>
<p>Some examples of documents written in Markdown are GitHub and npm READMEs, the React.js, and many more.</p>
<p>The Deno blog module (Package) comes with markdown support and lets you create a static blog. This module comes with lots of features, like:</p>
<ol>
<li>Markdown support.</li>
<li>Auto refresh. Any change in a markdown file automatically builds and reloads your website in the browser.</li>
<li>You can customize the header and add comments and a footer section.</li>
<li>It supports SEO, SEO markup, and an inbuilt feed (sitemap).</li>
<li>iFrames support with markdown files.</li>
<li>It has built-in Preact, TypeScript, and Tailwind CSS support.</li>
<li>It allows multiple authors </li>
<li>It has middleware and redirects pathname support </li>
<li>It comes with server-side Google Analytics support</li>
</ol>
<p>Here's a <a target="_blank" href="https://deno-markdown-blog.deno.dev/">demo of the blog we'll build and deploy:</a></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/denoblogdemo.gif" alt="deno blog demo" width="600" height="400" loading="lazy">
<em>deno blog demo</em></p>
<p>All the code is <a target="_blank" href="https://github.com/officialrajdeepsingh/deno-markdown-blog">available on GitHub</a>.</p>
<h3 id="heading-here-are-the-steps-well-follow">Here are the steps we'll follow:</h3>
<ol>
<li>How to install and setup the blog</li>
<li>How to understand the folder structure</li>
<li>How to start the local developer server</li>
<li>How to add more configuration to the blog.</li>
<li>How to deploy with Deno</li>
</ol>
<h2 id="heading-how-to-install-and-setup-the-blog">How to Install and Setup the Blog</h2>
<p>First, you'll need to install the Deno blog module. The blog module comes with the init command to create a new blog setup. It looks like this:</p>
<pre><code>deno run -r --allow-read --allow-write https:<span class="hljs-comment">//deno.land/x/blog/init.ts my-deno-demo-blog-name</span>
</code></pre><p><img src="https://www.freecodecamp.org/news/content/images/2022/09/create-deno-blog.png" alt="Create a blog setup with the deno blog module" width="600" height="400" loading="lazy">
<em>Create a blog setup with the deno blog module</em></p>
<h2 id="heading-how-to-understand-the-folder-structure">How to Understand the Folder Structure</h2>
<p>The beauty of Deno is that you only need a few files to start a project. For the markdown blog, you need only four files:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/deno-blog-folder-structure--1-.png" alt="deno folder structure" width="600" height="400" loading="lazy">
<em>deno folder structure</em></p>
<p>Let's go through each file in the above folder structure:</p>
<ul>
<li>In the <code>deno.jsonc</code> file you add tasks and the importMap file. Tasks are similar to scripts in Node, and in the importMap section, you pass a JSON file that contains all your import packages from Deno.</li>
<li>The <code>import_map.json</code> file contains imports of all packages which you need to run your project.</li>
<li>The <code>posts</code> folder contains all markdown files.</li>
<li>The <code>main.tsx</code> file contains all configurations for the blog module.</li>
</ul>
<h2 id="heading-how-to-start-the-local-developer-server">How to Start the Local Developer Server</h2>
<p>After installation is complete, run the local development server with the <code>deno task dev</code> command.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/run-deno-blog.png" alt="Run deno local development server" width="600" height="400" loading="lazy">
<em>Run deno local development server</em></p>
<h2 id="heading-how-to-add-more-configuration-to-the-blog">How to Add More Configuration to the Blog</h2>
<p>The blog module default comes with the following configuration in the <code>main.tsx</code> file. You can easily change blog configurations according to your requirements.</p>
<pre><code class="lang-typescript"><span class="hljs-comment">// main.tsx</span>

<span class="hljs-keyword">import</span> blog, { ga, redirects, h } <span class="hljs-keyword">from</span> <span class="hljs-string">"blog"</span>;

blog({
  title: <span class="hljs-string">"My Blog"</span>,
  description: <span class="hljs-string">"This is my new blog."</span>,
  <span class="hljs-comment">// header: &lt;header&gt;Your custom header&lt;/header&gt;,</span>
  <span class="hljs-comment">// section: &lt;section&gt;Your custom section&lt;/section&gt;,</span>
  <span class="hljs-comment">// footer: &lt;footer&gt;Your custom footer&lt;/footer&gt;,</span>
  avatar: <span class="hljs-string">"https://deno-avatar.deno.dev/avatar/blog.svg"</span>,
  avatarClass: <span class="hljs-string">"rounded-full"</span>,
  author: <span class="hljs-string">"An author"</span>,

  <span class="hljs-comment">// middlewares: [</span>

    <span class="hljs-comment">// If you want to set up Google Analytics, paste your GA key here.</span>
    <span class="hljs-comment">// ga("UA-XXXXXXXX-X"),</span>

    <span class="hljs-comment">// If you want to provide some redirections, you can specify them here,</span>
    <span class="hljs-comment">// pathname specified in a key will redirect to pathname in the value.</span>
    <span class="hljs-comment">// redirects({</span>
    <span class="hljs-comment">//  "/hello_world.html": "/hello_world",</span>
    <span class="hljs-comment">// }),</span>

  <span class="hljs-comment">// ]</span>
});
</code></pre>
<h3 id="heading-custom-configuration">Custom configuration</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/denoblog.png" alt="Demo of custom configuration" width="600" height="400" loading="lazy">
<em>Demo of custom configuration</em></p>
<p>With custom configuration, you can make your website look however you want – even like the example above. In addition, you can quickly add more custom configurations to your blog. </p>
<p>For example, you can change the default header, footer, title, author, theme, custom style, links, section, and so on. Here's some code to do that:</p>
<pre><code class="lang-javascript"><span class="hljs-comment">// main.tsx</span>

<span class="hljs-comment">/** <span class="hljs-doctag">@jsx </span>h */</span>
<span class="hljs-keyword">import</span> blog, { h } <span class="hljs-keyword">from</span> <span class="hljs-string">"blog"</span>;
<span class="hljs-keyword">import</span> { Section } <span class="hljs-keyword">from</span> <span class="hljs-string">'./components/Section.jsx'</span>;

blog({
  <span class="hljs-attr">author</span>: <span class="hljs-string">"Rajdeep singh"</span>,
  <span class="hljs-attr">title</span>: <span class="hljs-string">"Hello, my name is Rajdeep Singh"</span>,
  <span class="hljs-attr">description</span>: <span class="hljs-string">"Nice to meet you"</span>,
  <span class="hljs-attr">avatar</span>:<span class="hljs-string">"assets/logos/profile.jpg"</span>,
  <span class="hljs-attr">avatarClass</span>: <span class="hljs-string">"rounded-full"</span>,
  <span class="hljs-attr">coverTextColor</span>:<span class="hljs-string">"white"</span>,
  <span class="hljs-attr">links</span>: [
    { <span class="hljs-attr">title</span>: <span class="hljs-string">"Email"</span>, <span class="hljs-attr">url</span>: <span class="hljs-string">"mailto:officialrajdeepsingh@gmail.com"</span> },
    { <span class="hljs-attr">title</span>: <span class="hljs-string">"GitHub"</span>, <span class="hljs-attr">url</span>: <span class="hljs-string">"https://github.com/officialrajdeepsingh"</span> },
    { <span class="hljs-attr">title</span>: <span class="hljs-string">"Twitter"</span>, <span class="hljs-attr">url</span>: <span class="hljs-string">"https://twitter.com/Official_R_deep"</span> },
    { <span class="hljs-attr">title</span>: <span class="hljs-string">"Linkedin"</span>, <span class="hljs-attr">url</span>: <span class="hljs-string">"https://www.linkedin.com/in/officalrajdeepsingh/"</span> },
  ],
  <span class="hljs-attr">lang</span>: <span class="hljs-string">"en"</span>,
  <span class="hljs-attr">favicon</span>: <span class="hljs-string">"favicon.ico"</span>,
  <span class="hljs-attr">section</span>: <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Section</span>/&gt;</span></span>,
  theme:<span class="hljs-string">"auto"</span>,
  <span class="hljs-attr">cover</span>:<span class="hljs-string">"assets/logos/backgroundbanner.png"</span>,
  <span class="hljs-attr">ogImage</span>: {
    <span class="hljs-attr">url</span>: <span class="hljs-string">"http://localhost:8000/assets/logos/Frame.png"</span>,
    <span class="hljs-attr">twitterCard</span>:  <span class="hljs-string">"summary_large_image"</span> 
  },
  <span class="hljs-attr">style</span>:<span class="hljs-string">".markdown-body ul, .markdown-body ol { list-style: disc !important;}"</span>
});
</code></pre>
<p>Markdown files support various types of frontMatter. The most common and widely used fontMatter types are:</p>
<ol>
<li>YAML: YAML is identified by opening and closing <code>---</code>.</li>
<li>JSON: JSON is identified by '<code>{</code>' and '<code>}</code>'.</li>
<li>TOML: TOML is identified by opening and closing <code>+++</code>.</li>
</ol>
<p>The most common frontMatter is <a target="_blank" href="https://yaml.org/">YAML</a>. The YAML frontMatter support markdown file is everywhere. But <strong>the Deno blog module only supports yml frontMatter</strong>. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/markdownfile.png" alt="yml front matter example" width="600" height="400" loading="lazy">
<em>yml front matter example</em></p>
<p>The Markdown file is divided into two sections. The first section is the header (frontMatter), and the second is the body section.</p>
<p>The header section contains all metadata for the article. All the metadata is written inside three dashes (<code>---</code>) both opening and closing – for example, post title, tag, description, publish date, and so on. </p>
<p>Finally, in the body section, you write your article body and explain it.</p>
<pre><code class="lang-markdown">// hello-world.md

---
author : "Rajdeep Singh"
publish<span class="hljs-emphasis">_date : "2020-11-10T11:42:46Z"
description : "Easy Ways Add CSS in Next.js #SeriesPart2"
og:image : "assets/images/next.js-add-css-code.jpg"
tags : ["Next.js", "Next", "Next.js Framework", "Next.js Tutorial", "React.js", "react.js tutorial"]
title : "How To Add CSS In Next js?"
allow_</span>iframes: true
cover<span class="hljs-emphasis">_html: <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"assets/images/next.js-add-css-code.jpg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"How To Add CSS In Next js"</span> /&gt;</span></span>
pathname: "hello-world"
---

First blog post created with the Deno blog package. It is an amazing package you can use to create markdown blogs with Tailwind CSS. 

<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">iframe</span> <span class="hljs-attr">width</span>=<span class="hljs-string">"560"</span> <span class="hljs-attr">height</span>=<span class="hljs-string">"315"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://www.youtube-nocookie.com/embed/3NR9Spj0DmQ"</span> <span class="hljs-attr">title</span>=<span class="hljs-string">"YouTube video player"</span> <span class="hljs-attr">frameborder</span>=<span class="hljs-string">"0"</span> <span class="hljs-attr">allow</span>=<span class="hljs-string">"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"</span> <span class="hljs-attr">allowfullscreen</span>&gt;</span></span><span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">iframe</span>&gt;</span></span>


```javascript
console.log("hello world")</span>
</code></pre>
<pre><code>
The Deno blog <span class="hljs-built_in">module</span> supports the following YML FrontMatter fields <span class="hljs-keyword">in</span> a markdown file:

<span class="hljs-number">1.</span> author (string): The <span class="hljs-string">`author`</span> contains the names <span class="hljs-keyword">of</span> the authors. For example, <span class="hljs-string">`author : "Rajdeep singh , deno"`</span>
<span class="hljs-number">2.</span> publish_date(<span class="hljs-built_in">Date</span>):  The <span class="hljs-string">`publish_date`</span> is required <span class="hljs-keyword">for</span> the article.
<span class="hljs-number">3.</span> description (string): The <span class="hljs-string">`description`</span> is required <span class="hljs-keyword">for</span> the description.
<span class="hljs-number">4.</span> og:image(string): The <span class="hljs-string">`og:image`</span> is not required. It is used <span class="hljs-keyword">for</span> <span class="hljs-string">`&lt;meta property="og:image" content="assets/images/Title-tag-In-HTML-5.jpg"&gt;`</span>
<span class="hljs-number">5.</span> tags(string[]): The <span class="hljs-string">`tags`</span> are just keywords used <span class="hljs-keyword">for</span> SEO. They<span class="hljs-string">'re not compulsory.
6. title(string): The `title` is required for the heading.
7. allow_iframes( boolean ): the `allow_iframes` allows you to use `iframe` HTML.
8. pathname( string ): pathname is not required. For example, `http://yourdomain.com/hello-world` after your domain `hello-world` is your pathname
9. cover_html(string): The `cover_html` contains the HTML for the blog.</span>
</code></pre><p>author : "Rajdeep Singh , Rajvinder singh"
publish_date : "2022-03-20T13:09:24Z"
description : "Npm install command help to install package from npmjs.org"
og:image : "assets/images/npm-init-command-1.png"
tags : ["npm-test", "npm-cli", "npm install command"]
title : "What is the npm install command?"
allow_iframes: true
pathname:"/how-is-npm-install-command"
cover_html: <img src="assets/images/npm-init-command-1.png" alt="npm command" width="600" height="400" loading="lazy"></p>
<pre><code>
These are all the supported fields by YML frontMatter <span class="hljs-keyword">for</span> markdown files:
</code></pre><p>title, author, publish_date, description, og:image, tags, allow_iframes, pathname, cover_html</p>
<pre><code>
This is the required field <span class="hljs-keyword">for</span> markdown files:
</code></pre><p>title
```</p>
<p>Without a title filed, the blog module produces an error <code>Uncaught TypeError: Cannot read properties of undefined (reading 'snippet')</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/undefiend-snippet-error.png" alt="error: Uncaught TypeError: Cannot read properties of undefined (reading 'snippet')" width="600" height="400" loading="lazy">
<em>Error: Uncaught TypeError: Cannot read properties of undefined (reading 'snippet')</em></p>
<h2 id="heading-how-to-deploy-your-blog-with-deno">How to Deploy Your Blog with Deno</h2>
<p>The final step is to deploy our static blog in Deno. Currently, the Deno blog module only supports Deno for deployment. But Deno deploy provides a similar interface to Netlify and Vercel. So you can easily understand the dashboard if you've worked with those tools before.</p>
<p>To deploy a new blog on Deno, you need two things. The first is an account on <a target="_blank" href="https://deno.com/deploy">Deno deploy</a>, and the second is a GitHub account. With a GitHub repository to help manage your articles, it is a straightforward process similar to <a target="_blank" href="https://vercel.com/">Vercel</a> and <a target="_blank" href="https://www.freecodecamp.org/news/p/00c3cfd3-6447-48dc-a915-804b26bf056e/netlify.com">Netlify</a>.</p>
<h3 id="heading-deployment-steps">Deployment steps:</h3>
<p>Here are the steps to deploy your blog with Deno deploy (we'll go through each one in detail below):</p>
<ol>
<li>First, login to your account on Deno deploy</li>
<li>Click to create a new project</li>
<li>Configure the GitHub repository and environment variables</li>
<li>Deploy the static blog</li>
</ol>
<h3 id="heading-login-to-your-account-on-deno-deploy">Login to your account on Deno deploy</h3>
<p>First, go to the <a target="_blank" href="https://deno.com/deploy">Deno deploy</a> website and create a new account if you don't have one already. If you do, then login to your account.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/deno-deploy-dashboard.png" alt="deno deploy website" width="600" height="400" loading="lazy">
<em>deno deploy website</em></p>
<h3 id="heading-click-to-create-a-new-project">Click to create a new project</h3>
<p>After successfully logging in, you can now access the Deno dashboard and click on the "+ <strong>new project</strong>" button.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/create-project-with-deno.png" alt="create a new project with deno deploy" width="600" height="400" loading="lazy">
<em>Create a new project with deno deploy</em></p>
<h3 id="heading-configure-the-github-repository-and-environment-variables">Configure the GitHub repository and environment variables</h3>
<p>After clicking on the <strong>new project</strong> button, you'll be redirected to the project configuration page. Your project page will look like the below. Just fill in all the details:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/fillinfoindeno.png" alt="Fill new project configuration and link github" width="600" height="400" loading="lazy">
<em>Fill out your new project configuration and link to GitHub</em></p>
<p>The first time click the GitHub button. After that, Deno deploys and asks for permission for a GitHub account. After granting all the permissions, your project page looks like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/clicktolinkbuttontodeployblogondeno.png" alt="Image" width="600" height="400" loading="lazy">
<em>After finishing the information</em></p>
<ol>
<li>After opening the project page, you fill in all the required information.</li>
<li>Then, in the second step, select the GitHub repository.</li>
<li>After selecting the GitHub repository, select a branch, then choose  <code>main.tsx</code> file.</li>
<li>Give any project name, but make sure you name is in lowercase letters – for example, my-new-website. Otherwise, you'll get a capital case error.</li>
<li>Click on the environment variable and add an environment (if you have one - otherwise, skip it).</li>
</ol>
<p>And that's it - you've done all the configuration successfully. Now click on the link button.</p>
<h3 id="heading-deployment-is-finished">Deployment is finished</h3>
<p>After deployment is finished, you'll see the website dashboard. Click on the view button to view your production-ready website.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/denowebsitedashborad.png" alt="Your website dashboard with deno looks like after successfully website deployment" width="600" height="400" loading="lazy">
<em>Your website dashboard with deno looks like this after successful website deployment.</em></p>
<p>Here's a tip to help you manage all your markdown files and speed up your written work. The VS Code code editor has a free, open-source <a target="_blank" href="https://frontmatter.codes/">FrontMatter VS Code extension</a>. It's a great tool to manage all your markdown files inside VS Code with the FrontMatter dashboard.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/09/Screenshot-from-2022-09-13-18-18-32.png" alt="manage markdown file with vscode extenshion" width="600" height="400" loading="lazy">
<em>Manage markdown files with VS Code extension</em></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>The Deno blog module is an excellent library for creating a personal blog in five minutes and deploying it with Deno. Deno deployment is speedy. It takes less than ten seconds. </p>
<p>I think the Deno blog module is best for personal use because you do not need to customize many things. You only customize the header, footer, and various sections.</p>
<p>Thank you for reading!</p>
<h3 id="heading-references-to-help-you-setup-your-blog">References to help you setup your blog:</h3>
<ul>
<li><a target="_blank" href="https://deno.land/">https://deno.land/</a></li>
<li><a target="_blank" href="https://deno.com/deploy">https://deno.com/deploy</a></li>
<li><a target="_blank" href="https://deno.land/x/blog@0.5.0">https://deno.land/x/blog</a></li>
<li><a target="_blank" href="https://deno.land/x/dotenv">https://deno.land/x/dotenv</a></li>
<li><a target="_blank" href="https://frontmatter.codes/">https://frontmatter.codes/</a></li>
</ul>
<hr>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Markdown Cheat Sheet – How to Write Articles in Markdown Language ]]>
                </title>
                <description>
                    <![CDATA[ As a developer, you have likely heard of HTML, which stands for HyperText Markup Language. And you may know that HTML is a language used to create websites – but what does markup mean? Markup languages are languages that use tags to define different ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/markdown-cheatsheet/</link>
                <guid isPermaLink="false">66bc55e5a30f8b3984dad877</guid>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markup ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kealan Parr ]]>
                </dc:creator>
                <pubDate>Mon, 22 Aug 2022 22:16:38 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/08/Markdown-cheatsheet.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>As a developer, you have likely heard of <a target="_blank" href="https://en.wikipedia.org/wiki/HTML">HTML</a>, which stands for <strong>H</strong>yper<strong>T</strong>ext <strong>M</strong>arkup <strong>L</strong>anguage.</p>
<p>And you may know that HTML is a language used to create websites – but what does <strong>markup</strong> mean?</p>
<p><a target="_blank" href="https://techterms.com/definition/markup_language">Markup languages</a> are languages that use tags to define different elements within a text document. Most people are familiar with <strong>Rich Text Editors</strong> – programs that allow users to add extra formatting, images, and links to their documents.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-30.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A screenshot of the GUI of the Microsoft Word software (a Rich Text Editor).</em></p>
<p>But markup languages use tags like:</p>
<ul>
<li><p>is a paragraph tag.</p>
</li>
<li><p>makes bold text.</p>
</li>
</ul>
<p>There are quite a few markup languages like <a target="_blank" href="https://en.wikipedia.org/wiki/XML">XML</a>, <a target="_blank" href="https://en.wikipedia.org/wiki/HTML">HTML</a>, and the topic of this article: <strong>Markdown</strong>.</p>
<p>Developers generally use markdown for documentation – and it is often included in most repositories. For example, I used markdown to write this article on freeCodeCamp.</p>
<p>So let's look at all we can do with markdown.</p>
<p><strong>Disclaimer:</strong> There is no unifying body or specification to standardise markdown – just some widely accepted best practices. So your mileage might vary depending on what markdown parser you're using for this cheat sheet.</p>
<h1 id="heading-markdown-cheat-sheet">Markdown Cheat Sheet</h1>
<p>Here are some of the most commonly used methods for manipulating text in markdown.</p>
<h1 id="heading-how-to-create-headers-in-markdown">How to Create Headers in Markdown</h1>
<p>There are six markdown headers, H1 thorough to H6. I'll show you how it displays visually, and also the way you create it using markdown.</p>
<p>H1's are the biggest and generally are the "main" headers, and each header after H1 gets smaller.</p>
<h1 id="heading-h1-tag">H1 tag</h1>
<p><code># H1 tag</code></p>
<h2 id="heading-h2-tag">H2 tag</h2>
<p><code>## H2 tag</code></p>
<h3 id="heading-h3-tag">H3 tag</h3>
<p><code>### H3 tag</code></p>
<h4 id="heading-h4-tag">H4 tag</h4>
<p><code>#### H4 tag</code></p>
<h5 id="heading-h5-tag">H5 Tag</h5>
<p><code>##### H5 tag</code></p>
<h6 id="heading-h6-tag">H6 tag</h6>
<p><code>###### H6 tag</code></p>
<h1 id="heading-how-to-add-typographical-emphasis-in-markdown">How to Add Typographical Emphasis in Markdown</h1>
<p>The ways you commonly add emphasis with text are bold, italics and strikethroughs. Combining too much emphasis can make words much less clear, so choose carefully how you want to emphasize each bit of text.</p>
<p>There are also subscript and superscript notation that you'll use to write the names of various chemical compounds, for example. You may also use them as part of mathematical notation.</p>
<p><strong>How to make text bold:</strong></p>
<p>Add double asterisks around your text. It'll make that text appear bold. Like this: <code>**Bold text**</code></p>
<p><em>How to make your text italic:</em></p>
<p>Add single asterisks around your text to make it appear in italics, like this: <code>*Italics*</code></p>
<p>How to <s>Strike through</s> certain text:</p>
<p>If you want to "cross something out" in text, use the strikethrough method, like this: <code>~~Strike through~~</code>.</p>
<h3 id="heading-how-to-write-subscripts-in-markdown">How to Write Subscripts in Markdown</h3>
<p>If you want to write the chemical symbol for water, for example, you can make a subscript "2" by typing <code>H~2~0</code>.</p>
<p>This results in: H<sub>2</sub>0.</p>
<h3 id="heading-how-to-write-superscripts-in-markdown">How to Write Superscripts in Markdown</h3>
<p>Say you want to write an exponent - or superscript. You do that like this: <code>X^2^</code> which results in this: X<sup>2</sup>.</p>
<h1 id="heading-how-to-make-lists-in-markdown">How to Make Lists in Markdown</h1>
<p>There are multiple types of lists in markdown. For example, you can have ordered lists and unordered lists.</p>
<p>Ordered lists are commonly used when you want to follow steps in a certain order (like following a recipe: cook the chicken...serve the dish). But unordered lists work well for things that don't require sequential steps like a recipe (a shopping list, for example).</p>
<h3 id="heading-how-to-make-an-unordered-list-in-markdown">How to Make an Unordered List in Markdown</h3>
<p>This is how the unordered list looks.</p>
<ul>
<li><p>Chili oil</p>
</li>
<li><p>Rice</p>
</li>
<li><p>Spring onions</p>
</li>
</ul>
<p>And this is how you create it in markdown:</p>
<pre><code class="lang-javascript">- Chili oil
- Rice
- Spring onions
</code></pre>
<h3 id="heading-how-to-make-an-ordered-list-in-markdown">How to Make an Ordered List in Markdown</h3>
<p>This is how the ordered list looks.</p>
<ol>
<li><p>First item</p>
</li>
<li><p>Second item</p>
</li>
</ol>
<p>And this is how you create it in markdown:</p>
<pre><code class="lang-javascript"><span class="hljs-number">1.</span> First item 
<span class="hljs-number">2.</span> Second item
</code></pre>
<h1 id="heading-how-to-create-links-in-markdown">How to Create Links in Markdown</h1>
<p>The two most common ways of linking things in markdown documents is either by hyperlinks or images. Both can help make your writing much clearer and more eloquent, and should be used where appropriate.</p>
<p>Here's what a hyperlink in text looks like:</p>
<p><a target="_blank" href="https://www.kealanparr.com">Kealan's site</a></p>
<p>And here's how you'd create that link in Markdown:</p>
<p><code>[Kealan's site](https://www.kealanparr.com)</code></p>
<p>You put the text you want to link in square brackets (here, "Kealan's site"), and then immediately follow them with parenthesis containing the URL.</p>
<p>Say you want to include an image in an article. To get it to appear like this:</p>
<p><img src="https://images.unsplash.com/photo-1660866838784-6c5158c0f979?ixlib=rb-1.2.1&amp;ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&amp;auto=format&amp;fit=crop&amp;w=387&amp;q=80" alt="View of natural rock landscape formations making a valley ending in a road crossing through with a blue sky." width="600" height="400" loading="lazy"></p>
<p>You simple use the following notation:</p>
<pre><code class="lang-javascript">![View <span class="hljs-keyword">of</span> natural rock landscape formations making a valley ending <span class="hljs-keyword">in</span> a road crossing through <span class="hljs-keyword">with</span> a blue sky.](https:<span class="hljs-comment">//images.unsplash.com/photo-1660866838784-6c5158c0f979?ixlib=rb-1.2.1&amp;ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&amp;auto=format&amp;fit=crop&amp;w=387&amp;q=80)</span>
</code></pre>
<p>It's similar to a regular link, but you include the exclamation point before the brackets.</p>
<h2 id="heading-how-to-use-html-in-markdown">How to Use HTML in Markdown</h2>
<p>You can use regular HTML in Markdown documents (depending on the parser that's being used).</p>
<p>So feel free to just input any valid HTML you like.</p>
<h2 id="heading-how-to-add-spacing-in-markdown">How to Add Spacing in Markdown</h2>
<p>If you want to add a horizontal line to divide up sections of a document, you can make one like this:</p>
<hr>
<p>By using three dashes like this:</p>
<pre><code class="lang-javascript">---
</code></pre>
<h2 id="heading-how-to-create-tables-in-markdown">How to Create Tables in Markdown</h2>
<p>Tables come in handy in your articles. To make a table that looks like this:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Name</td><td>Age</td></tr>
</thead>
<tbody>
<tr>
<td>Kealan</td><td>25</td></tr>
<tr>
<td>Jake</td><td>28</td></tr>
</tbody>
</table>
</div><p>Here's the notation you'd use:</p>
<pre><code class="lang-javascript">| Name   | Age |
| ------ | --- |
| Kealan | <span class="hljs-number">25</span>  |
| Jake   | <span class="hljs-number">28</span>  |
</code></pre>
<p>The only real "gotcha" you have to be aware of when making a markdown table is that you keep the pipes (|) vertically in line. Then your markdown table will appear as above in this article. An image to make that clearer is:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/08/image-139.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A markdown table is displayed, with Name and Age as the headers and Kealan, Jake and 25 &amp; 28 as the values.</em></p>
<h2 id="heading-how-to-add-code-and-syntax-in-markdown"><strong>How to Add Code and Syntax in Markdown</strong></h2>
<p>Adding code snippets to your markdown can be incredibly helpful if you are creating documentation for developers, for example.</p>
<p>The below is a very simple JavaScript example, but almost all modern programming languages are supported (with syntax highlighting and so on).</p>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">'example log'</span>)
</code></pre>
<pre><code class="lang-javascript"><span class="hljs-built_in">console</span>.log(<span class="hljs-string">'example log'</span>)
</code></pre>
<p>Just type the three backticks followed by the programming language and then enter to start writing your code. End the code block with three backticks.</p>
<h1 id="heading-how-to-add-quotes-in-markdown">How to Add Quotes in Markdown</h1>
<p>When you reference someone else's work, it is expected and courteous to credit them. One easy way you can do that is by quoting them.</p>
<p>If you want to add quotes in markdown:</p>
<blockquote>
<p>"This is a quote, from someone who is very wise" - Anonymous</p>
</blockquote>
<p>Just add this symbol, which renders it like the above quote:</p>
<p><code>&gt; "This is a quote, from someone who is very wise" - Anonymous</code></p>
<h1 id="heading-conclusion">Conclusion</h1>
<p>I hope this has been a useful reference for you, and that you've learned a new feature of markdown you hadn't seen before.</p>
<p>There are lots more features (not even counting all the HTML variations you could create), but this article has covered the most used features.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Add Diagrams to GitHub Markdown Files ]]>
                </title>
                <description>
                    <![CDATA[ Previously, if you wanted to include a diagram in your GitHub README file, you would've needed to add it like an image created with third-party software.  This worked, and let us complete our tasks – but why settle for less when you can create a diag... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-add-diagrams-to-github-readme/</link>
                <guid isPermaLink="false">66bd909a2384aa6dc0878d6a</guid>
                
                    <category>
                        <![CDATA[ GitHub ]]>
                    </category>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kaushal Joshi ]]>
                </dc:creator>
                <pubDate>Thu, 17 Feb 2022 16:37:07 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/02/How-to-Add-Diagrams-to-GitHub-Markdown-Files.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Previously, if you wanted to include a diagram in your GitHub README file, you would've needed to add it like an image created with third-party software. </p>
<p>This worked, and let us complete our tasks – but why settle for less when you can create a diagram within the README file itself? Well, now you can.</p>
<p>On February 14th, GitHub gifted a new feature to all <em>devlovers</em>. Mermaid syntax is now supported by default in GitHub Markdown. This means that we can now create and edit diagrams in the native markdown file.</p>
<p>But first, what is Mermaid?</p>
<h2 id="heading-what-is-mermaid">What is Mermaid? 🧜‍♀️</h2>
<p><a target="_blank" href="https://mermaid-js.github.io/">Mermaid</a> is a tool that renders diagrams based on markdown-like text content. It helps us visualize documentation and catch it up with development by dynamically creating and modifying diagrams in the browser. </p>
<p>Mermaid supports various types of diagrams, such as UML diagrams, Gantt charts, Git Graphs, and User Journey Diagrams.</p>
<h2 id="heading-how-does-mermaid-work">How Does Mermaid Work? 🤔</h2>
<p>According to the official GitHub blog, when a code block marked as <code>mermaid</code> is encountered, the raw mermaid syntax in the block is passed to Mermaid.js and an iframe is generated. The iframe is injected into the page, pointing <code>src</code> to the Viewscreen service. Viewscreen is GitHub's internal file rendering service which is partially responsible for this whole process.</p>
<p>The entire process is explained well in the official announcement blog. Here's a representation of how the Mermaid code block is dynamically rendered in the browser:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645105817746/kgxkzcsoY.png" alt="github-mermaid-working.png" width="679" height="555" loading="lazy">
<em>rendering Mermaid code</em></p>
<h2 id="heading-mermaid-demo">Mermaid Demo 🧐</h2>
<p>To integrate Mermaid in your README, you don't need to add any external thing whatsoever! You just have to make a code block with the <code>mermaid</code> language designation.</p>
<p>But don't worry – you don't need to learn a new language or script. If you have an idea about markdown and supported diagrams, you won't find it too hard to get started.</p>
<p>Sounds simple? Let's make a user journey diagram of me studying for exams.</p>
<p>In your GitHub Web, open any markdown file. Paste the below code into the write section and hit preview.</p>
<pre><code class="lang-mermaid">
</code></pre>
<p>journey
    title Me studying for exams
    section Exam is announced
        I start studying: 1: Me
        Make notes: 2: Me
        Ask friend for help: 3: Me, Friend
        We study togther: 5: Me, Friend
    section Exam Day
        Syllabys is incomplete: 2: Me
        Give exam: 1: Me, Friend
    section Result Declared
        I passed the exam with destinction!: 5: Me
        Friend barely gets passing marks: 2: Friend</p>
<pre><code>
</code></pre><p>Don't forget to enclose it in code blocks and add <code>mermaid</code> at the beginning.<br>Like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645109309368/yQ6EyCj7E.png" alt="image.png" width="600" height="400" loading="lazy"></p>
<p>When rendered, it will look something like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645105399104/PCryqtntS.png" alt="github-mermaid-demo.png" width="600" height="400" loading="lazy">
<em>User Diagram created with Mermaid in GitHub README</em></p>
<blockquote>
<p>Fun fact: The sequence diagram depicting the rendering Mermaid syntax above is also rendered with the new feature. You can find the code <a target="_blank" href="https://gist.github.com/martinwoodward/8ad6296118c975510766d80310db71fd">here</a>.</p>
</blockquote>
<h2 id="heading-final-words">Final Words 👋</h2>
<p>Mermaid integration allows you to keep your diagrams close to the documentation, saving time and effort spent managing a separate software. </p>
<p>You can read the original GitHub blog <a target="_blank" href="https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/">here</a> or have a look at <a target="_blank" href="https://mermaid-js.github.io/">Mermaid</a>'s official documentation.</p>
<h2 id="heading-before-we-end">Before We End ✨</h2>
<p>I was inspired to write this article because I was eager to try out this feature as soon as I heard about its release. I hope you found this article helpful. I have my own <a target="_blank" href="https://clumsycoder.hashnode.dev/">personal blog</a> where I talk about web development and my experiences.</p>
<p>My DMs are always open if you want to say hello. I am most active on <a target="_blank" href="https://twitter.com/clumsy_coder">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/7JKaushal/">LinkedIn</a>, and <a target="_blank" href="https://www.showwcase.com/">Showwcase</a>. See you there!</p>
<p>Till then, happy documenting! 📃</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Markdown Cheat Sheet – How to Write in Markdown with Examples ]]>
                </title>
                <description>
                    <![CDATA[ Markdown has gained popularity because it's easy to use and it's widely accepted across platforms.  You can use markdown to write content that can be conveyed in plain text. A good example would be a blog post. In this article, you'll learn what mark... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/markdown-cheat-sheet/</link>
                <guid isPermaLink="false">66adea601ad24d82983fd253</guid>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Zaira Hira ]]>
                </dc:creator>
                <pubDate>Thu, 10 Feb 2022 16:31:38 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/01/Copy-of-Copy-of-Cron-jobs-Linux.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Markdown has gained popularity because it's easy to use and it's widely accepted across platforms. </p>
<p>You can use markdown to write content that can be conveyed in plain text. A good example would be a blog post.</p>
<p>In this article, you'll learn what markdown is and how to use it.</p>
<h2 id="heading-what-is-markdown">What is Markdown?</h2>
<p>Markdown is a markup language just like HTML. We use it to parse text and convert it into a specific format. You can also think of it as a text to HTML converter tool. </p>
<p>Many developers like writing in markdown because it gives them fine-grained control over their text and code. We'll see how and why in the coming paragraphs.</p>
<h2 id="heading-in-this-guide-well-cover-the-following-topics">In this guide we'll cover the following topics.</h2>
<ul>
<li>How to create your first markdown file.</li>
<li>Create a cheat sheet for markdown</li>
<li>Discuss how markdown can be rendered in VS Code</li>
</ul>
<h2 id="heading-tools-that-support-markdown">Tools that Support Markdown</h2>
<p>Markdown works in any browser even if you use a simple notepad. But there are certain tools that can help enhance your productivity by providing a real time view (of markdown and rich text) side by side.</p>
<p>The following are some of the tools that support working with markdown:</p>
<ul>
<li>VSCode (We'll cover this in this article)</li>
<li>Atom</li>
<li>Haroopad</li>
<li>Sublime text</li>
<li>MarkPad</li>
</ul>
<h2 id="heading-how-to-work-with-markdown">How to Work with Markdown</h2>
<h3 id="heading-download-vscode-and-enable-the-plugin">Download VSCode and enable the plugin</h3>
<p>VSCode is a text editor like notepad, but it has many more capabilities. You can also use it for coding and it supports numerous programming languages. </p>
<p>We'll be using VSCode to write and render markdown files.</p>
<p>You can download VSCode from <a target="_blank" href="https://code.visualstudio.com/download\">here</a>.</p>
<p>Once your download is completed, activate the below extension:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-118.png" alt="Image" width="600" height="400" loading="lazy">
<em>VS code extension</em></p>
<h3 id="heading-how-to-create-your-first-markdown-file">How to create your first markdown file</h3>
<p>To work with markdown, simply save the text file with <code>.md</code> extension. After that, you'll be able to apply markdown syntax.</p>
<p>After creating your file and activating the plugin, the workspace should look something like this.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-119.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-markdown-in-action">Markdown in action</h3>
<p>In markdown, we use a specific syntax to denote headings, bold text, lists, and other text formatting. </p>
<p>You can refer to the table below for an overview of basic markdown syntax:</p>
<table>
<thead>
<tr>
<th>Task</th>
<th>Markdown syntax</th>
</tr>
</thead>
<tbody>
<tr>
<td>Heading 1</td>
<td>#</td>
</tr>
<tr>
<td>Heading 2</td>
<td>##</td>
</tr>
<tr>
<td>Heading 3</td>
<td>###</td>
</tr>
<tr>
<td>Italics</td>
<td><em>italics</em></td>
</tr>
<tr>
<td>Bold</td>
<td><strong>Bold</strong></td>
</tr>
<tr>
<td>Strike</td>
<td>insert text</td>
</tr>
<tr>
<td>Block quote</td>
<td>&gt;</td>
</tr>
<tr>
<td>Links</td>
<td><a target="_blank" href="link.com">link name</a></td>
</tr>
<tr>
<td>Unordered list</td>
<td><em> List item </em> List item</td>
</tr>
<tr>
<td>Code Block</td>
<td><code>insert code here</code></td>
</tr>
<tr>
</tr>
</tbody>
</table>

<p>Simply start writing in your <code>.md</code> file and see the results side by side.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-121.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-how-to-write-code-blocks-in-markdown">How to write code blocks in Markdown</h3>
<p>There is language support available for many programming languages in VSCode.</p>
<p>Here are some examples of coding in different languages.</p>
<p><strong>Code blocks for HTML and Bash</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-137.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong>Code blocks for Python and JS</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-138.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-escape-characters-in-markdown">Escape characters in markdown</h3>
<p>If you want the browser to ignore the syntax and retain the characters, the characters can be escaped using the backslash <code>\</code>.</p>
<p>For instance, * would not parse its succeeding characters as italics.</p>
<h2 id="heading-practical-applications-of-markdown">Practical Applications of Markdown</h2>
<p>You can use markdown in email templates, and it is a natural fit for technical documentation. </p>
<p>A great example for markdown is the GitHub README.md file. There, code blocks are easily combined with well-formatted text.</p>
<h2 id="heading-download-the-markdown-cheat-sheet">Download the Markdown Cheat Sheet</h2>
<p>I've compiled all the tips you've learned here in a cheat sheet. </p>
<p>You can download the cheat sheet <a target="_blank" href="https://github.com/zairahira/Markdown-cheatsheet/blob/main/README.md">here</a>.</p>
<h2 id="heading-wrapping-up">Wrapping up</h2>
<p>By now I hope you're confident enough to write your own markdown. Once you get the hang of it, it's easy enough. Apart from being simple, it is also very powerful and widely accepted.</p>
<p>If you found this post helpful, share it :) </p>
<p>Check out my other <a target="_blank" href="https://www.freecodecamp.org/news/author/zaira/">blog posts.</a> Let's connect on <a target="_blank" href="https://twitter.com/hira_zaira">Twitter</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build a Markdown Previewer with React.js ]]>
                </title>
                <description>
                    <![CDATA[ Building actual projects is a great way to learn React and solidify some of its basic principles. So in this post we will be building a simple Markdown Previewer like what you see in the image above. This will be a simple react app which will contain... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-build-a-markdown-previewer-with-react-js/</link>
                <guid isPermaLink="false">66ba19afdd645af073e3918a</guid>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ projects ]]>
                    </category>
                
                    <category>
                        <![CDATA[ React ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Ashutosh K Singh ]]>
                </dc:creator>
                <pubDate>Tue, 02 Jun 2020 17:48:15 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/06/markdown-previewer.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Building actual projects is a great way to learn React and solidify some of its basic principles. So in this post we will be building a simple Markdown Previewer like what you see in the image above. This will be a simple react app which will contain a textarea for Markdown input and a preview tab where the converted text will appear.</p>
<p>If you want to jump right into the code, check out the GitHub Repo here: <a target="_blank" href="https://github.com/lelouchB/markdown-previewer/tree/master">https://github.com/lelouchB/markdown-previewer/tree/master</a></p>
<p>And here's a link to the deployed version :<a target="_blank" href="https://markdown-previewer.lelouch-b.now.sh/">https://markdown-previewer.lelouch-b.now.sh/</a>.</p>
<p>Now let's get started.</p>
<h2 id="heading-prerequisites">Prerequisites</h2>
<ol>
<li>Knowledge of HTML, CSS, Javascript and Bootstrap.</li>
<li>Basic knowledge of React.</li>
<li>Node and NPM installed on your local dev machine.</li>
<li>Any code editor of your choice. </li>
</ol>
<p>If you feel like your progress is hindered because you don't know enough about these subjects, check out <a target="_blank" href="https://www.freecodecamp.org/learn">https://www.freecodecamp.org/learn</a>. There are some awesome modules there that will get you started in no time.</p>
<h2 id="heading-setup">Setup</h2>
<p>We will build this app with the help of <code>npx create-react-app</code> . <strong>Create React App</strong> is an officially supported way to create <em>single-page React applications</em>. It offers a modern build setup with no configuration. </p>
<p>In your project directory run the following command in the terminal:</p>
<pre><code>npx create-react-app markdown-previewer
cd markdown-previewer
npm start
</code></pre><p>Then open <a target="_blank" href="http://localhost:3000/">http://localhost:3000/</a> to see your app.  It will look like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Screenshot_2020-05-30-React-App.png" alt="Image" width="600" height="400" loading="lazy">
<em>http://localhost:3000/</em></p>
<p>Now, let's see the <strong>Project Structure</strong> here:</p>
<pre><code>markdown-previewer
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   ├── logo192.png
│   ├── logo512.png
│   ├── manifest.json
│   └── robots.txt
└── src
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    └── serviceWorker.js
</code></pre><p>No configuration or complicated folder structures – only the files you need to build your app. </p>
<p>Now, before we proceed further, let's clean up these files:</p>
<ol>
<li>Delete <code>index.css</code> and <code>App.css</code> .</li>
<li>Since we have deleted <code>index.css</code> and <code>App.css</code> , remove <code>import './index.css';</code> and <code>import './App.css';</code>from <code>index.js</code> and <code>App.js</code> respectively.</li>
<li>Delete <code>logo.svg</code> and remove <code>import logo from './logo.svg';</code> in <code>App.js</code>.</li>
<li>Inside <code>App.js</code> remove the function <code>App()</code> . We will export a class component rather than a functional component. So, change  <code>App.js</code> to look like this:</li>
</ol>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">App</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span></span>{
render(){
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"App"</span>&gt;</span>

    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  );}
}
</code></pre>
<p> Head over to <a target="_blank" href="http://localhost:3000">http://localhost:3000</a> and it will be blank now.</p>
<h2 id="heading-design">Design</h2>
<p>But one more thing before we get into it… It’s always a good idea to have a plan of what you are going to build before you start typing. Especially when you're building a user interface with React. </p>
<p>We want to have some idea of what the interface will look like so we can know what components we need to build and what data each component will be responsible for handling.</p>
<p>So to begin, I have drawn a quick sketch of what the markdown-previewer app will look like. I have also labeled all of the components we will need to create:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-177.png" alt="Image" width="600" height="400" loading="lazy">
<em>Design</em></p>
<p>So it looks like we will need to build three primary components:</p>
<ol>
<li><strong>Title and SubHeading</strong>— This will simply display our headings and subheadings.</li>
<li><strong>Markdown Input TextArea</strong> — This is the input texarea where the markdown we want to preview will be written.</li>
<li><strong>Markdown Preview</strong> — This is a container with a greyish background where the output will display.</li>
</ol>
<h3 id="heading-a-few-things-to-note">A few things to note:</h3>
<ol>
<li>We will have an ‘App’ component that contains everything. This is small project so it is easy to maintain all the components in a single file. But as the size of your project increases (for example, while building an e-Commerce platform), you would have to seperate components into different files and folders by their types. </li>
<li>Since this article is not about CSS and designing, I will use the <a target="_blank" href="https://react-bootstrap.github.io/">React-Bootstrap</a> library and Inline Styles. Any discussion about them will be kept short. </li>
</ol>
<h3 id="heading-inline-styles-in-react">Inline Styles in React</h3>
<p>When using inline styles, it means that instead of making separate CSS files, components are styled by passing the CSS properties as an Object. For example:</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> divStyle = {
  <span class="hljs-attr">color</span>: <span class="hljs-string">'white'</span>,
  <span class="hljs-attr">backgroundImage</span>: <span class="hljs-string">'url('</span> + imgUrl + <span class="hljs-string">')'</span>,
  <span class="hljs-attr">WebkitTransition</span>: <span class="hljs-string">'all'</span>, <span class="hljs-comment">// note the capital 'W' here</span>
  <span class="hljs-attr">msTransition</span>: <span class="hljs-string">'all'</span> <span class="hljs-comment">// 'ms' is the only lowercase vendor prefix</span>
};

ReactDOM.render(<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{divStyle}</span>&gt;</span>Hello World!<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>, <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">"root"</span>);
</code></pre>
<p>Style keys are camelCased in order to be consistent with accessing the properties on DOM nodes from JS (e.g. <code>node.style.backgroundImage</code>). Vendor prefixes other than <code>ms</code> should begin with a capital letter. This is why <code>WebkitTransition</code> has an uppercase "W".                 </p>
<p>The style object is then passed in the DOM component using <code>{}</code> . We can use run Javascript code inside our <code>return</code> method using <code>{}</code>.</p>
<h2 id="heading-code">Code</h2>
<p>Okay it’s time to start writing code! If at any time you get stuck, feel free to refer to the finished app here: <a target="_blank" href="https://github.com/lelouchB/markdown-previewer/tree/master">https://github.com/lelouchB/markdown-previewer/tree/master</a> and <a target="_blank" href="https://markdown-previewer.lelouch-b.now.sh/">https://markdown-previewer.lelouch-b.now.sh/</a></p>
<h3 id="heading-installing-dependencies">Installing Dependencies</h3>
<p>Let's start by installing our project dependencies. Inside the project directory, run the following commands:</p>
<pre><code>npm install react-bootstrap bootstrap 
npm install marked
</code></pre><p>Now, let's discuss them:</p>
<ol>
<li>The first command installs <a target="_blank" href="https://react-bootstrap.github.io/getting-started/introduction">React-Bootstrap</a> and Bootstrap which we will use to style our project.</li>
<li>The second command installs <a target="_blank" href="https://marked.js.org">Marked.js</a>, which is a low-level markdown compiler for parsing markdown without caching or blocking for long periods of time. This will run the actual logic behind converting the markdown.</li>
</ol>
<p>Before we start using React-Bootstrap inside our project, we will have to add the minified bootstrap CSS file to our <code>index.js</code>:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> <span class="hljs-string">'../node_modules/bootstrap/dist/css/bootstrap.min.css'</span>;
</code></pre>
<p>With this the dependencies have been installed and are ready to be used.</p>
<h3 id="heading-headings">Headings</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-178.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Our first task will be to add a heading to our React app and center align it. For that we will use <a target="_blank" href="https://react-bootstrap.github.io/components/badge/">Badge</a>, a component of the React-Bootstrap library. Here are the steps to do that:</p>
<ol>
<li>Import Badge to <code>App.js</code>. Inside <code>App.js</code> add the following:</li>
</ol>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> Badge <span class="hljs-keyword">from</span> <span class="hljs-string">"react-bootstrap/Badge"</span>;
</code></pre>
<ol start="2">
<li>In <code>App.js</code> inside return and under the <code>div</code> with the <code>className="App"</code>,  add another <code>div</code> with the <code>className="container"</code>.</li>
</ol>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;
<span class="hljs-keyword">import</span> Badge <span class="hljs-keyword">from</span> <span class="hljs-string">"react-bootstrap/Badge"</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">App</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
  render() {
    <span class="hljs-keyword">return</span> (
      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"App"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"container"</span>&gt;</span>

        <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
    );
  }
}
</code></pre>
<ol start="3">
<li>Next inside div with the <code>className="container"</code>,  we will add the heading as follows:</li>
</ol>
<pre><code> &lt;h1&gt;
 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Badge</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-align-center"</span> <span class="hljs-attr">variant</span>=<span class="hljs-string">"light"</span>&gt;</span>
 Markdown Previewer
<span class="hljs-tag">&lt;/<span class="hljs-name">Badge</span>&gt;</span></span>
 &lt;/h1&gt;
</code></pre><ol start="4">
<li>You can now see a heading at <a target="_blank" href="http://localhost:3000">http://localhost:3000</a>, but it is not centered. To center the heading we will use bootstrap and enclose the above code block inside two divs.</li>
</ol>
<pre><code>&lt;div className=<span class="hljs-string">"row mt-4"</span>&gt;
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"col text-center"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>
     <span class="hljs-tag">&lt;<span class="hljs-name">Badge</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-align-center"</span> <span class="hljs-attr">variant</span>=<span class="hljs-string">"light"</span>&gt;</span>
        Markdown Previewer
     <span class="hljs-tag">&lt;/<span class="hljs-name">Badge</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
&lt;/div&gt;
</code></pre><p>With this we have added a heading to our app.</p>
<h3 id="heading-sub-headings">Sub Headings</h3>
<p>If you look at the design we're discussing above, you'll see that the next step will be to add two columns with the subheadings <strong>Markdown Input</strong> and <strong>Preview.</strong> One will contain the Input TextArea and the other the Preview.</p>
<ol>
<li>First we will have to create two columns placed side by side inside our app. We will do so using bootstrap. Inside the div container, add the following:</li>
</ol>
<pre><code class="lang-js">
&lt;div className=<span class="hljs-string">"row mt-4"</span>&gt;
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"col-md-6"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Lorem Ipsum<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>

  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"col-md-6"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Lorem Ipsum<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
&lt;/div&gt;;
</code></pre>
<p>I have used Lorem Ipsum for now, and will remove it in the next step. Columns are created using bootstrap classes, and the first <code>div</code> with <code>className="row mt-4"</code> creates a <strong>row</strong>. The <code>m</code> indicates <code>margin</code>. The <code>t</code> indicates <code>top</code>. The other two <code>div</code>s with <code>className="col-md-6"</code> create <strong>two columns</strong>. </p>
<p>The app will now look something like this.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-180.png" alt="Image" width="600" height="400" loading="lazy"></p>
<ol start="2">
<li>The next step will be to add headings to these columns and center align them. This can be done by adding a div with the className="col text-center" inside that Badge, to both the divs with the <code>className="col-md-6"</code>.</li>
</ol>
<pre><code>&lt;div className=<span class="hljs-string">"col text-center"</span>&gt;
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">Badge</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-align-center"</span> <span class="hljs-attr">variant</span>=<span class="hljs-string">"light"</span>&gt;</span>
    // Actual Sub Heading: This code block will be same for both columns
    <span class="hljs-tag">&lt;/<span class="hljs-name">Badge</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span></span>
&lt;/div&gt;
</code></pre><ol start="3">
<li>Your <code>App.js</code> will now look like this:</li>
</ol>


<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-181.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-textarea">TextArea</h3>
<p>Next we're going to add a TextArea in our app. We will use the simple HTML <code>&lt;textarea&gt;</code> tag to do so.</p>
<ol>
<li>Add another div with the <code>classname="mark-input"</code> and add <code>textarea</code> with <code>className="input"</code> inside it.</li>
</ol>
<pre><code>&lt;div className=<span class="hljs-string">"mark-input"</span>&gt;
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">textarea</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"input"</span>&gt;</span> <span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span></span>
&lt;/div&gt;;
</code></pre><ol start="2">
<li>Let's customize TextArea a bit. As discussed above, we will be using Inline Styles, so for that let's fist initailize an <strong>Object</strong>. All the variables will be declared inside the <code>render()</code> function but outside of <code>return</code>. For example, </li>
</ol>
<pre><code>render(){
 <span class="hljs-keyword">var</span> variableOne = <span class="hljs-string">"Lorem Ipsum"</span>
 <span class="hljs-keyword">var</span> variableTwo = <span class="hljs-string">"Lorem Ipsum"</span>

  <span class="hljs-keyword">return</span>(
   <span class="hljs-comment">// Code</span>
   )
}
</code></pre><ol start="3">
<li>Here is the <code>inputStyle</code> object:</li>
</ol>
<pre><code> <span class="hljs-keyword">var</span> inputStyle = {
      <span class="hljs-attr">width</span>: <span class="hljs-string">"400px"</span>,
      <span class="hljs-attr">height</span>: <span class="hljs-string">"50vh"</span>,
      <span class="hljs-attr">marginLeft</span>: <span class="hljs-string">"auto"</span>,
      <span class="hljs-attr">marginRight</span>: <span class="hljs-string">"auto"</span>,
      <span class="hljs-attr">padding</span>:<span class="hljs-string">"10px"</span>
    };
</code></pre><ol start="4">
<li>Let's add the <code>inputStyle</code> object to our <code>textarea</code>:</li>
</ol>
<pre><code>&lt;div className=<span class="hljs-string">"mark-input"</span> style={inputStyle}&gt;
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">textarea</span>
  <span class="hljs-attr">className</span>=<span class="hljs-string">"input"</span>
  <span class="hljs-attr">style</span>=<span class="hljs-string">{inputStyle}</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span></span>
</code></pre><p>With this we have added TextArea to our App and it will look like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-182.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-preview">Preview</h3>
<p>To separate our preview from the rest of the app and to enclose it inside a container, we will follow the above process. We'll create a div inside the second columns and add a style object to it, like this:</p>
<pre><code>  <span class="hljs-keyword">var</span> outputStyle = {
      <span class="hljs-attr">width</span>: <span class="hljs-string">"400px"</span>,
      <span class="hljs-attr">height</span>: <span class="hljs-string">"50vh"</span>,
      <span class="hljs-attr">backgroundColor</span>: <span class="hljs-string">"#DCDCDC"</span>,
      <span class="hljs-attr">marginLeft</span>: <span class="hljs-string">"auto"</span>,
      <span class="hljs-attr">marginRight</span>: <span class="hljs-string">"auto"</span>,
      <span class="hljs-attr">padding</span>:<span class="hljs-string">"10px"</span>
    };
</code></pre><p>Add the object to the <code>div</code> :</p>
<pre><code>&lt;div className=<span class="hljs-string">"col-md-6"</span>&gt;
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"col text-center"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h4</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Badge</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"text-align-center"</span> <span class="hljs-attr">variant</span>=<span class="hljs-string">"secondary"</span>&gt;</span>
        Preview
      <span class="hljs-tag">&lt;/<span class="hljs-name">Badge</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{outputStyle}</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
&lt;/div&gt;
</code></pre><p>Here is how the app will look now:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-183.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>We now have completed the look of our app, but it is missing its functionality, so let's add that. The process from here can be divided into three steps:</p>
<ol>
<li>Taking input from TextArea.</li>
<li>Passing the input to the Marked.js library and displaying the processed data to the <strong>Preview</strong> column.</li>
</ol>
<h2 id="heading-taking-input-from-textarea">Taking Input from TextArea</h2>
<p>We will use the <code>state</code> object. </p>
<h3 id="heading-statehttpsreactjsorgdocsstate-and-lifecyclehtml"><a target="_blank" href="https://reactjs.org/docs/state-and-lifecycle.html">State</a></h3>
<p>In React, “state” is an object that represents the parts of the app that can change. Each component can maintain its own state, which lives in an object called <code>this.state</code>. The <code>state</code> object is where you store property values that belong to the component.</p>
<p>Simply put, if you’d like your app to <em>do</em> anything – if you want interactivity, adding and deleting things, logging in and out – that will involve state.</p>
<p>Here the <strong>value</strong> of our textarea is changing, and our state will change with it. We'll add the state object inside our <strong>class App</strong>, above the <code>render()</code> function. </p>
<p>It is best practice to  initialize <code>state</code> inside <code>constructor</code>. It can work without <code>constructor</code> also but you should avoid that. Here is how we will initialize it with the property <code>markdown</code> , initially having an empty string:</p>
<pre><code><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">App</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
<span class="hljs-keyword">constructor</span>(props){
    <span class="hljs-built_in">super</span>(props)
    <span class="hljs-built_in">this</span>.state = {
      <span class="hljs-attr">markdown</span>: <span class="hljs-string">""</span>,
    };
  }
  render(){
  <span class="hljs-comment">// method and other code</span>
  }
  }
</code></pre><p>In this project or in any other react projects, always initialize <code>state</code> inside <code>constructor(props)</code> and below <code>super(props)</code>.</p>
<p>Typically, in React, constructors are only used for two purposes:</p>
<ul>
<li>Initializing <a target="_blank" href="https://reactjs.org/docs/state-and-lifecycle.html">local state</a> by assigning an object to <code>this.state</code>.</li>
<li>Binding <a target="_blank" href="https://reactjs.org/docs/handling-events.html">event handler</a> methods to an instance.</li>
</ul>
<p>Keep in mind that Constructor is the only place where you should assign <code>this.state</code> directly. In all other methods, you need to use <code>this.setState()</code> instead. </p>
<p>State changes are asynchronous. For better perceived performance, React may delay it, and then update several components in a single pass. React does not guarantee that the state changes are applied immediately.</p>
<p>As discussed above we cannot change state directly. Instead we have to use <code>this.setState()</code> so let's create a method that does that and is called every time the value of textarea is changed.</p>
<pre><code>  updateMarkdown(markdown) {
    <span class="hljs-built_in">this</span>.setState({ markdown });
  }
</code></pre><p>This method is created inside the class component but above the <code>render()</code> function. </p>
<p>But we will first set the value of textarea to the <code>markdown</code>  property in state. </p>
<pre><code>&lt;textarea className=<span class="hljs-string">"input"</span> style={inputStyle} value={<span class="hljs-built_in">this</span>.state.markdown}&gt;&lt;/textarea&gt;
</code></pre><p>Now we can add <code>updateMarkdown()</code> to <code>onChange()</code> event inside <code>&lt;textarea&gt;</code> and call it <code>this.updateMarkdown()</code>.</p>
<pre><code>&lt;textarea
  className=<span class="hljs-string">"input"</span>
  style={inputStyle}
  value={<span class="hljs-built_in">this</span>.state.markdown}
  onChange={<span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    <span class="hljs-built_in">this</span>.updateMarkdown(e.target.value);
  }}
&gt;&lt;/textarea&gt;;
</code></pre><p>Next we can check to see if state is assigning properly by passing a Javascript code and <code>console.log()</code> our state.</p>
<pre><code>&lt;textarea
  className=<span class="hljs-string">"input"</span>
  style={inputStyle}
  value={<span class="hljs-built_in">this</span>.state.markdown}
  onChange={<span class="hljs-function">(<span class="hljs-params">e</span>) =&gt;</span> {
    <span class="hljs-built_in">this</span>.updateMarkdown(e.target.value);
  }}
&gt;
  {<span class="hljs-built_in">console</span>.log(<span class="hljs-built_in">this</span>.state.markdown)}
&lt;/textarea&gt;;
</code></pre><p>Now open your console and try writing inside textarea, and hopefully you will see the same being added to the console.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/image-184.png" alt="Image" width="600" height="400" loading="lazy">
<em>Check</em></p>
<p>With this we have successfully assigned the input of textarea to our state markdown property. Here is how your <code>App.js</code> will look now:</p>


<h2 id="heading-markedjs">Marked.js</h2>
<p>Marked.js is the brains behind the conversion of markdown and is very simple to use.</p>
<p>Importing <code>marked</code>, add the following just below where you imported Badge from <code>react-bootstrap/Badge</code></p>
<pre><code><span class="hljs-keyword">let</span> marked = <span class="hljs-built_in">require</span>(<span class="hljs-string">"marked"</span>);
</code></pre><p>To use the Marked.js library, we just have to pass the string to be converted inside the <code>marked()</code> function. We already have the data dynamically stored inside the state object, so it will be done like this:</p>
<pre><code>marked(<span class="hljs-built_in">this</span>.state.markdown)
</code></pre><p>Now, the next step is to actually display the converted data on the webpage. To do that we will use <code>dangerouslySetInnerHTML</code>, which is an attribute under DOM Elements in React. According to the official documentation:</p>
<blockquote>
<p><code>_dangerouslySetInnerHTML_</code> is React’s replacement for using <code>_innerHTML_</code> in the browser DOM.</p>
</blockquote>
<p>This means that if in React you have to set the HTML <strong>programmatically</strong> or from an <strong>external source</strong>, you will have to use <code>dangerouslySetInnerHTML</code> instead of traditional <code>innerHTML</code> in Javascript.</p>
<p><strong>In simple words using</strong> <code>**dangerouslySetInnerHTML**</code> <strong>you can set HTML directly from React.</strong></p>
<p>While using <code>dangerouslySetInnerHTML</code> , you will have to pass an <strong>object</strong> with a <code>__html</code> key. <strong>(Note the key consists of two underscores.)</strong> </p>
<p>Here is how we will do that:</p>
<pre><code>&lt;div
style={outputStyle}
dangerouslySetInnerHTML={{ <span class="hljs-attr">__html</span>: marked(<span class="hljs-built_in">this</span>.state.markdown) }}
&gt;
&lt;/div&gt;
</code></pre><p>With this we have completed our project and now you will see your <code>Markdown Previewer</code> in action.</p>
<p>Here is the complete <code>App.js</code></p>


<h2 id="heading-we-did-it">We did it! ?</h2>
<p>Congrats on building this React Mardown Previewer.</p>
<h2 id="heading-what-next">What next?</h2>
<p>So, what is the future of this project? You are the future. <strong>Make your own version</strong> of Markdown Previewer, add different designs, layouts, custom functionalities. For example you could add a <strong>Reset Button</strong> to clear the textarea – it's all up to your imagination. I hope you had fun coding along.</p>
<p>What other projects or tutorials would you like to see ? Reach out to me on <a target="_blank" href="https://twitter.com/noharashutosh">Twitter</a>, and I'll make more tutorials! If you're inspired to add features yourself, please do share and <a target="_blank" href="https://twitter.com/noharashutosh">tag me</a> – I'd love to hear about them :)</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Format Code in Markdown ]]>
                </title>
                <description>
                    <![CDATA[ There are two ways to format code in Markdown. You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to. Inline Code You can use inline code f... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-format-code-in-markdown/</link>
                <guid isPermaLink="false">66c351f991148fc1d02ee018</guid>
                
                    <category>
                        <![CDATA[ markdown ]]>
                    </category>
                
                    <category>
                        <![CDATA[ toothbrush ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 01 Feb 2020 00:00:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9d0f740569d1a4ca35a8.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>There are two ways to format code in Markdown. You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to.</p>
<h2 id="heading-inline-code"><strong>Inline Code</strong></h2>
<p>You can use inline code formatting to emphasize a small command or piece of syntax within a line you’re writing.</p>
<p>For example, you may wish to mention JavaScript’s <code>Array.protoype.map()</code> method. By using inline code formatting, it is clear that this is a piece of code. You might also use it to illustrate a terminal command, like <code>yarn install</code>.</p>
<p>To use inline code formatting, simply wrap the code you wish to format in backticks. On a standard US layout QWERTY keyboard, this can be found to the left of ‘1’, and above the Tab key. More information on the location of the backtick on international keyboards is provided below.</p>
<p>For instance, writing <code>Array.prototype.map()</code> in markdown will render as <code>Array.prototype.map()</code>.</p>
<h2 id="heading-code-blocks"><strong>Code Blocks</strong></h2>
<p>To write longer or more detailed snippets of code, it is often better to place them inside a code block. Code blocks allow you to use multiple lines, and markdown will render it inside its own box and with code type font.</p>
<p>To achieve this, start your block with a line of three backticks. This signals to markdown that you are creating a code block. You will need to finish with another line of three backticks. For example:</p>
<pre><code><span class="hljs-keyword">var</span> add2 = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">number</span>) </span>{  
   <span class="hljs-keyword">return</span> number + <span class="hljs-number">2</span>;  
}
</code></pre><p>will render in markdown as:</p>
<pre><code class="lang-text">var add2 = function(number) {
  return number + 2;
}
</code></pre>
<h3 id="heading-syntax-highlighting">Syntax highlighting</h3>
<p>While not supported natively by markdown, many markdown engines, including the one used by GitHub, will support syntax highlighting. This means that by telling markdown what language you're using inside the code block, it will add colors like an IDE would.</p>
<p>You can do this by adding the name of the language on the same line as your opening three back ticks. In the example above, if instead of the first line being <code>you could write</code>js, then JavaScript highlighting will be applied to the block.</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> add2 = <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">number</span>) </span>{
    <span class="hljs-keyword">return</span> number + <span class="hljs-number">2</span>;
}
</code></pre>
<p>Syntax highlighting can be applied to more than just JavaScript, though. You can use ```html:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-md-6 col-md-offset-3"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<pre><code class="lang-ruby:">
```ruby
"Hello World".split('').each do |letter|
  puts letter
end
</code></pre>
<p>or ```python:</p>
<pre><code class="lang-python">a, b = <span class="hljs-number">0</span>, <span class="hljs-number">1</span>
<span class="hljs-keyword">while</span> b &lt; <span class="hljs-number">10</span>:
    print(b)
    a, b = a, a + b
</code></pre>
<p>Just remember, not all markdown engines will apply syntax highlighting.</p>
<h2 id="heading-backticks-on-international-keyboards">Backticks on international keyboards</h2>
<p>The location of the backtick key can be different on different keyboards, and if you’re not using a US layout QWERTY keyboard, it may be tricky to find. <a target="_blank" href="http://superuser.com/a/254077/122424">This</a> helpful guide lists some of the ways to find your backtick key, which we’ve collected here below:</p>
<h3 id="heading-qwerty-and-qwertz">QWERTY and QWERTZ:</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/a7daf1d707e12e207d47f0eb70ba01d97ffd1924_1_690x327.png" alt="Image" width="600" height="400" loading="lazy"></p>
<h3 id="heading-azerty">AZERTY:</h3>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/8f65c339ce4eefd9d79841f3dc54f4c37cab2e77.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/de291f0895b0fed992726a62d654f4e1f0e421f3.png" alt="Image" width="600" height="400" loading="lazy"></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
