<?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[ Blogging - 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[ Blogging - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Wed, 27 May 2026 20:47:06 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/blogging/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Deploy a Next.js Blog on Sevalla ]]>
                </title>
                <description>
                    <![CDATA[ In this tutorial, I’ll teach you how to use Next.js and Sevalla to build and deploy your own Next.js blog. But first, let me answer your likely question: “Why host a blog yourself when there are hundreds of blogging platforms available? “ One answer:... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-deploy-a-nextjs-blog-on-sevalla/</link>
                <guid isPermaLink="false">686e8e1a0b575323bf321674</guid>
                
                    <category>
                        <![CDATA[ Next.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Wed, 09 Jul 2025 15:43:22 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752075758399/7d8a494b-a5f0-4fb7-841b-8758d1cbc94d.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In this tutorial, I’ll teach you how to use Next.js and Sevalla to build and deploy your own Next.js blog.</p>
<p>But first, let me answer your likely question: “Why host a blog yourself when there are hundreds of blogging platforms available? “</p>
<p>One answer: <a target="_blank" href="https://nextjs.org/">Next.js</a>.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-is-nextjs">What is Next.js?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-is-sevalla">What is Sevalla?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-building-and-deploying-a-nextjs-blog">Building and Deploying a Next.js Blog</a></p>
<ul>
<li><p><a class="post-section-overview" href="#heading-building-the-blog">Building the blog</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-deploying-the-blog">Deploying the blog</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-adding-a-custom-domain">Adding a custom domain</a></p>
</li>
</ul>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ul>
<h2 id="heading-what-is-nextjs"><strong>What is Next.js?</strong></h2>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871450742/adc4f876-dbad-41a3-b310-6c8f3e470c20.webp" alt="Next.js Framework" class="image--center mx-auto" width="1100" height="720" loading="lazy"></p>
<p>Next.js is a web development framework built on top of React. While React is a library for building user interfaces, Next.js adds extra features to make building websites and web applications easier and faster.</p>
<p>Next.js gives you full control. You own your content, your design, and your SEO strategy. Unlike Medium or Substack, you’re not limited by platform rules or branding. You can optimise every part of your blog, from how fast it loads to how it looks on Google search.</p>
<p>Next.js isn’t just a tool to build a blog. It’s a platform to build your entire brand. That’s why developers and <a target="_blank" href="https://www.indiehackers.com/post/why-next-js-is-perfect-for-saas-development-27f98e471b">indie hackers</a> love it.</p>
<h2 id="heading-what-is-sevalla"><strong>What is Sevalla?</strong></h2>
<p><a target="_blank" href="https://sevalla.com/">Sevalla</a> is a Platform-as-a-service provider that I have recently fallen in love with. Built by the team behind <a target="_blank" href="https://kinsta.com/">Kinsta</a>, the popular WordPress hosting platform, Sevalla combines powerful features with a smooth developer experience. They offer application hosting, database, object storage, and static site hosting for your projects.</p>
<p>Unlike platforms like Heroku, which provide almost all features via additional integrations, Sevalla gives you exactly what you need to build and deploy an app to your users.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871511816/7de2c52f-da06-4891-a62d-dad4eb4ca57a.webp" alt="Sevalla Admin Panel" class="image--center mx-auto" width="1100" height="589" loading="lazy"></p>
<p>Imagine if someone took just the essential features from cloud platforms like AWS or Azure and put them into a single, easy-to-use dashboard. That’s exactly what the Sevalla admin panel has. A clean, simple interface with everything you need, and nothing you don’t.</p>
<p>In a nutshell, Sevalla handles all the heavy lifting of deploying and scaling your app, so you can focus entirely on building it.</p>
<h2 id="heading-building-and-deploying-a-nextjs-blog"><strong>Building and Deploying a Next.js Blog</strong></h2>
<p>Now let’s build and deploy our Next.js blog. We don't have to build one from scratch – there are many templates available for us to use, <a target="_blank" href="https://github.com/sevalla-templates/nextjs-blog">like this one</a>.</p>
<p>We will do three things.</p>
<ul>
<li><p>Clone the repository and set up the blog on our local machine.</p>
</li>
<li><p>Deploy the site to Sevalla</p>
</li>
<li><p>Add a custom domain.</p>
</li>
</ul>
<h3 id="heading-building-the-blog">Building the blog</h3>
<p>First, fork the Next.js blog repository.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871568856/84bb32da-25b9-4a0b-8170-658914a643fe.webp" alt="Fork Repository" class="image--center mx-auto" width="1100" height="760" loading="lazy"></p>
<p>Once you have forked it, clone it to your local machine.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871607179/716dfc07-d0c8-4ab5-9c45-8ee72fca3f09.webp" alt="Clone repository" class="image--center mx-auto" width="990" height="740" loading="lazy"></p>
<pre><code class="lang-plaintext">git clone &lt;repository url&gt;
</code></pre>
<p>Once you have cloned the repository, go into the directory and run <code>npm install</code> . Make sure you have the latest <a target="_blank" href="https://nodejs.org/en">Node.js</a> and Next.js installed on your machine.</p>
<p>Now let’s run the blog on our machine. The command is <code>npm run dev</code> . Once the server is running, go to <code>localhost:3000</code> to view the site.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871654364/b738b6f7-b272-4b75-bf5b-b2af40ccd035.webp" alt="Demo Next.js blog" class="image--center mx-auto" width="1100" height="594" loading="lazy"></p>
<p>You should see the above page. Now let's add our own blog post to it. Go to the <code>content/blog</code> directory. Every page in the content directory is your blog post, and you can use <a target="_blank" href="https://www.markdownguide.org/basic-syntax/">Markdown</a> to style it. Save the file with the extension <code>.mdx</code></p>
<p>Add the following text (the first part is the metadata for the blog to understand the title and date of publication):</p>
<pre><code class="lang-plaintext">---
title: "My New Post"
date: 2025-07-07
---

Welcome to my first blog post using Next.js and MDX!
</code></pre>
<p>Reload the home page, and you should now see two posts – the default post and your new post.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871689247/e3ec1407-33d7-4c9c-9032-3e2e36b189a7.webp" alt="New post in Next.js blog" class="image--center mx-auto" width="1100" height="610" loading="lazy"></p>
<p>So every time you want to publish a new article, you create a new page using Markdown. It's that simple.</p>
<p>Commit this new file and push it to your repository.</p>
<pre><code class="lang-plaintext">git add .
git commit -m "new post"
git push origin main
</code></pre>
<h3 id="heading-deploying-the-blog">Deploying the blog</h3>
<p>Now create an account on Sevalla (use GitHub login so that you don't have to re-authenticate again).</p>
<p>Once you log in to Sevalla, you’ll see the Static site option. Click on it to create a static site.</p>
<p>Like other hosting providers, not all Sevalla products are free, but it comes with generous free credits. Unless you have a reasonable number of users that access your blog, you will not incur any costs for blogs/small projects. But when it comes to static sites, you can host up to 100 sites completely for free.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871726773/aaee5778-f9c8-4454-9349-154aa4d291d3.webp" alt="Sevalla Dashboard" class="image--center mx-auto" width="1100" height="374" loading="lazy"></p>
<p>Select the repository from the list. Check the “Automatic deploy on commit” option. So every time you push code, Sevalla will automatically deploy your new post to the server.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871773521/44aafcba-a5cf-4017-b28e-f3271414f8c8.webp" alt="Create Static Site" class="image--center mx-auto" width="1100" height="1090" loading="lazy"></p>
<p>In the “build settings” page, keep the defaults. Click “Create site”. In a few minutes, the app will be pulled from GitHub, deployed to a server, and you should see the button <code>visit site</code> .</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871809727/1658eca6-9f0e-4a7d-94c8-4519491940be.webp" alt="Deployment success" class="image--center mx-auto" width="1100" height="617" loading="lazy"></p>
<p>If you visit the site, you should see the below page:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871841987/f9e9784a-bcac-4265-b060-2894fcc7fb16.webp" alt="Live blog" class="image--center mx-auto" width="1100" height="550" loading="lazy"></p>
<p>Yay! Your blog is live. You can also see detailed build logs under the “deployments” tab and see if there are any issues deploying your app.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871895728/00d0c956-991b-42e1-bafe-1bde592009f2.webp" alt="Sevalla Deployment Logs" class="image--center mx-auto" width="1100" height="671" loading="lazy"></p>
<h3 id="heading-adding-a-custom-domain">Adding a custom domain</h3>
<p>Great. For the last step, let's add a custom domain to our blog.</p>
<p>Go to the “domains” tab, and click “add domain” under custom domains. I'll be using a subdomain <code>next</code> from my private domain <a target="_blank" href="http://manishshivanandhan.com"><code>manishshivanandhan.com</code></a>, but the instructions are the same for root domains as well.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871942423/faba7435-4f1e-4565-8f41-ac9f41257532.webp" alt="Add custom domain" class="image--center mx-auto" width="1100" height="474" loading="lazy"></p>
<p>Once you click “add domain”, Sevalla will give you the instructions to add the TXT records for verification and CNAME/A records for pointing the new site to your domain.</p>
<p>Once these are done on your domain provider, check back after a few minutes.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1751871974507/fbf19bd2-b862-4bab-bd0b-ff2d83e133eb.webp" alt="Custom Domain Verified" class="image--center mx-auto" width="1100" height="352" loading="lazy"></p>
<p>Hooray! You’ve created your own Next.js blog. Here is the sample site I built for this project – <a target="_blank" href="http://next.manishshivanandhan.com/">http://next.manishshivanandhan.com</a></p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>And that’s it! Your very own Next.js blog is now live on Sevalla.</p>
<p>In just a short time, you’ve gone from cloning a template to publishing your first post and deploying it to the world with a custom domain. With Next.js, you get full control over your content and brand, and with Sevalla, deployment becomes effortless and smooth.</p>
<p>Remember, every time you want to publish a new article, all it takes is creating a simple markdown file and pushing your code. Sevalla handles the rest, so you can focus on what truly matters: writing great content and building your personal brand.</p>
<p>Hope you enjoyed this article! I’ll be back soon with more tutorials on building with Next.js. Feel free to <a target="_blank" href="https://www.linkedin.com/in/manishmshiva/">connect with me on LinkedIn</a> to stay in touch.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How To Build A Simple Portfolio Blog With Next.js ]]>
                </title>
                <description>
                    <![CDATA[ I have written articles on different platforms including LinkedIn, The Network Bits (Substack), and freeCodeCamp. So I wanted to bring all of these articles together in a single place where someone could go and see all my work. A blog sounded like a ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-build-a-simple-portfolio-blog-with-nextjs/</link>
                <guid isPermaLink="false">6839c439ebab1f7974eac355</guid>
                
                    <category>
                        <![CDATA[ Next.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ portfolio ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Chidiadi Anyanwu ]]>
                </dc:creator>
                <pubDate>Fri, 30 May 2025 14:44:09 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1747235586248/7424bce0-24da-4f70-a5aa-31249d799094.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>I have written articles on different platforms including LinkedIn, The Network Bits (Substack), and freeCodeCamp. So I wanted to bring all of these articles together in a single place where someone could go and see all my work.</p>
<p>A blog sounded like a good solution for this, so I set out to build one. In this article, I will walk you through how I did it with Next.js.</p>
<p>The basic idea here was to build a website where I wouldn’t need to write code in the future. I just wanted to be able to add the URL of a new article to a JSON file, and the website would extract information like the title, date, cover image, and description and then update itself with it. No database.</p>
<p>To understand how I would go about it, I checked the metadata of the HTML text from each of the platforms I considered. I used my articles, of course, like the one in the project folder. I found out that most of them used Open Graph metadata. So, that was easy to scrape. But, I also found out that some information wasn’t in the meta tags – instead, it was in the JSON-LD. At the end of the day, I ended up using both in my functions.</p>
<h3 id="heading-what-well-cover">What we’ll cover:</h3>
<ol>
<li><p><a class="post-section-overview" href="#heading-how-the-blog-site-works">How the Blog Site Works</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-does-an-article-look-like">The Structure of an Article on the Blog</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-does-the-search-feature-work">How the Search Feature Works</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-project-structure">The Project Structure</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-steps-to-build-the-blog">Steps to Build the Blog</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></p>
</li>
</ol>
<h2 id="heading-pre-requisites">Pre-requisites</h2>
<p>Understanding this article requires some knowledge of programming and web development. You need to have basic knowledge of HTTP, HTML, CSS, JavaScript, and React to be able to follow along easily.</p>
<p>If you don't have those skills, you may still be able to understand the general structure and working principles.</p>
<h2 id="heading-how-the-blog-site-works">How the Blog Site Works</h2>
<p>The project consists of client components and server components. It is a website, so ideally, it's just a front-end. But it has to fetch data from URLs – and doing that from the client-side won’t work due to CORS blocking, as the requests will be emanating from a browser. So, it has to run on the server.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748524048812/76baf11d-a80a-4d07-beba-065c74536541.png" alt="Home page calling the fetch articles function." class="image--center mx-auto" width="774" height="244" loading="lazy"></p>
<p>The <code>fetchArticles()</code> function runs on the server – then this happens:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748536836320/9813a669-ac07-480a-8270-6f2f36ceda22.png" alt="Rough flowchart showing what happens in the fetchArticles function" class="image--center mx-auto" width="501" height="577" loading="lazy"></p>
<p>The <code>fetchArticles()</code> function accesses the URLs, extracts and processes the HTML and JSON Linked Data objects from the response, and returns an array of Article objects to the Home page.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748536952680/35fec49a-6c44-4978-9acb-755eb5ed810f.png" alt="fetch articles function gets called and returns an array of Article objects" class="image--center mx-auto" width="768" height="289" loading="lazy"></p>
<p>The <code>HomePage</code> component is a client side component that has another component in it, named <code>HomeClient</code>. This <code>HomeClient</code> is a client side component. It has to be because it has useState hooks.</p>
<p>But the <code>HomePage</code> component calls the <code>fetchArticles()</code> function and sets the <code>articles</code> constant (which is an array of <code>Article</code> objects, as defined by the interface in the <code>ArticleCard.tsx</code> file). The <code>articles</code> constant is then passed down to the <code>HomeClient</code> component as a prop.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746881308147/1fedcbb0-f9d4-47dd-afea-b7f231595a58.png" alt="The HomePage component, and its child component, HomeClient." class="image--center mx-auto" width="411" height="441" loading="lazy"></p>
<p>Inside the <code>HomeClient</code> component, there are two components – the <code>Hero</code> component, and the <code>MainBody</code> component. The Hero component shows the welcome message, and also has the search bar. The MainBody component is where the tags and the article grid are. Logic for filtering articles are also in the MainBody component.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746881333468/267d0158-df41-4a1d-8098-e3219fe7db4d.png" alt="The Hero and MainBody components inside the HomeClient component." class="image--center mx-auto" width="411" height="441" loading="lazy"></p>
<p>Inside the MainBody component, there is the <code>ArticleCard</code> component that takes the filtered array of Article objects from the MainBody as props, and renders an article card for each. These cards are rendered inside the grid in the MainBody component.</p>
<h3 id="heading-what-does-an-article-look-like">What does an article look like?</h3>
<p>The articles are defined by an interface:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> Article {
  id: <span class="hljs-built_in">number</span>;
  title?: <span class="hljs-built_in">string</span>;
  description?: <span class="hljs-built_in">string</span>;
  publishedDate?: <span class="hljs-built_in">string</span>;
  url: <span class="hljs-built_in">string</span>;
  imgUrl?: <span class="hljs-built_in">string</span>;
  siteName?: <span class="hljs-built_in">string</span>;
  tags?: <span class="hljs-built_in">string</span>[];
}
</code></pre>
<p>The interface, as shown above, specifies that the object will have eight properties, of which only the <code>id</code> and <code>url</code> are compulsory. Those compulsory properties are actually what’s needed in the JSON file from which the web server will read.</p>
<p>When the URL is visited by the server, the title, description, and other properties (except the tags) are obtained automatically and populated. Then the object is created.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746881670519/a2cbdbbf-6cfd-40e7-91e5-5da711198dc7.png" alt="Article card renderings" class="image--center mx-auto" width="1342" height="585" loading="lazy"></p>
<p>The article cards consist of the article’s cover image, the name of the platform where it was published, the date published, the title, and a description. All of this is wrapped in an anchor linking to the URL. The tags are not visible on the cards, but are used in filtering operations.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746881715907/7ab4ad87-7da6-44e2-8329-35bcb999b825.png" alt="Array of Article objects in browser console." class="image--center mx-auto" width="787" height="318" loading="lazy"></p>
<h3 id="heading-how-does-the-search-feature-work">How does the search feature work?</h3>
<p>There's a reason why the Hero component and the MainBody component are in the same parent component. That wasn't my initial design, but after I saw that the search bar would look better in the Hero component, and that I needed to set the <code>searchTerm</code> state in the Hero component and use it in the MainBody component, that became the best option for me: to put both of them in the same parent, so I could pass down the useState hook as props into both of them.</p>
<p>The search feature works basically by filtering the <code>articles</code> array based on the tags selected, or the search term entered. Here is what the code looks like:</p>
<pre><code class="lang-typescript"> useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">const</span> anyTagActive = isActive.some(<span class="hljs-function">(<span class="hljs-params">val</span>) =&gt;</span> val);

    <span class="hljs-keyword">const</span> filtered = articles.filter(<span class="hljs-function">(<span class="hljs-params">article</span>) =&gt;</span> {
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Search term: '</span> + searchTerm || <span class="hljs-string">'searchTerm'</span>);
      <span class="hljs-keyword">const</span> searchMatch =
        article.title?.toLowerCase().includes(searchTerm.toLowerCase()) ||
        article.description?.toLowerCase().includes(searchTerm.toLowerCase()) ||
        article.tags?.some(<span class="hljs-function">(<span class="hljs-params">tag</span>) =&gt;</span> tag.toLowerCase().includes(searchTerm.toLowerCase())) ||
        article.siteName?.toLowerCase().includes(searchTerm.toLowerCase()) ||
        article.publishedDate?.toLowerCase().includes(searchTerm.toLowerCase());


        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'This is the searchMarch: '</span> + searchMatch || <span class="hljs-string">'FALSE searchMatch'</span>);
        <span class="hljs-built_in">console</span>.log(article.title || <span class="hljs-string">'article.title no wan show'</span>);

      <span class="hljs-keyword">const</span> tagMatch = article.tags?.some(<span class="hljs-function">(<span class="hljs-params">tag</span>) =&gt;</span> {
        <span class="hljs-keyword">const</span> index = tags.indexOf(tag);
        <span class="hljs-keyword">return</span> index !== <span class="hljs-number">-1</span> &amp;&amp; isActive[index];
      }) || <span class="hljs-literal">false</span>;

      <span class="hljs-keyword">if</span> (anyTagActive) {
        <span class="hljs-keyword">return</span> tagMatch &amp;&amp; searchMatch; <span class="hljs-comment">// Only return articles if tag is active and search matches</span>
      }

      <span class="hljs-keyword">return</span> searchMatch; <span class="hljs-comment">// If no tags active, return all that match the search term</span>
    });

    setFilteredArticles(filtered);
  }, [articles, searchTerm, isActive]);
</code></pre>
<p>Here, we use a <code>useEffect()</code> hook to monitor for changes in the <code>articles</code>, <code>searchTerm</code>, and <code>isActive</code> constants. <code>isActive</code> is a <code>useState()</code> hook that has an array of boolean values the length of the tags array.</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">const</span> [isActive, setIsActive] = useState(tags.map(<span class="hljs-function">() =&gt;</span> <span class="hljs-literal">false</span>));
</code></pre>
<p>Here, the <code>filtered</code> constant is equal to the filtered values of <code>articles</code>.</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">const</span> filtered = articles.filter();
</code></pre>
<p>Inside the <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter">filter method</a> is where the arrow function with the logic for filtering is written – <code>(article) =&gt; {//logic}</code>. We have two constants: <code>tagMatch</code> and <code>searchMatch</code>. The <code>searchMatch</code> constant is true when the title, description, tags, site name, or published date includes the search term. Else, it's false. The <code>tagMatch</code> constant is true when any tag from the article's array of tag is present in the tag list, and also has a corresponding <code>isActive</code> value of true.</p>
<p>If any tag at all is active, then the results for both <code>tagMatch</code> and <code>searchMatch</code> are returned, but if no tag at all is active, then only the <code>searchMatch</code> is returned as true.</p>
<p>The filtered article list is what is then passed into the <code>ArticleCard</code> component.</p>
<pre><code class="lang-typescript">&lt;ArticleCard articles={filteredArticles} /&gt;
</code></pre>
<h2 id="heading-project-structure">Project Structure</h2>
<p>This is what the project file structure looks like:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1748605144895/e56eea92-8851-4717-ae82-0e15f70dc31f.png" alt="e56eea92-8851-4717-ae82-0e15f70dc31f" class="image--center mx-auto" width="404" height="692" loading="lazy"></p>
<p>At the root, we have the config files and <code>node_modules</code> which is not displayed here. The <code>public</code> folder holds all the images and icons. Then, in the <code>src</code> folder, we have <code>app</code>, <code>component</code>, and <code>utils</code>.</p>
<p>The <code>components</code> folder holds the files for the components – the nav bar, footer, hero, main body and article card. The <code>utils</code> folder has all the functions that run in the background and do not need to render anything. The <code>fetchArticles</code> function is there, along with other functions for extracting the date published, title, description, image URL, and others from HTTP responses gotten from the article URLs. The <code>app</code> folder has the favicon, the global CSS stylesheet, the <code>page</code> and <code>layout</code> files, <code>articles.json</code> which is the JSON file where I add new article URLs for rendering, a test HTML file (wsl.html), and the <code>about/</code> and <code>api/</code> directories.</p>
<p>Inside the about folder, we have the about page, and inside the API folder, we have tthe folder, <code>metadata-local-test</code> which is no longer relevant to the project. I used it initially to create an internal API to fetch from the URLs. But I later restructured the codebase.</p>
<h2 id="heading-steps-to-build-the-blog">Steps to Build the Blog</h2>
<h3 id="heading-1-install-nextjs">1. Install Next.js</h3>
<p>To install Next.js, navigate to the folder where you want the project to reside and open that location in your terminal. Then type the following:</p>
<pre><code class="lang-bash">npx create-next-app@latest
</code></pre>
<p>You're going to be met with the following prompts:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746881930473/228a02f7-6571-46f0-9503-d4606e19bd10.png" alt="Installing Next.js" class="image--center mx-auto" width="866" height="217" loading="lazy"></p>
<h3 id="heading-2-navigate-to-your-newly-created-project-folder-and-install-dependencies">2. Navigate to your newly created project folder and install dependencies</h3>
<p>In the newly created project folder, run the project in development mode to preview your newly created Next project. You will be shown a message directing you to localhost on port 3000. Now, it's time for us to start creating what we want.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746882046144/df46e975-14f2-4dc9-81d7-5bbb9a344f7b.png" alt="Success! Navigating to the project directory." class="image--center mx-auto" width="866" height="90" loading="lazy"></p>
<p>Now, one more thing you'll need to do. In the project, I used lucide-react to get one of the icons, and cheerio to extract data from the HTML. So, you’ll need to install those dependencies.</p>
<p>To install lucide-react, use this command in the project folder:</p>
<pre><code class="lang-bash">npm install lucide-react
</code></pre>
<p>Then install cheerio:</p>
<pre><code class="lang-bash">npm install cheerio
</code></pre>
<h3 id="heading-3-change-the-title-and-description-in-the-page-metadata">3. Change the title and description in the page metadata</h3>
<p>The title is what shows up at the top of your browser tab when you open up the website. Right now, it should be showing 'Create Next App.' We don't want that.</p>
<p>Since this is not just HTML, there is no <code>index.html</code> to change the title in the header element. Rather, Next.js provides us a <code>Metadata</code> object we can use to change things like that. And it'll be in the <code>layout.tsx</code> file in the <code>app</code> or <code>src</code> folder. Head over there and change it to whatever you want the title to be. I’m using “Chidiadi Portfolio Blog”.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746882205569/b652a7de-00b7-4f0d-943c-4f80a62a7f91.png" alt="Changing metadata" width="427" height="107" loading="lazy"></p>
<h3 id="heading-4-create-the-necessary-components">4. Create the necessary components</h3>
<p>Navigate to the side panel, and under the <code>src</code> folder, create a components folder. This is where the components will live. Here, create the article card, footer, main body and nav bar.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746882335350/69d1f7ed-ea67-47e7-8b0a-e25429190a3e.png" alt="Components folder" width="359" height="86" loading="lazy"></p>
<p>For the <strong>Navbar</strong>, this is the code:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Navbar</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">return</span>(
        &lt;&gt;
        &lt;div className=<span class="hljs-string">"text-3xl md:text-base flex w-[100vw] md:w-[98.2vw] lg:w-[98.8vw] h-[60px] bg-black text-white px-0 md:px-7 md:py-2 items-center justify-center md:justify-between"</span>&gt;
            &lt;h1 className=<span class="hljs-string">"font-bold"</span>&gt;CHIDIADI   ANYANWU&lt;/h1&gt;
            &lt;div className=<span class="hljs-string">"hidden md:block flex space-x-4"</span>&gt;
                &lt;a href=<span class="hljs-string">"/"</span> className=<span class="hljs-string">"hover:text-gray-400"</span>&gt;Blog&lt;/a&gt;
                &lt;a href=<span class="hljs-string">"/about"</span> className=<span class="hljs-string">"hover:text-gray-400"</span>&gt;About&lt;/a&gt;    
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;/&gt;
    );
}
</code></pre>
<p>Here's what the <strong>Hero</strong> component looks like:</p>
<pre><code class="lang-typescript"><span class="hljs-string">"use client"</span>;

<span class="hljs-keyword">import</span> { Search } <span class="hljs-keyword">from</span> <span class="hljs-string">'lucide-react'</span>;
<span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;

<span class="hljs-keyword">interface</span> HeroProps {
    searchTerm: <span class="hljs-built_in">string</span>;
    setSearchTerm: React.Dispatch&lt;React.SetStateAction&lt;<span class="hljs-built_in">string</span>&gt;&gt;;
  }
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Hero</span>(<span class="hljs-params">{ searchTerm, setSearchTerm }: HeroProps</span>) </span>{
    <span class="hljs-keyword">const</span> [buttonColor, setButtonColor] = useState(<span class="hljs-string">''</span>);

    <span class="hljs-keyword">return</span> (
        &lt;div className=<span class="hljs-string">"bg-[url('/img-one-1.jpg')] bg-cover bg-center bg-no-repeat flex flex-col items-center justify-center h-[400px] relative"</span>&gt;
           &lt;div className=<span class="hljs-string">" absolute inset-0 bg-black opacity-60"</span>&gt;&lt;/div&gt; 
            &lt;h1 className=<span class="hljs-string">"text-4xl text-white font-bold text-center z-10"</span>&gt;My Portfolio Blog&lt;/h1&gt;
            &lt;p className=<span class="hljs-string">"mt-4 mx-4 text-xlarge text-white md:text-xl text-justify md:text-center z-10"</span> style={{ fontFamily: <span class="hljs-string">"Cormorant Garamond"</span> }}&gt;
                My name is Chidiadi Anyanwu. I am a technical writer <span class="hljs-keyword">with</span> a strong background <span class="hljs-keyword">in</span> networking. 
                I write about Networking, Cloud, DevOps, and even sometimes web development like <span class="hljs-built_in">this</span> one. I built <span class="hljs-built_in">this</span>
                website <span class="hljs-keyword">with</span> Next.js, and there<span class="hljs-string">'s also an &lt;a href="/" className="text-blue-500 hover:text-blue-700 hover:underline"&gt;article about that.&lt;/a&gt;
                  This website holds my technical articles in one place. It is a repository of my written works.
            &lt;/p&gt;
            &lt;div id="searchbar" className="h-9xl mt-4 flex align-items-center justify-center w-full" &gt;

                &lt;form onSubmit={(e) =&gt; {e.preventDefault();  setSearchTerm(searchTerm);}} className="group mt-4 relative w-[70%] md:w-[50%]"&gt;
                    &lt;input  value={searchTerm} onChange={(e) =&gt; setSearchTerm(e.target.value) } onFocus={()=&gt;{setButtonColor('</span>bg-blue<span class="hljs-number">-500</span><span class="hljs-string">'); console.log('</span>input focused<span class="hljs-string">')}} onBlur={()=&gt;{setButtonColor('</span><span class="hljs-string">');}}type="search" placeholder="Search Chidiadi'</span>s articles<span class="hljs-string">" className="</span>h-[<span class="hljs-number">50</span>px] w-full px-[<span class="hljs-number">48</span>px] border<span class="hljs-number">-3</span> border-blue<span class="hljs-number">-300</span> rounded-[<span class="hljs-number">25</span>px] focus:outline-none focus:border-blue<span class="hljs-number">-500</span> text-black bg-white<span class="hljs-string">"/&gt;
                    &lt;button className={`h-[42px] w-[42px] absolute right-0 mr-1.5 mt-1 rounded-[50%] bg-blue-300 ${buttonColor}`}&gt;
                        &lt;Search  className='m-auto text-white'/&gt;
                    &lt;/button&gt;
                &lt;/form&gt;

            &lt;/div&gt;
        &lt;/div&gt;
    );
}</span>
</code></pre>
<p>In this file, we created the HeroProps interface to accept the search props. Then we deconstructed both <code>searchTerm</code> and <code>setSearchTerm</code> from it as props to the Hero component. We’ll make it a client component <code>'use client'</code> because of the buttonColor <code>useState()</code> hook that changes when the search bar is clicked and sets the search button background color.</p>
<p>The <strong>MainBody</strong> component looks like this:</p>
<pre><code class="lang-typescript"><span class="hljs-string">"use client"</span>;

<span class="hljs-keyword">import</span> { useEffect, useState } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> ArticleCard, { Article } <span class="hljs-keyword">from</span> <span class="hljs-string">'./ArticleCard'</span>;

<span class="hljs-keyword">interface</span> MainBodyProps {
  searchTerm: <span class="hljs-built_in">string</span>;
  articles: Article[];
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">MainBody</span>(<span class="hljs-params">{ searchTerm, articles }: MainBodyProps</span>) </span>{
  <span class="hljs-comment">// Get articles from JSON file and create array of article objects</span>

  <span class="hljs-keyword">const</span> [filteredArticles, setFilteredArticles] = useState&lt;Article[]&gt;([]);

  <span class="hljs-keyword">const</span> tags = [<span class="hljs-string">"Networking"</span>, <span class="hljs-string">"Cloud"</span>, <span class="hljs-string">"DevOps"</span>, <span class="hljs-string">"Web Dev"</span>, <span class="hljs-string">"Cybersecurity"</span>];
  <span class="hljs-keyword">const</span> [isActive, setIsActive] = useState(tags.map(<span class="hljs-function">() =&gt;</span> <span class="hljs-literal">false</span>));


  <span class="hljs-comment">// Filter articles based on search term and active tags</span>
  useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">const</span> anyTagActive = isActive.some(<span class="hljs-function">(<span class="hljs-params">val</span>) =&gt;</span> val);

    <span class="hljs-keyword">const</span> filtered = articles.filter(<span class="hljs-function">(<span class="hljs-params">article</span>) =&gt;</span> {
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Search term: '</span> + searchTerm || <span class="hljs-string">'searchTerm'</span>);
      <span class="hljs-keyword">const</span> searchMatch =
        article.title?.toLowerCase().includes(searchTerm.toLowerCase()) ||
        article.description?.toLowerCase().includes(searchTerm.toLowerCase()) ||
        article.tags?.some(<span class="hljs-function">(<span class="hljs-params">tag</span>) =&gt;</span> tag.toLowerCase().includes(searchTerm.toLowerCase())) ||
        article.siteName?.toLowerCase().includes(searchTerm.toLowerCase()) ||
        article.publishedDate?.toLowerCase().includes(searchTerm.toLowerCase());


        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'This is the searchMarch: '</span> + searchMatch || <span class="hljs-string">'FALSE searchMatch'</span>);
        <span class="hljs-built_in">console</span>.log(article.title || <span class="hljs-string">'article.title no wan show'</span>);

      <span class="hljs-keyword">const</span> tagMatch = article.tags?.some(<span class="hljs-function">(<span class="hljs-params">tag</span>) =&gt;</span> {
        <span class="hljs-keyword">const</span> index = tags.indexOf(tag);
        <span class="hljs-keyword">return</span> index !== <span class="hljs-number">-1</span> &amp;&amp; isActive[index];
      }) || <span class="hljs-literal">false</span>;

      <span class="hljs-keyword">if</span> (anyTagActive) {
        <span class="hljs-keyword">return</span> tagMatch &amp;&amp; searchMatch; <span class="hljs-comment">// Only return articles if tag is active and search matches</span>
      }

      <span class="hljs-keyword">return</span> searchMatch; <span class="hljs-comment">// If no tags active, return all that match the search term</span>
    });

    setFilteredArticles(filtered);
  }, [articles, searchTerm, isActive]); 

  <span class="hljs-built_in">console</span>.log(filteredArticles);

  <span class="hljs-keyword">return</span> (
    &lt;div className=<span class="hljs-string">'scroll-smooth'</span>&gt;
      &lt;div id=<span class="hljs-string">"tags"</span> className=<span class="hljs-string">"flex w-full h-[200px] md:h-[60px] justify-center gap-5 py-4 flex-wrap max-w-[100vw] scroll-smooth"</span>&gt;
        {tags.map(<span class="hljs-function">(<span class="hljs-params">tag, index</span>) =&gt;</span> (
          &lt;p
            key={index}
            onClick={<span class="hljs-function">() =&gt;</span> {
              <span class="hljs-keyword">const</span> newIsActive = [...isActive];
              newIsActive[index] = !newIsActive[index];
              setIsActive(newIsActive);
            }}
            className={<span class="hljs-string">`h-[48px] w-[140px] border-3 rounded-[40px] px-2 py-2 text-center font-bold <span class="hljs-subst">${
              isActive[index]
                ? <span class="hljs-string">'bg-black border-black text-white hover:bg-gray-700 hover:border-gray-700'</span>
                : <span class="hljs-string">'border-blue-500 hover:bg-blue-500 hover:text-white'</span>
            }</span>`</span>}&gt;
            {tag}
          &lt;/p&gt;
        ))}
      &lt;/div&gt;

      &lt;div id=<span class="hljs-string">"articlegrid"</span> className=<span class="hljs-string">"w-[100vw] md:w-[98vw] grid gap-2 grid-cols-1 md:grid-cols-2 xl:grid-cols-3 mt-5 px-3 py-3"</span>&gt;
        &lt;ArticleCard articles={filteredArticles} /&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  );
}
</code></pre>
<p>Here, we have props from the parent component too, but we only need the articles fetched and the search term. We don't need to set the fetch term from this component.</p>
<p>To render the tags, I first created the array of tags and an array of boolean values to record the states of the tags (whether they're active or inactive).</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">const</span> tags = [<span class="hljs-string">"Networking"</span>, <span class="hljs-string">"Cloud"</span>, <span class="hljs-string">"DevOps"</span>, <span class="hljs-string">"Web Dev"</span>, <span class="hljs-string">"Cybersecurity"</span>];
<span class="hljs-keyword">const</span> [isActive, setIsActive] = useState(tags.map(<span class="hljs-function">() =&gt;</span> <span class="hljs-literal">false</span>));
</code></pre>
<p>Then, inside the return statement, I mapped through the tag array to render them one by one. The onClick event handler also works here to make sure that the <code>isActive</code> state for that particular tag is toggled when it is clicked.</p>
<p>So how does this work? It creates a new array called <code>newIsActive</code> that is a copy of the <code>isActive</code> array. It then gets the particular tag by index number and inverts it. Then it sets the <code>isActive</code> array to this new array.</p>
<pre><code class="lang-typescript">{tags.map(<span class="hljs-function">(<span class="hljs-params">tag, index</span>) =&gt;</span> (
          &lt;p
            key={index}
            onClick={<span class="hljs-function">() =&gt;</span> {
              <span class="hljs-keyword">const</span> newIsActive = [...isActive];
              newIsActive[index] = !newIsActive[index];
              setIsActive(newIsActive);
            }} . . .
</code></pre>
<p>This is the code for the <strong>ArticleCard</strong>:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> React, { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> Image  <span class="hljs-keyword">from</span> <span class="hljs-string">'next/image'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">interface</span> Article {
  id: <span class="hljs-built_in">number</span>;
  title?: <span class="hljs-built_in">string</span>;
  description?: <span class="hljs-built_in">string</span>;
  publishedDate?: <span class="hljs-built_in">string</span>;
  url: <span class="hljs-built_in">string</span>;
  imgUrl?: <span class="hljs-built_in">string</span>;
  siteName?: <span class="hljs-built_in">string</span>;
  tags?: <span class="hljs-built_in">string</span>[];
}

<span class="hljs-keyword">interface</span> ArticleProps {
  articles: Article[];
}

<span class="hljs-keyword">const</span> ArticleCard = <span class="hljs-function">(<span class="hljs-params">{ articles }: ArticleProps</span>) =&gt;</span> {

  <span class="hljs-keyword">return</span> (
    &lt;&gt;
    {articles ?

      (articles.map(<span class="hljs-function">(<span class="hljs-params">item, id</span>) =&gt;</span> (
        <span class="hljs-comment">//anchor tag for the link</span>
        &lt;a key={id}  href={item.url} className=<span class="hljs-string">'max-w-[350px] mx-auto mb-5'</span>&gt;
            &lt;div className=<span class="hljs-string">"sm:w-[350px] hover:brightness-70"</span> data-title={item.title} data-description={item.description} data-published-date={item.publishedDate} data-tag=<span class="hljs-string">"Networking"</span> data-site-name={item.siteName}&gt;
            &lt;Image
              src={item.imgUrl || <span class="hljs-string">'/img-2.jpg'</span>} 
              alt={item.title || <span class="hljs-string">'Article Image'</span>}
              width={<span class="hljs-number">350</span>}
              height={<span class="hljs-number">400</span>}
              className=<span class="hljs-string">"object-cover rounded-[10px]"</span>
            /&gt;
            &lt;div className=<span class="hljs-string">"flex h-[43px] text-[14px] text-gray-500 gap-2"</span>&gt;
                &lt;p id=<span class="hljs-string">"Platform"</span> className=<span class="hljs-string">"py-2 h-[42px] md:text-sm mt-auto mb-auto"</span>&gt;{item.siteName}&lt;/p&gt;
                &lt;div className=<span class="hljs-string">"h-1 w-1 bg-black rounded-full mt-auto mb-auto bg-gray-500"</span>&gt;&lt;/div&gt;
                &lt;p id=<span class="hljs-string">"publishedDate"</span> className=<span class="hljs-string">"py-2 h-[42px] mt-auto mb-auto"</span>&gt;{item.publishedDate}&lt;/p&gt;
            &lt;/div&gt;
            &lt;h1 id=<span class="hljs-string">"titleOfArticle"</span> className=<span class="hljs-string">"font-bold text-base md:text-3xl"</span>&gt;{item.title}&lt;/h1&gt;
            &lt;br/&gt;
            &lt;p className=<span class="hljs-string">'w-full md:w-[350px]'</span>&gt;{item.description}&lt;/p&gt;
            &lt;/div&gt;
        &lt;/a&gt;
      )))
      :

      ( <span class="hljs-built_in">Array</span>(<span class="hljs-number">6</span>).fill(<span class="hljs-number">0</span>).map(<span class="hljs-function">(<span class="hljs-params">item, id</span>) =&gt;</span> (
        &lt;div key={id} className=<span class="hljs-string">"w-full md:w-[350px] h-[350px] bg-gray-500 mx-auto mb-5 hover:brightness-80 rounded-[10px] animate-pulse"</span>&gt;&lt;/div&gt;
      )))
    }
    &lt;/&gt;
  );
};

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> ArticleCard;
</code></pre>
<p>Here, we defined and exported the <code>Article</code> interface so that we can create <code>Article</code> objects in the <code>MainBody</code>. Then, we created an interface to pass down the props of an array of <code>Article</code> objects.</p>
<p>Next, there's this part to ensure it renders something even if for some reason no Article object was passed:</p>
<pre><code class="lang-typescript">{
    article?
    ( {<span class="hljs-comment">/*If article exists, render this*/</span>} )
    :
    ( {<span class="hljs-comment">/*Else, render this */</span>} )
}
</code></pre>
<p>Our fail-safe here is an empty array of six objects with the Tailwind <code>animate-pulse</code>:</p>
<pre><code class="lang-typescript"> ( <span class="hljs-built_in">Array</span>(<span class="hljs-number">6</span>).fill(<span class="hljs-number">0</span>).map(<span class="hljs-function">(<span class="hljs-params">item, id</span>) =&gt;</span> (
        &lt;div key={id} className=<span class="hljs-string">"w-full md:w-[350px] h-[350px] bg-gray-500 mx-auto mb-5 hover:brightness-80 rounded-[10px] animate-pulse"</span>&gt;&lt;/div&gt;
      )))
</code></pre>
<p>I could have made this part much better, but I was feeling a little lazy. I also used the <code>Image</code> from Next, instead of the regular <code>img</code>. This requires that you edit the <code>next.config.ts</code> file. I had to go add all the paths that the images could possibly be loaded from:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746882422600/e3ad4762-1199-4276-a524-d27519a37c52.png" alt="next.config.ts" class="image--center mx-auto" width="742" height="632" loading="lazy"></p>
<p>Just like in the screenshot above, the syntax is:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> <span class="hljs-keyword">type</span> { NextConfig } <span class="hljs-keyword">from</span> <span class="hljs-string">"next"</span>;

<span class="hljs-keyword">const</span> nextConfig: NextConfig = {
  images: {
    remotePatterns: [
        {
            protocol:<span class="hljs-string">"https"</span>,
            hostname:<span class="hljs-string">"licdn.com"</span>,
            pathname:<span class="hljs-string">"/**"</span>
        },
        {
            protocol:<span class="hljs-string">""</span>,
            hostname:<span class="hljs-string">""</span>,
            pathname:<span class="hljs-string">""</span>
        }
        ],
    },
};
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> nextConfig;
</code></pre>
<p>It takes a <code>remotePatterns</code> array that consists of remote pattern objects, which have a protocol, hostname, and pathname property. Make sure the protocol and hostname properties are not empty like in the second object in the code sample above. That would cause errors. It’s either the objects are populated properly or they’re deleted.</p>
<p>The <strong>Footer</strong> looks like this:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Footer</span>(<span class="hljs-params"></span>) </span>{

    <span class="hljs-keyword">return</span> (
        &lt;footer className=<span class="hljs-string">"bg-gray-100 text-center py-4 mt-10"</span>&gt;
            &lt;div className=<span class="hljs-string">"flex align-items-center justify-center text-sm text-blue-400 font-bold"</span>&gt;
                &lt;a href=<span class="hljs-string">"/"</span> className=<span class="hljs-string">"hover:text-blue-600"</span>&gt;Home&lt;/a&gt;
                &lt;p&gt; &amp;nbsp; &amp;nbsp; | &amp;nbsp; &amp;nbsp; &lt;/p&gt;
                &lt;a href=<span class="hljs-string">"/about"</span> className=<span class="hljs-string">"hover:text-blue-600"</span>&gt;About&lt;/a&gt;
            &lt;/div&gt;
            &lt;p className=<span class="hljs-string">"text-sm text-gray-600"</span>&gt;© {<span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>().getFullYear()} Chidiadi Anyanwu. All rights reserved.&lt;/p&gt;
            &lt;p className=<span class="hljs-string">"text-sm text-gray-600"</span>&gt;Built <span class="hljs-keyword">with</span> Next.js and Tailwind CSS&lt;/p&gt;
        &lt;/footer&gt;
    );

}
</code></pre>
<p>This <code>new Date().getFullYear()</code> helps me get the current year all the time.</p>
<h3 id="heading-5-place-the-components-properly">5. Place the components properly</h3>
<p>The nav bar and footer components are things that will not change no matter the page you visit. So they should be placed in a more permanent and untouched location. We can put both of them in the root <code>layout.tsx</code> file like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746882493175/3d7381ca-48c6-43c1-becc-8692c6b090c4.png" alt="layout.tsx file" class="image--center mx-auto" width="929" height="481" loading="lazy"></p>
<pre><code class="lang-typescript"> &lt;body className={<span class="hljs-string">`<span class="hljs-subst">${geistSans.variable}</span> <span class="hljs-subst">${geistMono.variable}</span> antialiased scroll-smooth`</span>}&gt;
      &lt;Navbar /&gt;
      {children}
      &lt;Footer /&gt;
  &lt;/body&gt;
</code></pre>
<p><code>{children}</code> is where the contents from <code>page.tsx</code> will enter. So, we sandwiched all the other content in the Nav bar and footer. Apart from adding <code>&lt;link /&gt;</code> tags for fonts (because this is where the root HTML is), we really don't have business with this file again.</p>
<p>Now, in the same <code>app/</code> folder where this layout file is, create the <code>&lt;HomeClient /&gt;</code> file. This is how it looks:</p>
<pre><code class="lang-typescript"><span class="hljs-string">'use client'</span>;

<span class="hljs-keyword">import</span> { useState } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;
<span class="hljs-keyword">import</span> Hero <span class="hljs-keyword">from</span> <span class="hljs-string">'../components/hero'</span>;
<span class="hljs-keyword">import</span> MainBody <span class="hljs-keyword">from</span> <span class="hljs-string">'../components/mainbody'</span>;
<span class="hljs-keyword">import</span> { Article } <span class="hljs-keyword">from</span> <span class="hljs-string">'../components/ArticleCard'</span>;

<span class="hljs-keyword">interface</span> Props {
  initialArticles: Article[];
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">HomeClient</span>(<span class="hljs-params">{ initialArticles }: Props</span>) </span>{
  <span class="hljs-keyword">const</span> [searchTerm, setSearchTerm] = useState&lt;<span class="hljs-built_in">string</span>&gt;(<span class="hljs-string">''</span>);
  <span class="hljs-keyword">const</span> [articles, setArticles] = useState&lt;Article[]&gt;(initialArticles);

  <span class="hljs-keyword">return</span> (
    &lt;div&gt;
      &lt;Hero searchTerm={searchTerm} setSearchTerm={setSearchTerm} /&gt;
      &lt;MainBody searchTerm={searchTerm} articles={articles} /&gt;
    &lt;/div&gt;
  );
}
</code></pre>
<p>Then, put the <code>HomeClient</code> component inside the <code>page.tsx</code> file:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { fetchArticles } <span class="hljs-keyword">from</span> <span class="hljs-string">'../utils/fetchArticles'</span>;
<span class="hljs-keyword">import</span> HomeClient <span class="hljs-keyword">from</span> <span class="hljs-string">'./HomeClient'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> revalidate = <span class="hljs-number">3600</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">HomePage</span>(<span class="hljs-params"></span>) </span>{
  <span class="hljs-keyword">const</span> articles = <span class="hljs-keyword">await</span> fetchArticles(); 

  <span class="hljs-keyword">return</span> &lt;HomeClient initialArticles={articles} /&gt;;
}
</code></pre>
<p>The server is set to fetch the articles at build time, and fetch again (revalidate) every hour (3600s). So, it doesn't fetch the articles from the URLs upon user request of the page.</p>
<p>Initially, it worked by fetching any time the component was mounted, but I noticed that this caused the page to load very slowly. The articles didn't pop-up on time, because there's a lot of fetching to be done.</p>
<p>In that same <code>app/</code> directory, create an <code>about/</code> folder, and create the <code>page.tsx</code> for that route:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> Image <span class="hljs-keyword">from</span> <span class="hljs-string">"next/image"</span>;
<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">About</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">return</span> (
        &lt;&gt;
            &lt;div className=<span class="hljs-string">"flex items-center justify-center"</span>&gt;
                &lt;div className=<span class="hljs-string">"margin-auto w-[90vw] md:w-[60vw] lg:w-[50vw] h-[450px] hover:bg-gray-100 border-1 md:border-2 border-gray-200 shadow-sm flex flex-wrap  items-center justify-center gap-2 mt-10 mb-10 rounded-lg"</span>&gt;
                    &lt;Image
                        src=<span class="hljs-string">"/MyPhotoChidiadi.jpg"</span> 
                        alt=<span class="hljs-string">"Avatar"</span>
                        className=<span class="hljs-string">"rounded-[50%] h-30 w-30"</span>
                        width={<span class="hljs-number">120</span>} 
                        height={<span class="hljs-number">120</span>} 
                    /&gt;
                    &lt;div className=<span class="hljs-string">"w-[90%] mx-auto"</span>&gt;
                        &lt;h1 className=<span class="hljs-string">"text-xl text-center my-1 font-bold"</span>&gt;About Me&lt;/h1&gt;
                        &lt;p className=<span class="hljs-string">"text-justify my-3"</span>&gt;
                            My name is Chidiadi Anyanwu. I love breaking down complex concepts.
                            I write about Networking, Cloud, DevOps, and even sometimes web development. 
                            You can connect <span class="hljs-keyword">with</span> me by following <span class="hljs-built_in">any</span> <span class="hljs-keyword">of</span> the links below.
                        &lt;/p&gt;
                        &lt;hr className=<span class="hljs-string">"border-gray-300 my-3"</span> /&gt;
                        &lt;div className=<span class="hljs-string">"flex gap-7 w-full my-3 justify-center"</span>&gt; 
                            &lt;a href=<span class="hljs-string">"https://github.com/chidiadi01"</span>&gt;
                                &lt;Image src=<span class="hljs-string">'/github-icon.svg'</span> alt=<span class="hljs-string">"github logo"</span> width={<span class="hljs-number">24</span>} height={<span class="hljs-number">24</span>} /&gt;
                            &lt;/a&gt;
                            &lt;a href=<span class="hljs-string">"https://linkedin.com/in/chidiadi-anyanwu"</span>&gt;
                                &lt;Image src=<span class="hljs-string">'linkedin-icon.svg'</span> alt=<span class="hljs-string">"linkedin logo"</span> width={<span class="hljs-number">24</span>} height={<span class="hljs-number">24</span>}/&gt;
                            &lt;/a&gt;
                            &lt;a href=<span class="hljs-string">"https://x.com/chidiadi01"</span>&gt;
                                &lt;Image src=<span class="hljs-string">'x-2.svg'</span> alt=<span class="hljs-string">"x logo"</span> width={<span class="hljs-number">24</span>} height={<span class="hljs-number">24</span>}/&gt; 
                            &lt;/a&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/&gt;
    );
}
</code></pre>
<h3 id="heading-6-create-the-utils-folder-and-all-the-functions">6. Create the utils folder and all the functions</h3>
<p>The next step is to create all these files.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746947058303/01b6fd3d-3666-46fe-8928-1ad5b1532625.png" alt="utils folder" class="image--center mx-auto" width="359" height="136" loading="lazy"></p>
<p>Under the same <code>app/</code> directory, create the <code>utils/</code> folder. <code>app/utils/</code>. Then start with the <code>fetchArticles()</code> function. The <code>fetchArticles()</code> function is what accesses the API route in the project to obtain the array of Article objects from an array of URLs. The <code>fetchArticles()</code> function returns an array of those objects which are then stored in the <code>articles</code> variable. It looks like this:</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { getPublishedDate } <span class="hljs-keyword">from</span> <span class="hljs-string">'./getPublishedDate'</span>;
<span class="hljs-keyword">import</span> { getTitle } <span class="hljs-keyword">from</span> <span class="hljs-string">'./getTitle'</span>;
<span class="hljs-keyword">import</span> { getImageURL } <span class="hljs-keyword">from</span> <span class="hljs-string">'./getImageURL'</span>;
<span class="hljs-keyword">import</span> { getDescription } <span class="hljs-keyword">from</span> <span class="hljs-string">'./getDescription'</span>;
<span class="hljs-keyword">import</span> { getPlatform } <span class="hljs-keyword">from</span> <span class="hljs-string">'./getPlatform'</span>;
<span class="hljs-keyword">import</span> articleFile <span class="hljs-keyword">from</span> <span class="hljs-string">'../app/articles.json'</span>;
<span class="hljs-keyword">import</span> { Article } <span class="hljs-keyword">from</span> <span class="hljs-string">'../components/ArticleCard'</span>;
<span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> cheerio <span class="hljs-keyword">from</span> <span class="hljs-string">'cheerio'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">async</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">fetchArticles</span>(<span class="hljs-params"></span>): <span class="hljs-title">Promise</span>&lt;<span class="hljs-title">Article</span>[]&gt; </span>{
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Fetching articles...'</span>);
  <span class="hljs-keyword">const</span> results = <span class="hljs-keyword">await</span> <span class="hljs-built_in">Promise</span>.all(
    articleFile.articles.map(<span class="hljs-keyword">async</span> (item) =&gt; {
      <span class="hljs-comment">//Validate URL first</span>
       <span class="hljs-keyword">if</span> (!item.url || <span class="hljs-keyword">typeof</span> item.url !== <span class="hljs-string">'string'</span> || item.url.trim() === <span class="hljs-string">''</span>) {
        <span class="hljs-built_in">console</span>.warn(<span class="hljs-string">`Invalid URL: <span class="hljs-subst">${item.url}</span>`</span>);
        <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>; <span class="hljs-comment">// Skip this item</span>
      } 
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'The URL: '</span> + item.url);
      <span class="hljs-keyword">let</span> data;
      <span class="hljs-keyword">try</span> {

        <span class="hljs-comment">// Fetch metadata and HTML from the URL</span>
        <span class="hljs-keyword">const</span> response = <span class="hljs-keyword">await</span> fetch(item.url, {
          headers: {
            <span class="hljs-string">'User-Agent'</span>: <span class="hljs-string">'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36'</span>,
            <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'</span>,
            <span class="hljs-string">'Accept-Language'</span>: <span class="hljs-string">'en-US,en;q=0.5'</span>,
            <span class="hljs-string">'Referer'</span>: <span class="hljs-string">'https://www.google.com/'</span>, 
          },
        });

        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Fetched: '</span>+ item.url);

        <span class="hljs-keyword">if</span> (!response.ok) {
          <span class="hljs-built_in">console</span>.error(<span class="hljs-string">`HTTP error! Status: <span class="hljs-subst">${response.status}</span> for URL: <span class="hljs-subst">${item.url}</span>`</span>);
          <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">`HTTP error! Status: <span class="hljs-subst">${response.status}</span>`</span>);
        }

        <span class="hljs-keyword">const</span> html = <span class="hljs-keyword">await</span> response.text();
        <span class="hljs-keyword">const</span> $ = cheerio.load(html);
        <span class="hljs-keyword">const</span> jsonScript = $(<span class="hljs-string">'script[type="application/ld+json"]'</span>).html();

        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Gotten HTML response'</span>);

        <span class="hljs-keyword">if</span> (!jsonScript) {
          <span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Error</span>(<span class="hljs-string">'No JSON-LD script found on page'</span>);
        }

        <span class="hljs-keyword">const</span> metadata = <span class="hljs-built_in">JSON</span>.parse(jsonScript);
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Gotten metadata'</span>);


        <span class="hljs-comment">// Combine metadata and HTML into a single object</span>
        data = { metadata, html };
      } <span class="hljs-keyword">catch</span> (error) {
        <span class="hljs-built_in">console</span>.error(<span class="hljs-string">`Failed to fetch metadata for URL: <span class="hljs-subst">${item.url}</span>`</span>, error);
        <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>;
        <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'The default empty object has been returned here'</span>);
      }

      <span class="hljs-comment">// Use the combined data (metadata and HTML) to construct the article object</span>
      <span class="hljs-keyword">if</span>(getTitle(data) &amp;&amp; getDescription(data) &amp;&amp;
         getPublishedDate(data) &amp;&amp; getImageURL(data) &amp;&amp;
         getPlatform(data) || (item.title &amp;&amp; item.description &amp;&amp;
         item.image)) {
        <span class="hljs-keyword">return</span> {
        ...item,
        id: item.id ?? <span class="hljs-number">0</span>,
        tags: item.tags ?? [],
        title: getTitle(data) || item.title || <span class="hljs-string">'No title'</span>,
        description: item.description || getDescription(data) || <span class="hljs-string">'No description'</span>,
        publishedDate: getPublishedDate(data) ?? <span class="hljs-string">'No date'</span>,
        imgUrl: getImageURL(data) || item.image || <span class="hljs-string">'/img-2.jpg'</span>,
        siteName: getPlatform(data) || data.metadata?.publisher?.name || <span class="hljs-string">'Unknown site'</span>,
        url: item.url || <span class="hljs-string">''</span>,
      } <span class="hljs-keyword">as</span> Article;
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Proper item returned'</span>);
      } <span class="hljs-keyword">else</span> { <span class="hljs-keyword">return</span> <span class="hljs-literal">null</span>; }
    })
  );

  <span class="hljs-comment">// Filter out null values and sort the articles by published date in descending order</span>
  <span class="hljs-keyword">const</span> filteredResults = results.filter((article): article is Article =&gt; article !== <span class="hljs-literal">null</span>);
  <span class="hljs-keyword">const</span> sortedResults = filteredResults.sort(<span class="hljs-function">(<span class="hljs-params">a, b</span>) =&gt;</span> {
    <span class="hljs-keyword">const</span> dateA = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(a.publishedDate || <span class="hljs-string">''</span>).getTime();
    <span class="hljs-keyword">const</span> dateB = <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(b.publishedDate || <span class="hljs-string">''</span>).getTime();
    <span class="hljs-keyword">return</span> dateB - dateA;
  });
  <span class="hljs-built_in">console</span>.log(sortedResults);
  <span class="hljs-keyword">return</span> sortedResults;
}
</code></pre>
<p>It maps through the articles in the articleFile, which is the JSON file with an array of objects with article URLs. For each of them, it sends a request to the URL, and from the data gotten, returns an Article object. Then, the array of objects created, <code>results</code>, is first filtered to remove null objects, and <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort">sorted</a> in descending order by their date properties. So, the latest article shows up first.</p>
<p>It’s then assigned in the <code>HomeClient</code> component:</p>
<pre><code class="lang-typescript"> <span class="hljs-keyword">const</span> articles = <span class="hljs-keyword">await</span> fetchArticles();
</code></pre>
<p>In the <code>fetchArticles()</code> code above, you can see that some other functions were used to extract the properties from the URLs, and assign them. Also, during deployment, I found that Substack couldn’t be accessed by the server, so I’m going to add code to allow creation of Article objects from an RSS feed. That will be in the <a target="_blank" href="https://github.com/chidiadi01/simple-writer-portfolio/tree/main/01-simple-blog">project repository</a>.</p>
<p>Now, let's talk about the other functions.</p>
<h4 id="heading-the-gettitle-function"><strong>The</strong> <code>getTitle()</code> <strong>function:</strong></h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> cheerio <span class="hljs-keyword">from</span> <span class="hljs-string">'cheerio'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getTitle</span>(<span class="hljs-params">data:<span class="hljs-built_in">any</span></span>): <span class="hljs-title">string</span> </span>{
    <span class="hljs-keyword">if</span>(!data) <span class="hljs-keyword">return</span> <span class="hljs-string">'Title Loading . . .'</span>;

    <span class="hljs-keyword">if</span> (data?.html) {
        <span class="hljs-keyword">const</span> $ = cheerio.load(data?.html);
        <span class="hljs-keyword">const</span> ogTitle = $(<span class="hljs-string">'meta[property="og:title"]'</span>).attr(<span class="hljs-string">'content'</span>) || $(<span class="hljs-string">'title'</span>).text();
        <span class="hljs-keyword">return</span> ogTitle;
    }

        <span class="hljs-keyword">return</span> <span class="hljs-string">'The Title of The Article'</span>;
    }
</code></pre>
<p>This is a very simple function. It takes the <code>data</code> parameter, and if there's no data, it returns <code>Title loading . . .</code>. But if there is data, it checks to see if there's HTML in the data. If there is, it then uses cheerio to load the HTML text and extract the title from the Open Graph <code>title</code> metadata or from the <code>&lt;title&gt;</code> tag in the HTML header. Else, it returns <code>The Title of the Article</code>.</p>
<p>Here, we use jQuery-like syntax <code>$</code> to select the HTML elements, like in <code>$('title')</code>. The data taken as a parameter is the response gotten from a HTTP request to the article's URL.</p>
<h4 id="heading-the-getdescription-function"><strong>The</strong> <code>getDescription()</code> <strong>function:</strong></h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> cheerio <span class="hljs-keyword">from</span> <span class="hljs-string">'cheerio'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getDescription</span>(<span class="hljs-params">data: <span class="hljs-built_in">any</span></span>): <span class="hljs-title">string</span> </span>{
  <span class="hljs-keyword">if</span> (!data) <span class="hljs-keyword">return</span> <span class="hljs-string">'Description Loading . . .'</span>;

  <span class="hljs-keyword">if</span> (data?.metadata || data?.html) {
    <span class="hljs-keyword">const</span> $ = cheerio.load(data?.html || <span class="hljs-string">''</span>);
    <span class="hljs-keyword">const</span> description = data?.metadata?.description ?? $(<span class="hljs-string">'meta[property="og:description"]'</span>).attr(<span class="hljs-string">'content'</span>) ?? <span class="hljs-string">'No description found'</span>;
    <span class="hljs-keyword">return</span> description;
  }

  <span class="hljs-keyword">return</span> <span class="hljs-string">'No description found'</span>;
}
</code></pre>
<h4 id="heading-the-geturl-function"><strong>The</strong> <code>getURL()</code> <strong>function:</strong></h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> cheerio <span class="hljs-keyword">from</span> <span class="hljs-string">'cheerio'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getURL</span>(<span class="hljs-params">data: <span class="hljs-built_in">any</span></span>): <span class="hljs-title">string</span></span>{
    <span class="hljs-keyword">if</span>(!data) <span class="hljs-keyword">return</span> <span class="hljs-string">'url'</span>;

    <span class="hljs-keyword">if</span>(data?.metadata || data?.html){
        <span class="hljs-keyword">const</span> $ = cheerio.load(data?.html);
        <span class="hljs-keyword">const</span> url = data?.metadata.url || $(<span class="hljs-string">'meta[property="og:url"]'</span>).attr(<span class="hljs-string">'content'</span>);
        <span class="hljs-keyword">return</span> url;
    }
    <span class="hljs-keyword">return</span> <span class="hljs-string">'url'</span>;
}
</code></pre>
<p>This function is not really used to get the URL of the article for use in the object. Rather, it is used to get the URL for another function, <code>getPlatform()</code>. It works the same way as the ones we discussed before.</p>
<h4 id="heading-the-getplatform-function"><strong>The</strong> <code>getPlatform()</code> <strong>function:</strong></h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> { getURL } <span class="hljs-keyword">from</span> <span class="hljs-string">'./getURL'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getPlatform</span>(<span class="hljs-params">data: <span class="hljs-built_in">any</span></span>): <span class="hljs-title">string</span> </span>{
    <span class="hljs-keyword">if</span> (!data) <span class="hljs-keyword">return</span> <span class="hljs-string">'Platform1'</span>;

    <span class="hljs-keyword">const</span> url = getURL(data);

    <span class="hljs-keyword">if</span> (data?.html) {
      <span class="hljs-keyword">const</span> regex = <span class="hljs-regexp">/^(?:https?:\/\/)?(?:www\.)?([^\/\n]+)\.(?:[a-zA-Z]{2,})/</span>;
      <span class="hljs-keyword">const</span> platform = url.match(regex);
      <span class="hljs-keyword">return</span> platform?.[<span class="hljs-number">1</span>].toUpperCase() || <span class="hljs-string">'Platform2'</span>; 
    }

    <span class="hljs-keyword">return</span> <span class="hljs-string">'Platform3'</span>;
  }
</code></pre>
<p>This function is meant to extract the name of the platform where the article is posted. I toyed with various ideas for how this should work. One of them was using the <code>siteName</code> property in the OG meta tags, but I realised from my inspection that not all platforms had it populated in a helpful way. So, the results gotten from that method would be too unpredictable.</p>
<p>So I decided to use <a target="_blank" href="https://www.freecodecamp.org/news/practical-regex-guide-with-real-life-examples/">regex (Regular Expressions)</a> to extract the site name from the URL. As you can see from the code, I didn't achieve a perfect result, but it is usable.</p>
<p>First of all, it gets the URL of the article with the <code>getURL()</code> function. Then, it uses regex:</p>
<pre><code class="lang-bash">/^(?:https?:\/\/)?(?:www\.)?([^\/\n]+)\.(?:[a-zA-Z]{2,})/
</code></pre>
<p>Here, <code>/</code> and <code>/</code> at the beginning and end are to start and end the regex string. The caret <code>^</code> marks the beginning of a line.</p>
<p>Then, we have four groups <code>()()()()</code>. The first one is a non-captured group <code>(?: )</code>. That means whatever text that matches that should be grouped together in a string, but should not be captured to be assigned to the variable. It captures any text with a 'http' in it, with or without the s <code>s?</code>, and with two slashes after. The forward slashes were escaped with backward slashes so they can be recognised as literal characters. Then, the whole group itself is made optional by adding the question mark after it <code>(...)?</code>. So, whether such a group is matched or not, the code works.</p>
<p>The second group is also a non-capturing group, also denoted by <code>?:</code> being the first thing inside the bracket. This one matches any 'www.' in the string. It's also optional. A URL may not necessarily be written with it.</p>
<p>The third group is a capturing group as it doesn't have <code>?:</code> inside the brackets. Rather, it has a character class in it <code>[]</code>. But it's a negated class <code>[^ ]</code>. It makes sure that the class does not contain a newline character <code>n</code> (the newline character n is not a string of letter n – that's why it is escaped) or a forward slash <code>/</code>, because a URL is supposed to be one line, and not multiple lines. The <code>+</code> means one or more characters, <code>([^\/\n]+)</code>. Whatever is in this group will get captured in the variable.</p>
<p>Then, the next one matches a dot (it is escaped with a backslash <code>\.</code>). After that is the last group which is also non-capturing and matches any character which is alphanumeric, capital or small letter <code>[a-zA-Z]</code>, that occurs more than two times <code>{2, }</code>.</p>
<p>So, if we have '<a target="_blank" href="https://www.linkedin,com'">https://www.linkedin,com'</a> we would have an array of captured groups ['<a target="_blank" href="https://www.linkedin.com','https://','www.','linkedin','com'%5D">https://www.linkedin.com','https://','www.','linkedin','com']</a>. Group 1 = 'https://', group 2 = 'www.', group 3 ='linkedin', group 4 = 'com'. But since only group 3 is a captured group, others will be discarded, and we have an array with only two items, the full string, and the captured group: ['<a target="_blank" href="https://www.linkedin.com','linkedin'%5D">https://www.linkedin.com','linkedin']</a><em>.</em></p>
<p>So, here, we return the second item in the array. The first item is always the full string we matched.</p>
<pre><code class="lang-typescript"><span class="hljs-keyword">return</span> platform?.[<span class="hljs-number">1</span>].toUpperCase()
</code></pre>
<p>This doesn't account for sub domains, though. This is tricky because sometimes you want to use the name of the subdomain (as in my Substack), and sometimes you want to use the name of the domain. So, I left it like that.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746947172558/7f0f47c0-a1d5-4db7-a8e5-d45d1116aaac.png" alt="Image of an article with platform showing THENETWORKBITS.SUBSTACK" class="image--center mx-auto" width="467" height="180" loading="lazy"></p>
<h4 id="heading-the-getimageurl-function"><strong>The</strong> <code>getImageURL()</code> <strong>function:</strong></h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> cheerio <span class="hljs-keyword">from</span> <span class="hljs-string">'cheerio'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getImageURL</span>(<span class="hljs-params">data: <span class="hljs-built_in">any</span></span>): <span class="hljs-title">string</span> </span>{
    <span class="hljs-keyword">if</span> (!data) <span class="hljs-keyword">return</span> <span class="hljs-string">'/img-2.jpg'</span>; 

    <span class="hljs-keyword">if</span> (data?.metadata || data?.html) {
        <span class="hljs-keyword">const</span> $ = cheerio.load(data?.html);
        <span class="hljs-keyword">const</span> ogImage = $(<span class="hljs-string">'meta[property="og:image"]'</span>).attr(<span class="hljs-string">'content'</span>) || data?.metadata.image;
        <span class="hljs-keyword">return</span> ogImage || <span class="hljs-string">'/img-2.jpg'</span>; 
    }

    <span class="hljs-keyword">return</span> <span class="hljs-string">'/img-2.jpg'</span>; 
}
</code></pre>
<p>This function works just like others, and obtains the cover image URL from either the Open Graph image meta tag <code>$('meta[property="og:image"]').attr('content')</code> or <code>||</code> the image property in the JSON-LD data <code>data?.metadata.image</code>.</p>
<h4 id="heading-the-getpublisheddate-function"><strong>The</strong> <code>getPublishedDate()</code> <strong>function:</strong></h4>
<pre><code class="lang-typescript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> cheerio <span class="hljs-keyword">from</span> <span class="hljs-string">'cheerio'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getPublishedDate</span>(<span class="hljs-params">data: <span class="hljs-built_in">any</span></span>): <span class="hljs-title">string</span> </span>{

  <span class="hljs-keyword">if</span> (!data) <span class="hljs-keyword">return</span> <span class="hljs-string">'Date'</span>;

  <span class="hljs-keyword">const</span> publishedDate = data?.metadata?.datePublished;

  <span class="hljs-keyword">if</span> (publishedDate) {
    <span class="hljs-keyword">const</span> options: <span class="hljs-built_in">Intl</span>.DateTimeFormatOptions = { year: <span class="hljs-string">'numeric'</span>, month: <span class="hljs-string">'long'</span>, day: <span class="hljs-string">'numeric'</span> };
    <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(publishedDate).toLocaleDateString(<span class="hljs-string">'en-US'</span>, options);
  }

  <span class="hljs-keyword">if</span> (data?.html) {
    <span class="hljs-keyword">const</span> $ = cheerio.load(data?.html);
    <span class="hljs-keyword">const</span> ogPublishedTime = $(<span class="hljs-string">'meta[property="article:published_time"]'</span>).attr(<span class="hljs-string">'content'</span>) ||
                            $(<span class="hljs-string">'meta[property="og:published_time"]'</span>).attr(<span class="hljs-string">'content'</span>) || 
                            $(<span class="hljs-string">'meta[name="pubdate"]'</span>).attr(<span class="hljs-string">'content'</span>);

    <span class="hljs-keyword">if</span> (ogPublishedTime) {
      <span class="hljs-keyword">const</span> options: <span class="hljs-built_in">Intl</span>.DateTimeFormatOptions = { year: <span class="hljs-string">'numeric'</span>, month: <span class="hljs-string">'long'</span>, day: <span class="hljs-string">'numeric'</span> };
      <span class="hljs-keyword">return</span> <span class="hljs-keyword">new</span> <span class="hljs-built_in">Date</span>(ogPublishedTime).toLocaleDateString(<span class="hljs-string">'en-US'</span>, options);
    }
  }
  <span class="hljs-keyword">return</span> <span class="hljs-string">'Date'</span>;
}
</code></pre>
<p>This function is especially useful because of the need to convert the date from the ISO 8601 format (2025-04-07T10:47:19+00:00) to the more readable format I want (April 7, 2025). Here, I used the <code>.toLocaleDateString()</code> JavaScript function to make it work (see the (<a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString">MDN</a>).</p>
<h3 id="heading-7-create-your-json-file">7. Create your JSON file</h3>
<p>Now, remember that we're building this to be able to pull URLs from a JSON file to put together and render the web page. That JSON file is the starting point of everything. I believe by now you're getting an error concerning that. So we need to create the JSON file.</p>
<p>In the <code>app/</code> directory, create a new file and name it <code>articles.json</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746947297567/ed6b282b-971e-428b-a7b6-9d6bf5e44520.png" alt="The app/ directory" class="image--center mx-auto" width="359" height="244" loading="lazy"></p>
<p>Then populate it like in this file below – an array of objects with id, URL, tags, and so on. Even though we are not trying to get the title, description, and everything from this file directly, I put in that feature. If you go back to our <code>fetchArticles()</code> function, you'll see that for most of the properties, whatever you write here will override what was gotten from the URLs.</p>
<p>It was partly a fail-safe because I thought that LinkedIn would block all requests, and as you can see from my blog already, some description tags were not well organized. So, we can replace them later with a cleaner description just by modifying this file.</p>
<pre><code class="lang-json">{
    <span class="hljs-attr">"articles"</span>: [
        {
            <span class="hljs-attr">"id"</span>: <span class="hljs-number">1</span>,
            <span class="hljs-attr">"url"</span>: <span class="hljs-string">"https://thenetworkbits.substack.com/p/an-overview-of-json"</span>,
            <span class="hljs-attr">"tags"</span>: [<span class="hljs-string">"Web Dev"</span>, <span class="hljs-string">"DevOps"</span>, <span class="hljs-string">"Cloud"</span>],
            <span class="hljs-attr">"title"</span>: <span class="hljs-string">""</span>,
            <span class="hljs-attr">"description"</span>: <span class="hljs-string">""</span>,
            <span class="hljs-attr">"image"</span>: <span class="hljs-string">""</span>
        },
        {
            <span class="hljs-attr">"id"</span>: <span class="hljs-number">2</span>,
            <span class="hljs-attr">"url"</span>: <span class="hljs-string">"https://websecuritylab.org/how-safe-is-public-wi-fi-a-network-engineer-explains/"</span>,
            <span class="hljs-attr">"tags"</span>: [<span class="hljs-string">"Networking"</span>, <span class="hljs-string">"Cybersecurity"</span>],
            <span class="hljs-attr">"title"</span>: <span class="hljs-string">""</span>,
            <span class="hljs-attr">"description"</span>: <span class="hljs-string">""</span>,
            <span class="hljs-attr">"image"</span>: <span class="hljs-string">""</span>
        },
        {
            <span class="hljs-attr">"id"</span>: <span class="hljs-number">3</span>,
            <span class="hljs-attr">"url"</span>: <span class="hljs-string">"https://www.freecodecamp.org/news/automate-cicd-with-github-actions-streamline-workflow/"</span>,
            <span class="hljs-attr">"tags"</span>: [<span class="hljs-string">"DevOps"</span>],
            <span class="hljs-attr">"title"</span>: <span class="hljs-string">""</span>,
            <span class="hljs-attr">"description"</span>: <span class="hljs-string">""</span>,
            <span class="hljs-attr">"image"</span>: <span class="hljs-string">""</span>
        }
    ]
}
</code></pre>
<p>Here, we have an "articles" object with an array of objects, each of which have "id", "url", "tags", "title", "description", and "image" properties. You don't necessarily need the values of all of these except the ID and URL, but the keys have to be there to prevent errors.</p>
<h3 id="heading-8-add-the-finishing-touches">8. Add the finishing touches</h3>
<p>Now you can add your own favicon in the app directory. It could be a 24px by 24px file, or 48px by 48px file. It doesn't necessarily have to be in the app directory or be an icon file or be named 'favicon' – but I did it that way. You can just add this in the HTML header of your layout.tsx file which is your Next.js version of <code>index.html</code>. The favicon is the icon that shows on the tab in your browser when you open the page.</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"icon"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"/favicon.ico"</span> <span class="hljs-attr">sizes</span>=<span class="hljs-string">"any"</span> /&gt;</span>
</code></pre>
<p>You can also read the Next.js documentations on that here: <a target="_blank" href="https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons">Metadata Files: favicon, icon, and apple-icon | Next.js</a>. Then add your images to your <code>public/</code> directory. Be sure to name them correctly, and reference them correctly.</p>
<p>Now, if your development server was down, spin it up again to see your end results!</p>
<pre><code class="lang-bash">npm run dev
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746947429494/1134babc-6b26-4f88-99df-7c3c8a2e8ba6.png" alt="The blog above the fold" class="image--center mx-auto" width="1360" height="599" loading="lazy"></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746947441422/5b87e888-a040-4ca1-bc27-7d09e50561ce.png" alt="Articles on the blog" class="image--center mx-auto" width="1364" height="597" loading="lazy"></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746947455924/64e57b54-feb9-46c9-99c9-8a7260aff45d.png" alt="About page" class="image--center mx-auto" width="1362" height="595" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>If you've read this far, then you must be really interested in seeing the results of all this :) I already have that covered. <a target="_blank" href="https://chidiadi-portfolio.vercel.app/">Here's the blog</a>. You can go through it and interact with it.</p>
<p>Also, <a target="_blank" href="https://github.com/chidiadi01/simple-writer-portfolio/tree/main/01-simple-blog">this is the codebase</a>. Feel free to fork it, clone it, and interact with it as well. If you enjoyed the article, please share it with others. You can also connect with me on <a target="_blank" href="https://linkedin.com/in/chidiadi-anyanwu">LinkedIn</a> or <a target="_blank" href="https://x.com/chidiadi01">X</a>. Thanks for reading.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Technical Writing for Developers – Why You Should Have a Blog and How to Start One ]]>
                </title>
                <description>
                    <![CDATA[ Having a blog is a useful asset for developers. It can be a lead magnet, as well as a place where you can sell digital products you create.  It can also simply be the place where you build a loyal audience within your niche, share your knowledge and ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/technical-writing-for-developers/</link>
                <guid isPermaLink="false">66c3755a86ad38fd9838388f</guid>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Ankur Tyagi ]]>
                </dc:creator>
                <pubDate>Mon, 23 Oct 2023 17:22:04 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/10/Orange---Yellow-Gradient-Make-Design-Blog-Banner--42-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Having a blog is a useful asset for developers. It can be a lead magnet, as well as a place where you can sell digital products you create. </p>
<p>It can also simply be the place where you build a loyal audience within your niche, share your knowledge and ideas, and help other devs.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697186764980/c8f8f03f-0f7d-4fa7-8fc6-9dd45b0a124b.png" alt="Blog- Ankur Tyagi" width="1920" height="1080" loading="lazy">
<em>The benefits of having a personal blog as a developer</em></p>
<p>In this article, I'll share why I blog, as well as why I think it's a great idea for you, too.</p>
<h2 id="heading-why-i-write-technical-articles">Why I Write Technical Articles</h2>
<p>Here's something I've learned over the past five years of blogging: don't start by telling the audience why you wrote a blog post. Instead, tell them why they should read it, and then do your best to prove yourself right.</p>
<p>I recently revamped my blog and began writing consistently, to the point where I now write a new tutorial once a week. And I’ve already seen a lot of good results.</p>
<p>I've also started paying more attention to my analytics. This helps me give people what they want, answer their questions, and keep them coming back for more. I'll talk a bit more about analytics later.</p>
<p>I found my mission in teaching developers about topics like how to start your own blog, how tools such as React, Angular, JavaScript, and TypeScript work, and so on. I release a new article every week on my blog <a target="_blank" href="https://theankurtyagi.com/blog/"><strong>theankurtyagi.com</strong></a><strong>,</strong> explaining all I know about a specific topic. </p>
<p>If you are into React or developing on the Web, you won't want to miss it. And I just started creating a new React writing boot camp where I share my 14 years of tech experience and how I've built multiple applications.</p>
<p>Now I'll share my thoughts on writing technical tutorials, and why I think you should have your own blog as a developer.</p>
<h2 id="heading-table-of-contents">Table of Contents:</h2>
<ul>
<li><a class="post-section-overview" href="#heading-understand-your-tech-abilities-and-soft-skills">Understand Your Tech Abilities and Soft Skills</a></li>
<li><a class="post-section-overview" href="#heading-doubts-you-may-have-before-starting-a-developer-blog">Doubts You May Have Before Starting a Developer Blog</a></li>
<li><a class="post-section-overview" href="#heading-how-to-start-writing-your-own-blog">How to Start Writing Your Own Blog</a></li>
<li><a class="post-section-overview" href="#heading-why-writing-is-helpful-for-developers">Why Writing is Helpful for Developers</a></li>
<li><a class="post-section-overview" href="#heading-how-writing-can-help-advance-your-software-engineering-career">How Writing Can Help Advance Your Software Engineering Career</a></li>
<li><a class="post-section-overview" href="#heading-how-to-write-an-effective-technical-blog">How to Write an Effective Technical Blog</a></li>
</ul>
<h2 id="heading-understand-your-tech-abilities-and-soft-skills">Understand Your Tech Abilities and Soft Skills</h2>
<p>If you’re working in tech, you can take advantage of the skills you already have and share your knowledge with the community. Do any of the following statements apply to you?</p>
<ul>
<li>You excelled at much of your past work, and you know that companies (or people) will pay for that work.</li>
<li>People ask you for advice based on your past work.</li>
<li>Somebody said, “You should write something or record a video to document your experiences because you offered me so much value when you mentored me or helped me in a peer programming session or saved me from that production bug while reviewing my PR pull request”</li>
</ul>
<p>The value you bring to your audience comes from a combination of your perspective and your interpersonal skills.</p>
<p>Think back to what other people have asked you to do, or what you've volunteered to do in your career—because you're good at those activities. </p>
<p>But don’t stop with technical skills. While core technical skills are useful, they are not all you'll need for long-term success as you move up in your tech career. That’s because the more responsibility you take for your client’s growth and results, the more the more helpful you can be to other people’s work. And this often starts with communication skills – so don't neglect them.</p>
<h2 id="heading-doubts-you-may-have-before-starting-a-developer-blog">Doubts You May Have Before Starting a Developer Blog</h2>
<h3 id="heading-i-am-not-an-expert-writer">I am not an expert writer</h3>
<p>Every developer has a unique angle and a perspective on something worth sharing.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1607633576714977280"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>You may believe you don't know as much as senior developer X, but junior developer Y may have much less experience and would benefit from reading about your career journey and learnings. </p>
<p>Also, the best time to teach something is right after you've learned it because you remember how it feels when you didn't know it – so you can more effectively teach a beginner about it.</p>
<p>In this case, you can write for a student who has recently learned something new. Every day, I learn something new.</p>
<p>Approximately 80% of what I end up writing these days is something I discovered while researching a topic on the internet.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1698668505292300461"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<h3 id="heading-im-just-a-good-enough-writer">I’m just a good enough writer</h3>
<p>I'm not a professional writer, but that doesn't bother me. Remember that you will never become a better writer unless you write every day for years. If you practice enough, and actively try to improve your writing, you'll eventually improve your writing skills.</p>
<p>To create something good, just start writing. To create something exceptional, write, revise, and revise again. The key to producing excellent writing lies in dedicating significant time and effort to the rewriting process.</p>
<h3 id="heading-all-developers-fear-criticism">All Developers Fear Criticism</h3>
<p>Some things are fragile and break with a sudden shock, like a water glass.</p>
<p>Some things are not fragile and remain intact even when faced with a sudden impact or shock, like a teddy bear.</p>
<p>And some things, like our immune system, are anti-fragile, meaning they improve when subjected to a shock. Your immune system does not develop properly if you are not exposed to a series of smaller shocks as a child.</p>
<p>Similarly, to become a better developer in tech as a result of criticism, you must develop an anti-fragile attitude towards criticism. That is, with every bit of critique you receive, you can learn to use it to become better.</p>
<p>If you do not learn this, you will remain at your current level. You can do this at the meta-level as well: become anti-fragile in dealing with criticism in general, and become a better human being as a result of it.</p>
<p>Empowering self-hacking starts with cultivating a heightened awareness of your own emotional state. Recognizing anger, for instance, weakens its hold on you. When angry, you may engage in actions you otherwise wouldn't. (Anger can sometimes serve as a signal that our boundaries have been crossed.)</p>
<p>Certain online platforms, like Reddit and Hacker News, are known for their unfiltered feedback. Embrace this as an opportunity for growth. Remember, you only truly evolve when faced with challenges. </p>
<p>You also have the choice not to engage if you prefer. Concerned about potential negative comments on a controversial post? You can always disable comments altogether.</p>
<p>Also, remember that not everyone gives valuable criticism in tech.</p>
<ul>
<li>Some people just don’t connect with your work.</li>
<li>Some people won’t like what you’re writing.</li>
<li>Some people aren't yet ready to critique your work.</li>
<li>Some people are just mean.</li>
<li>Some people like your style of writing. Others won't.</li>
</ul>
<p>And sometimes when people stare at screens all day, like those of us in tech, they can unwittingly be more harsh and direct. It's not a great way to communicate, but it might not be malicious.</p>
<p>If you can get past the sting of the critiques and use them to improve your writing, you'll have a lot to offer the developer community through your tutorials.</p>
<h2 id="heading-how-to-start-writing-your-own-blog">How to Start Writing Your Own Blog</h2>
<p>Rich people might seem to have it all  – money, power, influence, and whatever else they crave. But there’s one thing they want that money can’t buy: good ideas.</p>
<p>Writing is how you share your ideas, and if you do it well, you can often gain access to a coffee or dinner with almost any tech CEO in software engineering.</p>
<p>I've been writing for around 5 years, so here's my take:</p>
<ul>
<li><strong>Just start writing</strong>: If you've been wanting to start your own blog, stop thinking about it, and just do it. Open a blog on WordPress and start writing. That's my first advice to anyone. Don't waste time on the technicalities, just write. You can move your blog to another platform later.</li>
<li><strong>Be consistent</strong>: This is hard. I fail to follow this rule most of the time. But a successful blog is a blog that's been going on for ages, and where the creator posts regularly. I've posted 100+ posts since 2020 on my blog and 100+ for various startup developer tools – and that's why it has been working well for me.</li>
<li><strong>Don't try to be perfect</strong>: You are not writing a book. A blog is to share knowledge quickly or to share what's on your mind. No hesitation, once you have something, publish it. People might call you out for saying something wrong, fine – that's free publicity and you'll have learned something new.</li>
<li><strong>Mix short posts with long posts</strong>: It's difficult to keep writing high-quality content and long blog posts all the time. So write small ones from time to time to fill in between more in-depth guides. This is what makes people keep going to your blog. It's like a Twitter feed, it needs to have something every time people check it.</li>
<li><strong>Write on current/popular subjects</strong>: What did you learn recently that could be helpful to other people? What did you have trouble learning because there was no good resource on the subject? You could be that resource. What is Google Trends saying? Are there any trendy topics in your field? What are people talking about recently?</li>
</ul>
<p>I generally start with an idea instead of a title. Then I write down what I know about it. Next, I put those thoughts in an order that I can use to tell a story. Finally, I research to confirm that what I think I know is indeed true and correct. That is where it becomes interesting.</p>
<p>Sometimes I'm completely wrong, and the story becomes about that. The truth is often more interesting than the assumptions. </p>
<p>Sometimes I discover things about what I knew that are more interesting than the original idea. Sometimes what I thought I knew turns out to be true and I just back it up with facts and the idea alone was interesting enough to begin with. </p>
<p>And lastly, sometimes the idea is actually not worth sharing, and I shelve it until the time feels right or I find a new approach to the subject.</p>
<h2 id="heading-why-writing-is-helpful-for-developers">Why Writing is Helpful for Developers</h2>
<h3 id="heading-you-learn-much-faster">You learn much faster</h3>
<p>Writing is a great skill for a developer for many reasons, including:</p>
<ul>
<li>You learn by doing.</li>
<li>You learn faster.</li>
<li>You build a lot of connections which can generate future leads and opportunities.</li>
<li>You can work on different tech stacks</li>
<li>It’s a great form of self-expression.</li>
<li>It encourages creativity.</li>
<li>It helps to connect with your imagination.</li>
</ul>
<p>I enjoy writing because it forces me to read more. And as a result, I learn a lot and stay sharp while working and collaborating with others. </p>
<p>One of the best ways for me to learn is by doing. I pick a topic about which I believe I know something and drill down through things I didn't know or hadn't even considered.</p>
<p>My best tip for anyone willing to start a blog: Read, read, read, write, write, write, read, read, write, write, write, write, read, read, read, read, write, write, write, edit, edit, edit, edit, edit, edit, edit, read, read, read, write again.</p>
<p>They say you never fully understand a topic until you can explain it.</p>
<p><strong>And blogging is often low-hanging fruit.</strong></p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1596975332791578624"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>Every developer should make a habit of blogging about their learnings in software engineering. Writing helps you discover if you understand a topic as well as you think you do. </p>
<p>Teaching and writing are great ways to learn, and they're good habits to start because you already have firsthand experience. Just commit to writing 12 blog posts a year, see what happens, and plan your next steps based on that. </p>
<blockquote>
<p><em>As David Perell says, “Read to collect the dots, write to connect them.”</em></p>
</blockquote>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697184338558/b8bd0707-6b86-4b75-9f04-736dc1ad853d.png" alt="Why Writing is a Low Hanging Fruit" width="1918" height="1048" loading="lazy">
<em>How writing is a low hanging fruit for experienced developers</em></p>
<h3 id="heading-writing-involves-critical-thinking">Writing involves critical thinking</h3>
<p>So many things never fully connected for me until I wrote about them. And so many other things I thought I understood well in my head turned out to be half-baked when I start writing about them.</p>
<p>My blog "<a target="_blank" href="https://theankurtyagi.com/a-software-developers-guide-to-writing/">A Software Developer's Guide to Writing</a>" is a complete guide on how to start a blog.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/GergelyOrosz/status/1604959976870629385"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>Writing is a form of self-expression that can be therapeutic, even if you never intend to publish your work.</p>
<h2 id="heading-how-writing-can-help-advance-your-software-engineering-career">How Writing Can Help Advance Your Software Engineering Career</h2>
<p>I’ve elevated my career in software engineering thanks to my writing.</p>
<p>It was 2017, and I'd begun writing about small things I was learning while building a few web applications for fun as a side project. I'd also gotten the opportunity to contribute to internal developer docs in my previous job as a tech lead.</p>
<p>That old blog has since died — I stopped writing on it a long time ago, and the content, which is now completely obsolete, has vanished. But I doubt I could have imagined starting my current small writing business without it.</p>
<p>Through my current blog, I have a lot of connections and opportunities for freelance gigs and part-time roles. It's also helped me in my consulting career.</p>
<h3 id="heading-writing-tutorials-can-help-you-learn-a-new-tech-stack">Writing tutorials can help you learn a new tech stack</h3>
<p>Writing helps in learning a new technology stack this is something I've done a few times with my writing. If I am interested in one type of technology stack and then become interested in another, I will write several posts about it.</p>
<p>For example, last summer I wrote about multiple developer tools in this article: <a target="_blank" href="https://theankurtyagi.com/how-i-use-medusa-to-create-a-powerful-next-js-e-commerce-store/"><strong>How to Create a Powerful Next.js E-commerce Store</strong></a><strong>.</strong></p>
<p><img src="https://theankurtyagi.com/wp-content/uploads/2023/04/Clean-Work-Place-Blog-Banner-34-2048x1152-1-1024x576.png" alt="medusa-nextJs-e-commerce-store" width="600" height="400" loading="lazy">
<em>How to build an e-commerce store with Medusa a blog by Ankur Tyagi</em></p>
<h3 id="heading-other-benefits-of-technical-writing">Other benefits of technical writing</h3>
<p>Writing about technical topics is a great way for you to show what you know and what you're able to do. It can also help build your authority in tech by establishing your reputation and building your personal brand.</p>
<p>It can also improve your opportunities for networking and career advancement, as more people read your tutorials. And the more you write, the better your communication and collaboration skills will become.</p>
<p>Another benefit I discovered from sharing my writing publicly is that it caught the attention of many company founders, who then offered me writing jobs. They found me through my blog posts online, even though I hadn’t applied to work with them. Take a look at the below inbound cold email I received. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697188149814/1087eecc-fc19-410a-9b76-f6f7a79a4e4d.png" alt="cold email " width="2060" height="814" loading="lazy">
<em>An inbound cold email from a tech founder</em></p>
<p>So having a blog is an effective way to demonstrate that you are passionate, know your stuff, and can communicate effectively in writing. The simplest way to begin is to write posts about topics that have interested you or problems you've solved.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1698932253613580739"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<h2 id="heading-how-to-write-an-effective-technical-blog">How to Write an Effective Technical Blog</h2>
<h3 id="heading-keep-your-topics-consistent">Keep your topics consistent</h3>
<p>I only follow blogs that have a clear focus or theme.</p>
<p>In my case, I talk about Web Development, React, Developer Tools, and so on, and I subscribe and consistently read other developers' blogs that are focused on a particular area of tech.</p>
<p>Don't just rant about anything that comes to mind. Use a professional tone and cultivate your own unique writing style.</p>
<h3 id="heading-setup-a-routine">Setup a routine</h3>
<p>If you aim to write a blog post weekly, make sure you follow through. Writing two posts a week is even more ideal. I write every day because I know that if I skip one day, I will skip another, and so on until I stop posting altogether.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1701843420342268367"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<h3 id="heading-write-blog-posts-in-advance">Write blog posts in advance</h3>
<p>Don't post the same day you write. Instead, schedule your content for a week later and review it the day before.</p>
<p>This is a big deal. By waiting a week before you post and looking at it again, the quality of your content will improve. A lot!</p>
<p>Write it a week or more in advance. Even if you take a few days off or are sick, you are less likely to miss a blog post day. It's also a good idea to make your posts public ahead of time. <a target="_blank" href="https://theankurtyagi.com/">WordPress</a> makes it very simple, and it is also possible to schedule a specific time and day to write on a consistent basis.</p>
<p>If you write down 5 ideas per day, that will amount to 1,825 ideas in a year (assuming it's not a leap year). Among these ideas, you're likely to find a few outstanding topics for your blog posts. Try to maintain a roster of potential blog post ideas. When inspiration strikes, you'll find the perfect topic for that day in your backlog.</p>
<p>In your articles, take things a step further and make your content 10x better by telling your audience the "why" of things. This is much harder to do.</p>
<p>If your writing is poor quality or inconsistent, you'll end up with the wrong audience. Write with intention and purpose. Write to become better. Instead of writing more, start editing more.</p>
<h3 id="heading-build-your-writing-not-your-website">Build your writing, not your website</h3>
<p>You can use big blogging platforms to increase your visibility. Think long-term. In the next ten years, every blog post you write could be worth thousands of views.</p>
<p>When a developer comes to me and says, "Hi Ankur, I'm a developer and want to start a blog. What should I do?", here are the two options I discuss with them:</p>
<h4 id="heading-option-1-start-publishing-your-articles-on-an-established-blogging-platform">Option 1: start publishing your articles on an established blogging platform</h4>
<p>Option one is starting with a platform like <a target="_blank" href="https://theankurtyagi.com/top-5-best-blogging-platforms-for-software-engineers-in-2023/">Medium, Hashnode, DevTo, HackerNoon, or Dzone</a>.</p>
<p>You can start writing articles and publishing them on one of thoes platforms, and work on building your credibility as a writer. Set a goal for yourself – for example, try to get to 100K+ post views/year.</p>
<p>Then you can start learning about and implementing SEO strategies, especially if you start writing on your own blog.</p>
<p><strong>One potential challenge</strong> with this approach is that you may not technically own the content you publish on other's sites (check their rules). The company could even go out of business or shut down their service, and you may lose all your articles. </p>
<p>So here's my advice on how to handle this: if you stick with writing for a year, then it's time to start moving slowly onto your own website and posting your articles there.</p>
<p><strong>Another challenge</strong> is that you don't necessarily want to spend all your time building a personal blog and just have one post titled "How I made this beautiful blog with X framework" to show for it. Instead, you could've had dozens of blog posts on rented spaces (like Medium, Hashnode, DevTo). Build your brand before building a house.</p>
<p>You can treat Medium, Hashnode, Twitter, and other platforms as traffic-acquisition channels rather than a home for your long-form content. Because no moderator can delete your blog posts from your own website.</p>
<h4 id="heading-option-2-create-your-own-blog-site-from-scratch">Option 2: create your own blog site from scratch</h4>
<p>Option two involves starting with your own blog website from the beginning. You can either build your own or use something like Ghost/WordPress/ any CMS of your choice. Then you can syndicate your articles to existing blogging platforms until enough people learn about your own blog. After that, you can stop syndicating content if you want.</p>
<p>But I'd advise you to write 2-3 blog posts every month for a year before you even think about building your own fancy, tech-savvy website and publishing there.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1662847806841683973"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>Treat every blog post as a mini side project and see how it feels. If, after a year, you find you're still enjoying writing, then continue doing it. If not, blogging may not be for you.</p>
<p><strong>One challenge</strong> with this second approach (building your own blog and starting there) is that many developers with full-time jobs find it hard to spare time and energy, even though they want to write. So I think it's better to start small – and maybe share your posts on an existing platform at first – to avoid this common pitfall. </p>
<p>Again, it's better to focus on building your personal brand and your reputation as a writer first, before investing time in creating a dedicated website.</p>
<p>While it can be harder to reach a large audience on your own personal blog, you have to start somewhere. </p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1677250760575270912"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p><strong>Another challenge</strong> with this approach is the tendency to over-engineer a simple static blog website, and spending too much time perfecting that site instead of writing. </p>
<p>When I was starting a blog, I actually got caught up in it all – but one of my friends guided me through the process and showed me WordPress, which was a lifesaver. In the case of your blog, people are often interested more in your storytelling than your actual blog website.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1522462918062788611"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>In my opinion, in the end, being the <a target="_blank" href="https://www.hanselman.com/blog/your-words-are-wasted">owner of your own blog space &gt;&gt;&gt; always using rental space</a>. Just make sure you prioritize your tasks and focus along the way.</p>
<p>If you're curious about my blog post writing style, I invite you to check out this post: <a target="_blank" href="https://theankurtyagi.com/the-ultimate-guide-for-developers-to-write-blog-posts-for-success-in-2023/">How I Write My Blog Posts</a>.</p>
<h3 id="heading-building-an-audience">Building an audience</h3>
<p>This is related to the previous point. If you're just getting started, you might get 1 or 10 or 100 visitors per week if you share your posts (unless you go viral on a sharing platform like Reddit, Hacker News, or Twitter).</p>
<p>Search engines like <em>Google</em> can often provide consistent traffic (SEO), but this is a very long game to play. It's easy to get discouraged if you write but no one reads your blog posts.</p>
<p>The initial years of writing can be tough and boring. Despite very good writing, your blog will likely grow slowly. Big views may seem to be a distant dream. The effects of writing kick off only after a certain amount of time when your blog may start to build up momentum. Patience and persistence are key.</p>
<p>So, actively look for an audience. Write on your blog and republish your blog posts to Medium, Hashnode, DevTo, and Hackernoon (remember to add a canonical tag back to your site so that you don't annoy Google with duplicate content). Having an audience will boost your enthusiasm and determination.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1673935217021669377?s=20"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<h3 id="heading-promote-your-content">Promote your content</h3>
<p>When you hit the “publish,” button you’ve only done 50% of the work.</p>
<ul>
<li>You had an idea</li>
<li>You’ve done writing along with researching the topic</li>
<li>You’ve looked for typos and fixed grammar errors</li>
<li>You made sure to have no plagiarism</li>
</ul>
<p>Now it's time to promote your writing.</p>
<p>Post on Twitter/LinkedIn if you have a following, otherwise try to share on HN, Reddit, and so on.</p>
<p>Here's what Arnold Schwarzenegger said about why marketing your product is equally as important as making the product:</p>
<blockquote>
<p>Whenever I finished filming a movie, I felt my job was only half done. Every film had to be nurtured in the marketplace. You can have the greatest movie in the world, but if you don’t get it out there, if people don’t know about it, you have nothing. It’s the same with poetry, with painting, with writing, with inventions.  </p>
<p>It always blew my mind that some of the greatest artists, from Michelangelo to van Gogh, never sold much because they didn’t know how. They had to rely on some schmuck (some agent or manager or gallery owner) to do it for them. Picasso would go into a restaurant and do a drawing or paint a plate for a meal. Now you go to these restaurants in Madrid, and the Picassos are hanging on the walls, worth millions of dollars.  </p>
<p>That wasn’t going to happen to my movies.  </p>
<p>Same with bodybuilding, same with politics—no matter what I did in life, I was aware that you had to sell it.</p>
</blockquote>
<p>As Ted Turner said, “Early to bed, early to rise, work like hell, and advertise.”</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/tferriss/status/1709560867568709719"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>In a similar way, whenever I finished writing a blog, I felt my job was half done.</p>
<p>I wanted every article to be distributed across multiple platforms. You can write the best blog in the world, but if you don't get it out there and people aren't aware of it, you're out of luck. It's the same with a book, a course, a community, a product, a startup, and your writing.</p>
<blockquote>
<p><strong>Marketing boils down to caring</strong>: Don’t confuse the word “marketing” with advertising, announcing, spamming, or giving away branded crap. Really, “marketing” just means being considerate. Marketing means making it easy for people to notice you, relate to you, remember you, and tell their friends about you.  –Derek Sivers | <a target="_blank" href="https://twitter.com/sivers">@sivers</a></p>
</blockquote>
<h3 id="heading-your-blog-is-your-media-platform">Your blog is your media platform</h3>
<p>Don’t just think of it as a blog. See it as a startup: the goal of a blog is to disseminate information that drives sales and future opportunities.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/peer_rich/status/1712777165098398127"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>Sales may make you uncomfortable, but think of it as selling ideas or your own expertise.</p>
<h3 id="heading-set-up-an-email-collecting-form-or-a-newsletter">Set up an email collecting form or a newsletter</h3>
<p>A big Social media following is a business card, but a big email list gives you longevity.</p>
<p>In reality, you don't have full ownership of your Twitter, LinkedIn, or Medium following. Your true ownership lies in your email list. I recommend <a target="_blank" href="https://theankurtyagi.substack.com">SubStack</a>; it's user-friendly, free, and exceptional.</p>
<h3 id="heading-a-blog-should-be-professional-not-personal">A blog should be professional, not personal</h3>
<p>Your audience isn't primarily interested in you. They visit your blog in anticipation of problem-solving (if they arrived from a Google search) or seeking valuable information to aid them in specific tasks. Write with their needs at the forefront to be truly helpful.</p>
<h3 id="heading-dont-use-ads-at-the-beginning">Don't use ads at the beginning</h3>
<p>Don’t put ads on your blog. I don't think it's worth it unless you have 10,000+ visitors a day.</p>
<h3 id="heading-watch-your-analytics-and-use-them-to-guide-you">Watch your analytics and use them to guide you</h3>
<p>Peter Drucker said, "You can't manage what you can't measure."</p>
<p>If building an audience was a piece of cake, everyone would do it. Here are my tips on how to use your analytics to improve your blog and the content you create:</p>
<p><strong>Find Out What People Like to Read:</strong> Look at the pages that get the most visits. What are they about? This is what your audience loves the most. Write more about those topics.</p>
<p><strong>Understand How People Find You on Internet:</strong> Examine the search terms that lead people to your site. This tells you what they're interested in and what questions they have. Answer those questions in your writing.</p>
<p><strong>Know What Keeps Them Reading:</strong> See which pages keep people on your site the longest. This is the content that really grabs them. Use that style or topic as a model for your other posts.</p>
<p><strong>Learn From the Bounces:</strong> On the flip side, see which pages have the highest bounce rate. These are the ones that might need a bit of tweaking. </p>
<p><em>Ask yourself, "Why are people leaving?</em>" and then make changes accordingly.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2023/10/image-97.png" alt="My blog's analytics" width="600" height="400" loading="lazy">
<em>My blog's analytics</em></p>
<h3 id="heading-read-books-blog-posts-twitter-reddit-and-hackernews">Read books, Blog posts, Twitter, Reddit, and HackerNews</h3>
<p>Keep yourself up to date on the topics you want to write about. I write about software engineering, and Twitter is a never-ending source of topic ideas. The same is true for books and blogs. freeCodeCamp is also fantastic for this.</p>
<p>Every day, I spend 1-2 hours scrolling Twitter for inspiration. It's not a waste of time. It's the catalyst my brain requires to see things I would never have seen in offline life. Luck is not as random as you think. Before a lottery ticket can win a jackpot, someone has to buy it.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697189511612/83db750b-f21a-4bf8-aeba-921db9c50ce5.jpeg" alt="Twitter- an idea generator " width="944" height="1600" loading="lazy">
<em>My daily screen time</em></p>
<h3 id="heading-wake-up-early-if-possible">Wake up early if possible</h3>
<p>Set your alarm clock, get up, and begin writing. I used to get up at 7 a.m. because I haven't had to commute since 2020 (I only work remotely), so I could take it easy. I now get up at 5 a.m. and have a new post scheduled for the following week by 7 a.m. </p>
<p>When you finish a task, such as writing a new blog post, by 7 a.m., you feel energised to tackle the rest of the day. If you can, get up even earlier (I can't, or I'll spend the rest of the day in a zombie state).</p>
<h3 id="heading-start-using-dnd-dont-disturb-mode">Start using DND (Don't Disturb) Mode</h3>
<p>It's all too easy to become distracted while researching for a blog post on the internet. I've turned off all notifications on my phone. Writing, like programming, is best done without interruptions so that the task at hand can occupy your entire consciousness.</p>
<p>My advice is to set aside dedicated time on your calendar, disable notifications, set your phone aside, and commit to your keyboard or typewriter, pen and paper, or whatever.</p>
<p>These are the only notifications which are "ON" on my mobile:</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/TheAnkurTyagi/status/1636793854140481562"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p>### </p>
<h2 id="heading-thanks-for-reading"><strong>Thanks for Reading!</strong></h2>
<p>That's it for this tutorial. I hope you learned something new today.</p>
<p>If you did, please share so that it reaches others as well.</p>
<p>You can connect with me on <a target="_blank" href="https://twitter.com/TheAnkurTyagi">Twitter</a>.</p>
<h3 id="heading-want-to-read-more-interesting-blog-posts"><strong>Want to read more interesting blog posts?</strong></h3>
<p>You can read more tutorials like this one <a target="_blank" href="https://theankurtyagi.com/blog/">on my personal blog here</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Backup Your Hashnode Articles to GitHub ]]>
                </title>
                <description>
                    <![CDATA[ Many developers have a personal blog on Hashnode, one of the most popular blogging communities for people exploring tech.  I also write on Hashnode, but recently I was thinking about whether there is any way to backup my published articles to GitHub.... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-backup-hashnode-articles-to-github/</link>
                <guid isPermaLink="false">66b902c15730a049b6bfea78</guid>
                
                    <category>
                        <![CDATA[ Backup ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Md. Fahim Bin Amin ]]>
                </dc:creator>
                <pubDate>Mon, 16 May 2022 15:21:57 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/05/gradient-color-Modern-Music-Playlist-YouTube-Thumbnail.gif" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Many developers have a personal blog on <a target="_blank" href="https://hashnode.com/">Hashnode</a>, one of the most popular blogging communities for people exploring tech. </p>
<p>I also write on Hashnode, but recently I was thinking about whether there is any way to backup my published articles to GitHub. Fortunately, I have found an easy way to do that directly from Hashnode itself.</p>
<p>So, in this article, I will share the process so that you can also create an automatic backup of your articles to your GitHub repository. There's no harm in trying something new, right? 😊</p>
<p>✨ I have also created a full length video showing the process of creating that automatic backup to your GitHub repo. I have attached the video later in this article. You can also check that out.</p>
<p>Firstly, let me show you my Hashnode account. This is just a sample of a typical profile there.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_00_31_58.Still002.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>I have published only one article (as of today, 15 May 2022). But I still want to create an automatic backup process for this account so that whenever I write something new, all of the articles get copied into my selected GitHub repository as a backup.</p>
<p>So let's do that, shall we? 😁</p>
<h3 id="heading-how-to-backup-your-hashnode-articles-to-github">How to Backup Your Hashnode Articles to GitHub</h3>
<p>Go to your GitHub account. We need to create a special repository first where we will create an automatic backup process.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/Screenshot-2022-05-15-093838.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now simply click on the <code>+</code> button on the top right of the webpage.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_01_54_29.Still004.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now click <strong>New repository</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_02_00_23.Still005-1.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now we have to create a new repository. The process is similar to creating any other repository.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_02_03_28.Still006.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can make the repository Public or Private as you see fit for yourself. I am making it a Private repository, but you do not have to do that if you don't want to.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_02_41_42.Still008.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Give the repository any name you want.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_02_57_02.Still009.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>For the latter, you can select anything you want. For this article, I am keeping it simple as it was.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_03_18_19.Still010.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Then click <strong>Create repository</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_03_37_16.Still011.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>After that, you actually do not need to do anything in that repository for now.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_03_41_19.Still012.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>So, I am keeping it as it is right now.</p>
<p>Now, head over to your Hashnode account. </p>
<p>Click your profile icon on the top right of the profile page.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_03_46_36.Still013.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Select the blog you want to backup. For me, it is <a target="_blank" href="https://fahimbinamin.hashnode.dev/">https://fahimbinamin.hashnode.dev/</a>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_03_47_50.Still014.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Click Blog Dashboard.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_03_53_36.Still015.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The blog dashboard will appear before you.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_03_58_22.Still016.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Simply scroll down until you find Backup. You will find that on the lower left side of the webpage. Click on that.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_04_12_46.Still017.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You will find the GitHub Backup page now. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_05_03_47.Still020.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Click on Back up all my posts.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_05_03_47.Still020-1.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Select where you want to install it.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_05_06_45.Still021.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>As I am involved in 5 GitHub organizations right now, it's suggesting all of them to me. As I want to create the backup on my personal GitHub account, I will select my profile <strong>FahimFBA</strong>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_05_33_05.Still022.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The install and authorize section will appear.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_05_44_25.Still023.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>By default, it will select "All repositories". <strong>But keep in mind, that you shouldn't select All repositories, as that will rewrite all of the repositories you currently have in your personal GitHub account.</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_05_50_45.Still024.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Select "Only select repositories", and find the repository which you have created for backing up your Hashnode blogs.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_06_14_16.Still025.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Simply click and select the repository.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_06_19_37.Still026.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If everything is okay, then you can click "Install &amp; Authorize", <strong>but again</strong> <strong>keep in mind that you must not select All repositories.</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_06_39_58.Still029.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Provide your GitHub account's password if it asks for that.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_06_42_26.Still030.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If will redirect you to Hashnode to continue the installation process.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_06_47_38.Still031.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You've now created your automatic backup. If you want to back up the existing posts, then you have to click "Back up all my posts".</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_07_31_47.Still032.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>It will backup every post you had before creating the automatic backup.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_07_33_09.Still033.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_07_38_56.Still034.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Now, if you simply refresh the GitHub repo webpage (the repo you created only for backing up this Hashnode blog), you will see that it has been updated as well!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_07_59_50.Still036.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>You can even read the article directly from your backed up repo.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/05/2022-04-28-13-42-26.00_08_02_00.Still037.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>That's it! </p>
<p>If you want to watch a video that covers the whole process, then you can check out the following video that I made:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/a2PZPR9ul6c" 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-conclusion">Conclusion</h2>
<p>Thanks for reading the entire article. If it helps you then you can also check out other articles of mine at <a target="_blank" href="https://www.freecodecamp.org/news/author/fahimbinamin/">freeCodeCamp</a>.</p>
<p>If you want to get in touch with me, then you can do so using <a target="_blank" href="https://twitter.com/Fahim_FBA">Twitter</a>, <a target="_blank" href="https://www.linkedin.com/in/fahimfba/">LinkedIn</a>, and <a target="_blank" href="https://github.com/FahimFBA">GitHub</a>. </p>
<p>You can also <a target="_blank" href="https://www.youtube.com/@FahimAmin?sub_confirmation=1">SUBSCRIBE to my YouTube channel</a> (Code With FahimFBA) if you want to learn various kinds of programming languages with a lot of practical examples regularly.</p>
<p>If you want to check out my highlights, then you can do so at my <a target="_blank" href="https://www.polywork.com/fahimbinamin">Polywork timeline</a>.</p>
<p>You can also <a target="_blank" href="https://fahimbinamin.com/">visit my website</a> to learn more about me and what I'm working on.</p>
<p>Thanks a bunch!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Get Headings and IDs for Your freeCodeCamp Blog Post Table of Contents ]]>
                </title>
                <description>
                    <![CDATA[ By Scott Spence In this post we're going to get all the headings from a freeCodeCamp blog post to make a Table of Contents (ToC) in Ghost CMS. I recently published quite a large post here on freeCodeCamp and needed to add a table of contents to the p... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-get-headings-and-ids-for-your-freecodecamp-blog-posts/</link>
                <guid isPermaLink="false">66d8522a981549ab9e803f07</guid>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 07 Jan 2022 21:31:15 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/01/brett-jordan-M9NVqELEtHU-unsplash-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Scott Spence</p>
<p>In this post we're going to get all the headings from a freeCodeCamp blog post to make a Table of Contents (ToC) in Ghost CMS.</p>
<p>I recently published <a target="_blank" href="https://www.freecodecamp.org/news/build-your-developer-portfolio-from-scratch-with-sveltekit-and-graphcms/">quite a large post</a> here on freeCodeCamp and needed to add a table of contents to the post.</p>
<p>There's a really good supporting post written by Colby Fayock on how to do this. It details the process really clearly.</p>
<p>You can check out the video and really comprehensive guide on that for all the details: </p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.freecodecamp.org/news/how-to-add-a-table-of-contents-to-your-blog-post-or-article/">https://www.freecodecamp.org/news/how-to-add-a-table-of-contents-to-your-blog-post-or-article/</a></div>
<p>Colby's post details why you would want a Table of Contents (ToC) and how to create one using the Ghost editor (the editor used for writing this post in the Ghost CMS).</p>
<p>The thing is, I had 33 headings in the post I needed to add links for. And the thought of scrolling through a 10,000 word document to get a heading then scroll to the top to add it to the table of contents made me wonder if there was a better way to do it!</p>
<h3 id="heading-table-of-contents">Table of contents:</h3>
<ul>
<li><a class="post-section-overview" href="#heading-javascript-to-the-rescue">JavaScript to the rescue!</a></li>
<li><a class="post-section-overview" href="#heading-get-the-element-properties">Get the element properties</a></li>
<li><a class="post-section-overview" href="#heading-get-the-element-id-and-innertext">Get the element id and <code>innerText</code></a></li>
<li><a class="post-section-overview" href="#heading-filter-on-the-localname">Filter on the <code>localName</code></a></li>
<li><a class="post-section-overview" href="#heading-conclusion">Conclusion</a></li>
</ul>
<h2 id="heading-javascript-to-the-rescue">JavaScript to the rescue!</h2>
<p>With this thought in mind I did a quick search and found a <a target="_blank" href="https://stackoverflow.com/a/7115083/1138354">Stack Overflow</a> answer that I could use. Here's the snippet:</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> ids = <span class="hljs-built_in">document</span>.querySelectorAll(<span class="hljs-string">'[id]'</span>);

<span class="hljs-built_in">Array</span>.prototype.forEach.call( ids, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"> el, i </span>) </span>{
  <span class="hljs-comment">// "el" is your element</span>
  <span class="hljs-built_in">console</span>.log( el.id ); <span class="hljs-comment">// log the ID</span>
});
</code></pre>
<p>So, let's hop on over to the browser now and try that out.</p>
<p>I'll go over to that published post now in the browser and open the developer tools. (In Chrome and Edge it's F12 to open the dev tools.) Then I'll paste in that example code into the console and hit enter, here's the output:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-42.png" alt="The browser window with the dev tools open and the code snippet run showing all the element ids on the page" width="600" height="400" loading="lazy"></p>
<h2 id="heading-get-the-element-properties">Get the element properties</h2>
<p>Not bad but I want the heading title as well, so one quick way to see the properties of the elements is to wrap the <code>el</code> in some curly braces:</p>
<pre><code class="lang-js"><span class="hljs-keyword">let</span> ids = <span class="hljs-built_in">document</span>.querySelectorAll(<span class="hljs-string">'[id]'</span>);

<span class="hljs-built_in">Array</span>.prototype.forEach.call(ids, <span class="hljs-function">(<span class="hljs-params">el</span>) =&gt;</span> {
  <span class="hljs-built_in">console</span>.log({el});
});
</code></pre>
<p>You'll notice I've cleaned up the function a bit, replacing the inline function with an arrow function and replaced <code>var</code> with <code>let</code> so the syntax is more modern.</p>
<p>Running that snippet in the browser now gives me the object for each element:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-43.png" alt="The browser page with the dev tools open on the console showing the individual elements as objects" width="600" height="400" loading="lazy"></p>
<p>I can then expand out one of the elements now to get all the properties relating to it. From here I'm going to want to get the <code>id</code> (which I already know was there) and also the <code>innerText</code> which is the heading title:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-45.png" alt="The browser page with the dev tools open on the console with one of the element objects expanded to show all the properties" width="600" height="400" loading="lazy"></p>
<h2 id="heading-get-the-element-id-and-innertext">Get the element <code>id</code> and <code>innerText</code></h2>
<p>Let's add the <code>innerText</code> element to the snippet we're working with and see what that looks like now. Here's the snippet:</p>
<pre><code class="lang-js"><span class="hljs-keyword">let</span> ids = <span class="hljs-built_in">document</span>.querySelectorAll(<span class="hljs-string">'[id]'</span>);

<span class="hljs-built_in">Array</span>.prototype.forEach.call(ids, <span class="hljs-function">(<span class="hljs-params">el</span>) =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(el.id);
  <span class="hljs-built_in">console</span>.log(el.innerText);
});
</code></pre>
<p>And here's the output we get from that:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-46.png" alt="The browser page with the dev tools open on the console showing all the innerText from every element with an id" width="600" height="400" loading="lazy"></p>
<p>Ok, so that is really noisy as it's showing the <code>innerText</code> of every element in the document with a lot of irrelevant information on there. All we're really interested in is the title of the heading and it's id.</p>
<h2 id="heading-filter-on-the-localname">Filter on the <code>localName</code></h2>
<p>All the headings I use in the post are <code>h2</code> headings so I want a way to filter that. So from the <code>{el}</code> properties I'll need to grab the <code>localName</code> which denotes the type of the element <code>h2</code> in the case here.</p>
<p>So let's use an <code>if</code> function to see if the <code>localName</code> includes <code>h2</code> and if it does log that out. I'll also use a template literal to add the anchor id <code>#</code> to the beginning of the id:</p>
<pre><code class="lang-js"><span class="hljs-keyword">let</span> ids = <span class="hljs-built_in">document</span>.querySelectorAll(<span class="hljs-string">'[id]'</span>);

<span class="hljs-built_in">Array</span>.prototype.forEach.call(ids, <span class="hljs-function">(<span class="hljs-params">el</span>) =&gt;</span> {
  <span class="hljs-keyword">if</span> (el.localName.includes(<span class="hljs-string">`h2`</span>)) {
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`#<span class="hljs-subst">${el.id}</span>`</span>);
    <span class="hljs-built_in">console</span>.log(el.innerText);
  }
});
</code></pre>
<p>Let's take a look at the output now:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/01/image-47.png" alt="The browser page with the dev tools open on the console with the if function to filter on h2 elements" width="600" height="400" loading="lazy"></p>
<p>Much nicer!</p>
<p>Now I can use that output to start making my ToC!</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/8UnglHuuVTA" 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-conclusion">Conclusion</h2>
<p>We took what could be quite an extended process and turned it into a handy snippet we can use in the browser console every time we need to create a ToC for our blog posts.</p>
<p>That's it, hope you found it useful! 🙏</p>
<p>If you like the content you can check out much more from me on my <a target="_blank" href="https://scottspence.com/">blog</a> and you can follow me on <a target="_blank" href="https://twitter.com/spences10">Twitter</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Start a Blog [Free 70-Page Book] ]]>
                </title>
                <description>
                    <![CDATA[ What follows is a full-length book on how to create a successful blog. I am a software developer and I've written 1,500 posts on my blog over the past few years. Millions of people have read my writing. And my blog is now one of the top 20,000 websit... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-start-a-blog-book/</link>
                <guid isPermaLink="false">66bb5a7eb6e566d0c2aea609</guid>
                
                    <category>
                        <![CDATA[ blog ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Flavio Copes ]]>
                </dc:creator>
                <pubDate>Mon, 11 Oct 2021 17:21:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/10/how-to-start-a-blog.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>What follows is a full-length book on how to create a successful blog.</p>
<p>I am a software developer and I've written 1,500 posts on my blog over the past few years. Millions of people have read my writing. And my blog is now one of the top 20,000 websites on earth (according to Amazon's Alexa website ranking tool).</p>
<p>In this book, we will not focus on the "how to install WordPress" aspect of blogging. We will also not discuss how to build your own blogging software. (That's a fun exercise, but not as important as what I'd like to discuss.)</p>
<p>This book will instead focus on developing the right mindset. It will also show you how to get systems in place so that you can run your blog over a long period of time.</p>
<p>The hard part of blogging is doing it sustainably. How do you blog in such a way that you can publish consistently? How do you become a household name in your field? How do you hold your audience's attention over time?</p>
<p>A lot of bloggers struggle with these challenges. There are so many blogs out there with 1 or 2 posts. Or the last post is from 2018 saying "Sorry I haven't published for a long time." With planning and execution, you can prevent this from happening to your blog.</p>
<p>Also, you may be wondering how relevant blogging is in the 2020s. After all, YouTube, TikTok, and Instagram get a lot of headlines in the news. Well I'm here to tell you that blogs are still powerful when it comes to content marketing and getting organic traffic from Google.</p>
<p>The main goal of the book (and yes, you can read the book in its entirety here) is to help you get started with blogging in the right way. So grab a beverage and a comfortable chair. And bookmark this page so you can come back and review, in case you can't finish it in one sitting.</p>
<p>And if you prefer, <a target="_blank" href="https://flaviocopes.com/page/book-blog/">you can download a PDF and ePub version of this <strong>How to Start a Blog</strong> book here</a>.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ol>
<li><a class="post-section-overview" href="#heading-framing-your-blog-for-success">Framing your blog for success</a></li>
<li><a class="post-section-overview" href="#heading-the-benefits-of-having-a-successful-blog">The benefits of having a successful blog</a></li>
<li><a class="post-section-overview" href="#heading-pick-a-goal-for-your-blog">Pick a goal for your blog</a></li>
<li><a class="post-section-overview" href="#heading-own-your-platform">Own your platform</a></li>
<li><a class="post-section-overview" href="#heading-make-the-first-step">Make the first step</a></li>
<li><a class="post-section-overview" href="#heading-solutions-to-common-problems">Solutions to common problems</a></li>
<li><a class="post-section-overview" href="#heading-content-is-king">Content is king</a></li>
<li><a class="post-section-overview" href="#heading-practical-content-suggestions">Practical content suggestions</a></li>
<li><a class="post-section-overview" href="#heading-create-a-system">Create a system</a></li>
<li><a class="post-section-overview" href="#heading-how-to-get-people-to-your-blog">How to get people to your blog</a></li>
<li><a class="post-section-overview" href="#heading-expand-your-reach-with-an-email-list">Expand your reach with an email list</a></li>
<li><a class="post-section-overview" href="#heading-ups-and-downs">Ups and downs</a></li>
<li><a class="post-section-overview" href="#heading-making-money-with-a-blog">Making money with a blog</a></li>
<li><a class="post-section-overview" href="#heading-final-words">Final words</a></li>
</ol>
<h2 id="heading-framing-your-blog-for-success">Framing your blog for success</h2>
<p>People communicate and share information over the internet. We use it to look for help. Maybe we try to find the perfect recipe for dinner or the best book we should read this month.</p>
<p>A blog is a tiny website, made by one or a handful of people, with the goal of creating information that will help people.</p>
<p>On this blog, you will write posts. A post is a single page of the website containing some information.</p>
<p>The concept of a blog I'll talk about in this book is different from a diary, where you write about everyday things as they happen. That is something you can definitely do, but it's not what I'll be talking about here.</p>
<p>By blog, I mean a personal site, or a product/company site, where you regularly produce interesting content that can be beneficial to other people.</p>
<p>You want people to be able to find the solution to their problem on your blog.</p>
<p>I want to highlight this point because it's central. Your blog should be useful to other people. Without this fundamental concept, your blog has no reason to exist.</p>
<h3 id="heading-why-a-blog-does-matter">Why a blog does matter</h3>
<p>Blogs are the fundamental building block of today's internet. Think about it: we have giant corporations that create walled gardens that people are constantly drawn to, like Facebook, YouTube, Instagram, and Twitter.</p>
<p>Those are places that are engineered get you addicted so that you consume, debate, consume, debate, consume. And if you are in the lucky 1‰, you will be one of the stars of those walled gardens, and you will profit from other people consuming, debating, consuming, debating, consuming.</p>
<p>What are those people consuming? Well, aside from the content, they're consuming their time.</p>
<p>With notable exceptions, much of the content created and shared on the internet isn't useful. </p>
<p>But a blog is one of those rare places on the Internet where you can create something of value without a giant corporation benefitting from your work. You are the owner of your little corner of the world.</p>
<p>I'll soon tell you more about the "own your platform" concept, but here's the gist: a blog matters because it's 100% yours.</p>
<h3 id="heading-is-blogging-still-relevant">Is blogging still relevant?</h3>
<p>This is a legit question. Is blogging still relevant in today's world, dominated by social media and big platforms?</p>
<p>Can the underdog still find some space on the Internet? Don't we have too many sites already?</p>
<p>First, we'll never have too many sites. There's less than 1 person creating content for every 100 people. This is a rule for all media consumption: there are ~100 TV or radio stations in a country with 100 million people. Same for newspapers.</p>
<p>The same goes for the Internet. If you start creating, and you do your job well, eventually your content will surface and you will have success. Whatever success means to you.</p>
<p>This is possible with videos on YouTube, podcasts, and blogs, of course.</p>
<p>So why should you start a blog instead of making videos? It's a choice. We can't all be good at making videos, and we can't all have a voice made for podcasts. Similarly, we can't all be good at writing.</p>
<p>But if you happen to enjoy writing and you like the idea of having your own little corner on the Internet, then creating a blog might be what you are looking for.</p>
<h3 id="heading-should-i-have-a-personal-blog-or-a-companyproduct-blog">Should I have a personal blog or a company/product blog?</h3>
<p>If you are a freelancer, working solo, or you are a solopreneur, a company of one, you might have a tough decision ahead: should you create a personal blog or a company blog?</p>
<p>There's a big distinction in this. In my opinion, a personal blog is way better because companies and projects come and go. You might sell your company in 3 years.</p>
<p>Your personal brand, however, will stick with you wherever you go. The advantage I find in a personal brand is that you have the ability to experiment and pivot, if necessary. </p>
<p>If you create a brand that's too tied to a product or area, you can't switch without changing the name and domain, so it can be very confusing to people and it's very hard to make it work nicely.</p>
<p>And most likely you'll have a hard time finding a good idea, at first, so it’s always good to have more than one option. That way you don't have to start from zero.</p>
<h3 id="heading-why-a-blog-and-not-videos-or-podcasts">Why a blog and not videos or podcasts?</h3>
<p>In the last few years, videos and podcasts have grown tremendously.</p>
<p>Videos, in particular, are very popular. Kids want to become YouTubers when they grow up.</p>
<p>Both videos and podcasts are awesome. I watch YouTube every day and I am subscribed to several podcasts, too.</p>
<p>There's one thing I noticed about those platforms, however. Podcasts are very hard to discover. I only discover new podcasts if I see one mentioned somewhere. Or by word of mouth.</p>
<p>And in addition to having great content, as a podcast owner, a person's voice tone is a differentiating factor that makes me like a podcast or not. You are either born with a great podcasting voice, or you're not.</p>
<p>With videos, it's the same thing. A creator's personality is a unique differentiating factor in a great YouTube channel.</p>
<p>Plus, videos, if made well, require a huge effort in time, energy and equipment you need.</p>
<p>A blog, on the other hand, is something you can make no matter who you are, as long as you can write. You don't need to have that uniqueness that makes you liked on YouTube, and you are not trapped on one platform (YouTube). You also have a great channel for organic discovery of your blog posts (Google). More on this later.</p>
<p>But you don't have to choose one over the other, of course.</p>
<p>Many times creators use a blog alongside a YouTube channel, or a podcast. This is helpful if you use it more than just to cross-post content from one channel to another, but as a complementary tool.</p>
<p>When done well, it's a powerful combination.</p>
<h3 id="heading-define-who-your-blogs-readers-are">Define who your blog's readers are</h3>
<p>A blog that's successful and useful to other people is a blog that has a readership in mind.</p>
<p>I'm sure you've stumbled upon those blogs or sites that talk about a little bit of everything.</p>
<p>It all seems very random, and you don't find a reason for coming back to that site, so you forget about it.</p>
<p>If you happen to visit a website that talks just about your favorite topic, you might save it for later in your bookmarks, or leave the tab open to go back to it later.</p>
<p>This happens because the owner of the site is not just writing about everything that comes to mind: they have a specific kind of person they are talking to.</p>
<p>And this is what you should do, as well. Carefully define the kind of person you want to talk to with your blog.</p>
<p>You have to pick a niche.</p>
<h3 id="heading-how-to-pick-a-blogging-niche">How to Pick a Blogging Niche</h3>
<p>Picking a niche is how you can define what your little corner of the internet will be all about.</p>
<p>It can be all about you, your hobbies, passions, and stories. But then not many people will find it very useful. Maybe one post can solve their problems, but will they ever come back? Probably not.</p>
<p>Because your blog's not about you, it's about your readers.</p>
<p>Pick a niche. A small subject.</p>
<p>Say you're a programmer. You can write a blog about the C++ programming language, write 2 posts a week, and never run out of topics for 20 years. It's probably even a niche that's too broad, not much of a niche.</p>
<p>A better niche would be C++ programming for embedded devices. Or using C++ to build games.</p>
<p>Then filter out this group of people a little bit more. Using C++ to build a 2D game engine. </p>
<p>You can write about that for years, too, but this time if a person is interested in this subject, they will bookmark the site and download everything they can because you are the expert (or at least more of an expert than they are) and they can get a lot of value from you.</p>
<h3 id="heading-blogging-is-a-a-marathon-not-a-sprint">Blogging is a a marathon, not a sprint</h3>
<p>I want to give you another concept that will frame your blog for success: it’s not a sprint, it's a marathon.</p>
<p>As with everything in life, creating a successful blog takes time.</p>
<p>Creating a blog, per se, is a matter of hours if not minutes. This is why everyone can start a blog.</p>
<p>But creating a successful blog, depending on what you consider "success", can take years, and not many people welcome this fact with joy.</p>
<p>People like immediate, fast success. It almost never happens, unless you are very lucky.</p>
<p>Consider blogging to be your marathon.</p>
<h2 id="heading-the-benefits-of-having-a-successful-blog">The benefits of having a successful blog</h2>
<p>We all have limited time to dedicate to our hobbies, families, and friends. So why should you set aside a number of hours every week to work on your blog? And it's not just a few hours here and there. If you want the blog to be successful, you have to dedicate a lot of time.</p>
<p>As with everything in life, you have to evaluate the pros and cons.</p>
<p>Let's analyze the benefits.</p>
<h3 id="heading-personal-satisfaction-and-gratification">Personal satisfaction and gratification</h3>
<p>First, blogging gives you personal satisfaction and gratification.</p>
<p>Many people like to build puzzles or to do crosswords during their free time. Or they like to tinker with woodworking or electronic gadgets.</p>
<p>Writing on your blog can give you the same feeling.</p>
<p>Plus, it gives you a sense of accomplishment.</p>
<p>Writing a blog post can be easy sometimes.</p>
<p>Other times it's really hard, maybe because of the subject, or maybe because you can't find your way through your writing.</p>
<p>But when you finally finish it, it's a really good feeling.</p>
<h3 id="heading-you-can-get-your-name-out">You can get your name out</h3>
<p>Another thing that a blog can give you is discoverability.</p>
<p>When people search your name on Google, if you write under your own name people will find your blog as the first result. This gives a great impression at a job interview, for example. </p>
<p>And even if you are currently employed, having a blog is like an extension of your personal brand that can help you be perceived as a more knowledgeable person.</p>
<p>It's like writing a book. A book that no one reads is one thing – but writing a successful book that is read by many people is a completely different thing.</p>
<p>Blogs follow the same rule. Some blogs are not very popular, maybe due to the subject or other factors (we'll see more about this later). But some blogs are successful, and others are wildly successful.</p>
<h3 id="heading-you-can-get-in-touch-with-more-people">You can get in touch with more people</h3>
<p>By writing on your blog, you can publish things that are read by people all around the world, and your work can possibly help them achieve what they want.</p>
<p>Not only this is great for personal satisfaction and fulfillment. It's also a great way to be perceived as an expert in your field.</p>
<p>And the more people you can reach and impact, the better it is for you (and them!).</p>
<h3 id="heading-a-blog-is-your-platform">A blog is your platform</h3>
<p>Your platform, your launchpad. In today's world, there's just too much noise.</p>
<p>We are bombarded with information from every medium, and it's really hard, as a creator, to stand out.</p>
<p>A blog can be a great starting point for your next project, your next adventure, your next (or first) company. It's yours.</p>
<p>The goal of any product is to be used by people.</p>
<p>Lots of people, possibly. Not everything can "change the world" Silicon Valley-style, but your little project, product, or service can have a big impact on a tiny slice of the people it targets.</p>
<p>But the first steps are always hard, including finding a good idea.</p>
<p>Your blog can be the way you find the initial users for something that you find worth creating.</p>
<p>Put the idea out there. See how people react to it.</p>
<h3 id="heading-you-can-become-an-active-part-of-the-community">You can become an active part of the community</h3>
<p>In every community, there is a small number of people that lead, a slightly bigger number of people that contribute, and a larger number of people following.</p>
<p>Think about the community you are in. The 1%, or 0.1%, work on the "core". They organize an event,  build a software project, host a podcast, work on a product. Another 9% will participate and be an active part of the community around it. 90% of the people will just consume.</p>
<p>As a blogger, even if you're not in the 1% that lead, because you don't want that responsibility or power or you can't make the commitment, you can still contribute. You can add your input, and be heard in a world that is eager for people that want to stand out.</p>
<p>Write about that thing you are so enthusiastic about. Create a helpful resource. People will be really grateful for that. Including the 1% or 0.1% that lead but that do not have time, resources, or will to create those resources.</p>
<p>A notable example is Jeffrey Way. He created Laracasts to build training screencasts for Laravel, a programming framework that was gaining traction.</p>
<p>He’s now an integral part of the framework ecosystem and a driving force for its popularity.</p>
<h2 id="heading-pick-a-goal-for-your-blog">Pick a goal for your blog</h2>
<p>You can start a blog for multiple reasons. No one has the same ambitions, the same drive, or the same starting point.</p>
<h3 id="heading-you-want-to-get-a-job">You want to get a job</h3>
<p>One goal for a blog might be to help to get your first job.</p>
<p>Suppose you are getting ready for your first rounds of interviews as a Junior Frontend Developer. As you are learning the technology and experimenting, maybe following an online course, you document everything you are learning.</p>
<p>I think this is great for 3 reasons:</p>
<ol>
<li>you reinforce your learning</li>
<li>you build up an online presence</li>
<li>you get better at documenting and explaining technology</li>
</ol>
<p>As you approach the interview and send out applications, companies will see that you have a website. They'll find that you are great at explaining technology, you know how to communicate, and you definitely know your stuff.</p>
<p>And this is a great advantage over any other job applicant that does not have a website.</p>
<h3 id="heading-you-want-to-get-a-raise-or-a-better-job">You want to get a raise or a better job</h3>
<p>If you already have a job, you might want to step up your career and get better pay, or switch to another niche in the field you are interested in.</p>
<p>Having a blog that positions you as an expert in the thing you want to work on is definitely a big plus.</p>
<p>You can leverage your blog at your current company to reposition yourself as a senior developer.</p>
<p>Your colleagues will look up to you and your writing and will perceive you as an authority in the field.</p>
<h3 id="heading-you-want-to-get-bettermore-clients">You want to get better/more clients</h3>
<p>If you are not interested in getting a job and prefer being the independent freelancer with a queue of prospect clients lined up, blogging can be a game-changer for you.</p>
<p>I experienced this first-hand when I started my career in tech.</p>
<p>I started my career by finding work on freelancing sites. It was hard to compete with freelancers all around the world who were much more experienced than I was in many cases. And sometimes they were located in a lower cost of living area, which allowed them to provide the same service at a fraction of my rates.</p>
<p>I started a blog about the subject I was specializing on, an open-source CMS, written in Italian, my own language, and people from Italy slowly started to perceive me as an expert. They were more than willing to pay a premium to work with a person that spoke their language, worked in their timezone, and was one of the few experts in the field in the country.</p>
<p>My blog was key to this because people searched for topics they knew they needed help with – and they found me.</p>
<p>At some point, I was even able to turn down client proposals because I had too many requests. I could choose the ones that I believed were better for my business and more interesting to me.</p>
<h3 id="heading-you-want-to-demonstrate-your-expertise">You want to demonstrate your expertise</h3>
<p>A common benefit to either getting a job or freelancing clients is this: a blog helps you demonstrate your expertise and expose what you know to other people.</p>
<p>Some people are more naturally inclined to show off their abilities.</p>
<p>Sometimes, depending on culture and perception, we can even think of them as more capable than what they really are.</p>
<p>Some other people are less inclined, perhaps because of introversion or shyness.</p>
<p>Blogging is a great way to demonstrate your expertise even if you're not naturally inclined to raise your hand in public. This is because it's a medium that has very low friction compared to, for example, creating videos that show your face on YouTube.</p>
<h3 id="heading-you-want-to-document-your-learning">You want to document your learning</h3>
<p>A great goal for your blog could be to document your learning. Perhaps being more competitive in the job market is not something you are interested in right now, or you just want to write about your hobby.</p>
<p>A blog is a great track record for everything you learn.</p>
<p>I have a terrible memory, for example, and sometimes I just create a blog post to remember how I made something work.</p>
<p>I used to write notes on an app on my computer, but now I default to blog posts because I realized I can help other people by publishing my notes on the Internet.</p>
<h3 id="heading-you-want-to-structure-your-thoughts-and-learn-more">You want to structure your thoughts and learn more</h3>
<p>The way I used to learn best back in school was by creating very detailed notes about a subject.</p>
<p>However I only made them for subjects I was interested in, which in retrospect explains why I was good in some classes and bad in others.</p>
<p>You can use your blog as a way to learn better.</p>
<p>I am a huge proponent of learning through blogging because it works.</p>
<p>I use blogging as a way to learn a subject and at the same time help other people.</p>
<p>When I write a new blog post I am forced to create a mind map of the subject and I try to frame it, before writing about it.</p>
<p>In this way I learn much more than I do when I read a book or watch a course without taking organized notes about it. And as a side benefit, I end up with a new blog post I can publish.</p>
<h3 id="heading-you-want-to-become-better-at-explaining-things">You want to become better at explaining things</h3>
<p>A great benefit of blogging is that over time you'll become better at explaining things.</p>
<p>You will take fewer things for granted, and you'll think more from the point of view of the person who is listening to you, rather than just writing a bunch of words to be perceived as an expert.</p>
<p>This will help you tremendously in your career and as a person.</p>
<h3 id="heading-you-want-to-grow-your-audience">You want to grow your audience</h3>
<p>A great benefit of having your own blog is that over time you'll start to build an audience.</p>
<p>As with many things, the more time you dedicate to it, the more your audience will likely grow.</p>
<p>People might get to know you. Recognize your name. You will not become famous (except in rare cases), but this might not be what you want, either.</p>
<p>That's not what an audience is for. And honestly, I see many developers raise an eyebrow when marketing subjects come into play.</p>
<p>An audience is a great place to test your ideas. An audience can help you figure out something. An audience is your group of people, the people that trust you and that can help you move to the next level.</p>
<h3 id="heading-you-want-to-express-yourself">You want to express yourself</h3>
<p>A blog does not need to be a means to an end.</p>
<p>My favorite blogs are the ones that are playgrounds for creativity and expression. Especially when applied to programming and computers in general.</p>
<p>A blog is a great way to have a track record of all your past creative projects.</p>
<p>Your own centralized creative hub.</p>
<h2 id="heading-own-your-platform">Own your platform</h2>
<p>Your blog is the operational center for your future. Your platform, your headquarters. Everything else should bring you to your site. </p>
<p>Your Facebook page, YouTube channel, Twitter, Medium, your guest posts on other blogs, and the content you stream – all are tools to connect people with the content of your site on the Internet.</p>
<p>The website can be made with any technology you want. It does not really matter, provided that it’s on a domain that you own, and that you can change as desired.</p>
<p>You should have complete freedom over it: you have to be able to contact your users whenever you want, you must be able to extract all the data from this platform. Also, whenever you want to, you should be able to move away to a different platform with all your content.</p>
<p>Lastly, you do not have to be at the mercy of other people decisions.</p>
<h3 id="heading-the-platforms-of-other-people">The platforms of other people</h3>
<p>There are many ways to sell online. For each type of product, there are a number of options, and while sometimes you can sell things in the way you want, sometimes you need to work with a platform managed by someone else.</p>
<p>For example, if you sell digital books, you will, of course, sell them on Amazon Kindle, which probably represents 80% of the market.</p>
<p>Do you sell physical products? In addition to your own e-commerce, you will want to sell them on Amazon too, as it’s a huge market opportunity.</p>
<p>Do you make mobile apps? You will need to sell them on the App Store if you target Apple users, or on Google Play for Android.</p>
<p>Here, in some of these examples, it is clear that sometimes you have choices and sometimes you have to take a mandatory road to actually sell something. </p>
<p>You can’t distribute iPhone apps through your site. If you build desktop applications for Mac, on the other hand, this is possible, but you might also want to join the Mac App Store, which in this case is optional. Apple sets the rules, but it gives you some visibility that you would not get without being in the App Store.</p>
<p>All these great distribution systems such as the App Store, Amazon, Kindle, and many others like Etsy or Alibaba, are platforms. Other people’s platforms.</p>
<h3 id="heading-benefits-of-using-a-platform-managed-by-other-people">Benefits of using a platform managed by other people</h3>
<p>There are, of course, benefits to using a platform managed by other people. It provides a virtually limitless user base, customers visiting the platform already have an account, and in many cases they just need to press the buy button.</p>
<p>In general, not managing your own platform saves you worry about having to manage a huge number of things.</p>
<h3 id="heading-disadvantages-of-using-a-platform-managed-by-other-people">Disadvantages of using a platform managed by other people</h3>
<p>But there are disadvantages of using a platform, as well. You have to comply with the rules the owners impose, and the customers are not yours – they are the platform's customers. So you might struggle to create a relationship with your customers.</p>
<p>You also have little room for your branding, as everything could change from one day to the next. In some cases you have little control over your prices, and you'll have to pay commission to the platform for each sale you make.</p>
<h3 id="heading-the-platform-sets-the-rules">The platform sets the rules</h3>
<p>A platform is not just the place where people turn into customers, but it is also the place where you can find and interact with them. Facebook, Instagram, and Twitter are platforms, phenomenal platforms, but still platforms built by others.</p>
<p>A few years ago, having a Facebook page with 10,000 fans and writing a message on the page was enough to show this message to a vast percentage of those people. Unfortunately, this has changed today because the Facebook platform has changed. Now we are lucky if we reach 10% of our audience.</p>
<p>The only way to reach more people who like your page is to sponsor posts. So you have to pay Facebook to communicate with your own fans: this is an example of what it means to build on another property.</p>
<p>This is not to say that you should not have a Facebook page, that you don’t have to invest in Facebook Ads, or that you do not have to interact with people on Twitter.</p>
<p>You should do these things if you're trying to build an audience. The market imposes them on you, because you find people in these places. But always try to use these large containers to find people and bring them to you. </p>
<p>And it's important to always have a way out of a platform, and not to be completely dependent on it.</p>
<p>To do this, you have to push users to come to you through all the channels you can take advantage of.</p>
<p>You have to create your own platform.</p>
<h3 id="heading-use-your-own-domain-name">Use your own domain name</h3>
<p>Your domain name is very important. I use my own name for the domain: <a target="_blank" href="http://flaviocopes.com">flaviocopes.com</a>.</p>
<p>Your domain is like your address.</p>
<p>Except that a real-world address changes when you move somewhere else.</p>
<p>Your domain, on the other hand, is yours forever, regardless of your physical location. Like your email address.</p>
<p>When you publish things on your own website, under your own domain name, you are building virtual real estate and generating value that can last for years if not decades.</p>
<p>The way things work for search engines, now and for the foreseeable future, is that quality links pointing to your website make the domain more valuable.</p>
<p>If you publish under a domain name that's not yours, you are effectively working for other people, in exchange for something that might appear convenient for you, like a nice way to create the first page. </p>
<p>But if you take the time and put in some work beforehand to set up your own site and get your own domain, it can pay you a lot more in the future.</p>
<h2 id="heading-make-the-first-step">Make the first step</h2>
<p>The first step is always the hardest. In anything you want to do. Running. Coding. Cooking. Blogging.</p>
<p>In this chapter, I want to make sure you are well equipped for your first step when you’re ready to dive into blogging.</p>
<h3 id="heading-pick-a-domain-name">Pick a domain name</h3>
<p>There is one very important thing you need to do before you can create your blog. You need to choose a domain name.</p>
<p>You can notice 3 patterns for domain names. People have their own name/surname combination like I do with <a target="_blank" href="http://flaviocopes.com">flaviocopes.com</a>. Some people like to have a fantasy name or their nickname. Totally fine, too.</p>
<p>If it's cool and you can create a brand out of it, it's great. Like <a target="_blank" href="http://codinghorror.com">codinghorror.com</a>. Other people like to have a more general brand, like <a target="_blank" href="http://css-tricks.com">css-tricks.com</a>.</p>
<p>The good aspect of this is that people know the content of the blog just by looking at the domain. The downside is that you are kind of forced to stick to that topic forever. </p>
<p>For example, <a target="_blank" href="http://css-tricks.com">css-tricks.com</a> has long stopped talking exclusively about CSS, and other topics like JavaScript, SVG and others are very often covered.</p>
<p>This is kind of controversial, but I think your own name, or brand name with no direct attachment to anything specific, is the best and most future-proof way to create a domain name.</p>
<p>With one caveat: if you use your own name, you'll never be able to sell the site to someone else, or transform it into something "more" than just yourself with some guest posts here and there. But there are notable exceptions as well, like <a target="_blank" href="http://raywenderlich.com">raywenderlich.com</a>.</p>
<p>If you create a specific domain name that reminds people of a technology or hobby in particular, on the plus side you'll be able to sell it when it's successful to a bigger brand.</p>
<p>I started posting on my blog frequently by talking about the Go programming language. I later switched to a completely different programming language, JavaScript. </p>
<p>But because I used my own name and domain, I did not have to change anything. If I had a domain name like <em>startprogrammingingo.com</em> or something similar, there's no way I could've just switched to talking about JavaScript, or Arduino. </p>
<p>The whole project would have sunk because the day I stopped my work on Go, the site would just end its life with that very specific domain.</p>
<p>Since I use my own name for the domain, whatever I want to write about 10 or 20 years from now will be perfectly fine.</p>
<p>If you already have a domain, maybe used in old projects, and you think it can work fine, that's even better.</p>
<h3 id="heading-domain-authority">Domain Authority</h3>
<p>There's something called domain authority that is really important. Because that's how Google determines your site's value, and it's fundamental in how Google ranks web pages in its results.</p>
<p>One factor in domain authority is the domain's age. Older is more stable and more trustworthy to Google. </p>
<p>And when you're creating your domain, try to get the longest expiration date you can. That's a factor, too. Google basically detects your seriousness with the project. If your domain expires in 3 years and a competitor's in 3 days, maybe your domain is better in the long term. </p>
<p>I mean, we can't really know how the Google algorithms work, but we can try and make sure we tick all the checkboxes.</p>
<p>That can make the difference between a site that's never visited, and one that gets 10 visitors a day. Or one that gets a few hundred visits a day to one that gets tens of thousands.</p>
<h3 id="heading-choose-a-blogging-software-dont-build-it">Choose a blogging software (don't build it!)</h3>
<p>I personally use Hugo to power my blog. It is built using Go, it is very fast, and has some limitations on the things you can do. This means I can avoid distractions and I can focus on the writing.</p>
<p>I see many people, especially developers, who start creating their own blogging software from scratch.</p>
<p>I think that this a bad idea.</p>
<p>Why?</p>
<p>Because the moment you start is the time that you have the most energy. There will not be another moment in the lifetime of your blog where you'll have the same enthusiasm and drive to work on it.</p>
<p>And if you channel this energy towards something so futile, in this case, like building the software, then when it's time to actually write the content you'll have very little time, very little energy, and very little drive to craft great content.</p>
<p>Plus, you'll have to work on bugs, handle updates, and more, on your own. It's much easier to let others work on maintaining popular software used by thousands of people rather than reinventing the wheel.</p>
<h3 id="heading-choose-a-minimalistic-stock-design">Choose a minimalistic stock design</h3>
<p>The second mistake, I think, is to work on the design before working on the content.</p>
<p>Just as developers like to build their own software, design-oriented people want to create their own design. It's logical, I get it. But in this scenario, at the beginning, it's just a distraction.</p>
<p>My suggestion is: pick a stock theme, the simplest you can find.</p>
<p>The more minimal the theme is, the better.</p>
<p>Remember to keep the focus on the content. Not on the blog engine, not on the theme, not on plugins...on the content.</p>
<p>I have a couple blogs built using the default Ghost theme, which look very professional. In the niche they are built in no one knows what Ghost is – let alone do they know that it's the default theme.</p>
<p>Also, no one cares. Except you.</p>
<p>You can work on the design later on. There's always time for that.</p>
<h3 id="heading-create-the-first-3-posts">Create the first 3 posts</h3>
<p>Right after you have your blog idea, write the first 3 posts. You can write them in a normal plain text editor, and move them later to the blog platform you chose. </p>
<p>I like to use Bear (<a target="_blank" href="https://bear.app">https://bear.app</a>) to create my drafts. It autosaves, it is beautiful and intuitive to use. But it does not really matter. The thing I want you to focus on is those 3 posts.</p>
<p>Why exactly 3 posts?</p>
<p>Because now that you are so pumped to create your blog, it's the easiest time to write 3 great posts. If you create only one, maybe the second will be deferred until tomorrow, then to the day after.. and you'll be left with a blog with a single post.</p>
<p>Two posts... kinda the same. 3 posts seem like a good number to me.</p>
<p>Once you have those 3 posts, it's time to publish them. My advice, in this case, is not to publish them all together at the same time. Instead, you should schedule them.</p>
<h3 id="heading-schedule-the-first-3-posts-in-advance">Schedule the first 3 posts in advance</h3>
<p>I've had several people ask me how can I be so consistent with my blogging. The best suggestion I have is to create a habit. Habits are a very hip and popular topic nowadays, with many books published on the subject.</p>
<p>I'm not an expert, but I noticed that once a habit is established, it's really hard to break it.</p>
<p>Use this little hack to force yourself to write blog posts. Once you decide your perfect schedule (twice a week, once a week, twice a month, once a month...) then schedule the 3 posts you wrote so that you make a little buffer. </p>
<p>Suppose you write once a week. Publish the first post immediately, the second next week, the third the following week.</p>
<p>Now, you can relax and have a little party because you can launch the blog. Plus, you already have content written for the next 2 weeks and you can start planning other posts.</p>
<p>All the other posts you will write will be queued after the posts you wrote in the beginning.</p>
<p>Don't be tempted to add a new post in the middle of your planned schedule: there will be times when you can't write due to limited time, or you will have a low energy week. The buffer will be helpful to keep a consistent publishing schedule.</p>
<p>One thing that is key here is this: once the schedule gets full enough and you can look back at a long streak of posts, all very consistent in their publishing date, and you will start to feel a little pressure to not break the streak.</p>
<p>Transform this little pressure into a positive push towards staying consistent. If you have a weekly publishing routine, at the end of the year you will have 52 blog posts written, which would be a major accomplishment.</p>
<h3 id="heading-keep-going-this-way">Keep going this way</h3>
<p>If you do the things I mentioned in this chapter and you just keep going, you will have 99% more success with your blog than anyone else.</p>
<h2 id="heading-solutions-to-common-problems">Solutions to common problems</h2>
<h3 id="heading-who-am-i-to-write-about-this">Who am I to write about this?</h3>
<p>Let's say you are a student. By writing about the subject you are studying, you can reinforce your learning. Writing things down forces you to learn it really well.</p>
<p>Put your ego in chains: people don't care about you. People care about solving their problems. At least on their first point of contact with you, opinions, politics and controversial statements are detrimental to the user experience.</p>
<h3 id="heading-i-dont-know-enough-of-the-subject">I don't know enough of the subject</h3>
<p>You don't need to be an expert.</p>
<p>When I write a technical blog post, it does not really matter if I'm an expert at it. On the contrary, if I'm an expert in a field and I'm trying to write an introductory or beginner-friendly topic, I might not be able to explain that topic very well. This is because I cannot think like a beginner might when they don't know a topic, and so I might assume too many things and not explain that topic well.</p>
<p>If you're not an expert, do your best to absorb a topic and explain it to people that don't know about it. If you're an expert, on the other hand, writing content for other experts might be a good approach. Then you can mostly leave the entry-level content to people that might be in a position to explain it better.</p>
<h3 id="heading-analysis-paralysis">Analysis paralysis</h3>
<p>Just get it out there. Publishing a piece of content is much better than keeping it for months, revisiting it, thinking and thinking about it. Just do it.</p>
<p>It's ok to plan, but make sure you don't get trapped by analysis paralysis. The longer you think about it, the longer it will take you to start. Focus that energy on finding 3 good articles to write. That's the start.</p>
<h3 id="heading-dont-be-afraid-of-failing">Don't be afraid of failing</h3>
<p>Resistance is telling yourself that you are not good enough, that you will fail. This happens because you're about to do some creative work, you are about to be exposed to the public, to the opinions of others, and others will think you are not good enough.</p>
<p>Resistance is a powerful force. Especially if you write opinions or personal facts in your blog.</p>
<p>I have two suggestions.</p>
<p>The first is to talk about a topic that cannot be judged. Pick facts. No one can rant that a fact is not correct. Explain something you learned recently.</p>
<p>The second suggestion is to read <em>The War of Art</em> by Steven Pressfield, which is a mandatory read, in my opinion, for everyone trying to do creative work. It really goes into the root causes of resistance, and why you feel it.</p>
<h3 id="heading-i-am-not-good-at-writing">I am not good at writing</h3>
<p>Are you sure? Or is this just an excuse to bail out of the work that will open so many doors for you, and get back to your room?</p>
<p>This might be resistance kicking in, giving you a nice excuse for not writing.</p>
<p>Are you good at making videos, or feel great at talking to a microphone? Then make videos or start a podcast instead, but don't try to avoid any work that makes you vulnerable to the other people, just because you fear it.</p>
<p>But if you are <em>really</em> not good at writing, your writing will get better in just one way: by writing more.</p>
<h3 id="heading-i-dont-know-english-very-well">I don't know English very well</h3>
<p>If you want to write for an international audience in the western world, then you should blog in English. I highly recommend doing so, but in some cases, it might make more sense to write in your native language. </p>
<p>For example, if the niche you chose is too crowded and there's no one talking about it in your native language, then it might be an interesting opportunity to position yourself as an expert</p>
<p>If you'd like to blog in English, don't take a lack of English knowledge as an excuse. First, if you are reading this book, then it means you can read English and if you can read it, you can write it.</p>
<p>Also, unless you explicitly write for native English speakers, most of your readers might not be native English speakers, either.</p>
<p>If you are afraid your English is not good enough, and never start practicing, it will never become good.</p>
<p>My suggestion is to just start, and have someone who's really good at English review your posts, so you can learn over time.</p>
<h3 id="heading-dont-give-up-too-early">Don't give up too early</h3>
<p>Most blogs fail. This is a harsh truth. Blogs are abandoned, people forget to renew the domain name, people move on.</p>
<p>Blogs get into this situation because people gave up. They gave up on writing content consistently and frequently, because they did not see immediate gratification from doing so.</p>
<p>If you want your blog to have the chance to become successful, you have to give it the time it needs, and you need to be prepared right from the start.</p>
<h3 id="heading-dont-be-overwhelmed">Don’t be overwhelmed</h3>
<p>It's too easy to be overwhelmed by all the things you need to do. In addition to your day job and your family and friends, you need to find the time to blog. </p>
<p>But blogging is not just writing. You need to find the perfect image for that post, you need to share the post on social media, you need to reply to comments, think about future post topics, craft that perfect and eye-catching post title...the list never ends.</p>
<p>It's easy to feel overwhelmed.</p>
<p>That's why I take a minimalistic approach to blogging, which involves no pictures at all unless they're needed in the content of the post, and no comments. </p>
<p>Not having to manage comments frees up a lot of time and mental energy. It also has a nice side effect: I don't have to worry about what people think of my articles. I just focus on the writing.</p>
<h3 id="heading-one-step-at-a-time">One step at a time</h3>
<p>Don't think you have to rush and do everything at once: open the blog, write 100 posts, create a Twitter account, a Facebook page, an Instagram account, make YouTube videos… it's just too much. </p>
<p>Start with the simplest thing you can do, create a habit, make that habit stick in your day to day and expand from there.</p>
<h2 id="heading-content-is-king">Content is king</h2>
<p>Content matters. Content is the thing that matters the most, in the context of your blog.</p>
<p>Let's discuss some of the things I believe are fundamental pillars in a content-centered blog strategy.</p>
<h3 id="heading-write-to-your-people">Write to your people</h3>
<p>Let's say you are great at cooking. Write about your craft: cooking tips, ingredients, recipes, talking to other people that love cooking. Do you love knitting? Write for other knitters about techniques and everything new that you learn about knitting. Love dogs? Create a blog for dog owners.</p>
<p>Anything you do, the important thing is that you identify a group of people that are as passionate as you about a subject, and you write for them.</p>
<p>There's no value in what you write if it's not valuable to other people. Sure, you can write about something that's only appreciated by you, perhaps. But then there's no purpose in spending so much time and effort creating blog posts, is there?</p>
<h3 id="heading-focus-on-creating-value">Focus on creating value</h3>
<p>Once you identify the people you want to write to, it's key for you to focus on creating value. </p>
<p>Value can take many different forms, of course. It could be how-to posts. It could be sharing your specific experience with some technology. It could be teaching other people how your raw meat diet for your dog works. </p>
<p>It could be telling everyone about your recent trip and what you visited, in detail, so that when someone is searching for tips as they are organizing a vacation, they can find your useful information.</p>
<p>There is no fixed rule on what creates value.</p>
<p>Here's what I do to create value for the readers of my blog: I create easy-to-follow tutorials, written with a beginner's mindset. I do not take the perspective of an expert while writing them. </p>
<p>To do so, I learn a new thing, so I'm not an expert in it, and I create a practical guide. </p>
<p>I know it's very difficult as an expert to write for beginners about the thing we're expert in. This is because we've forgotten what it means to be a beginner and we make too many assumptions, forgetting to mention essential things that are key to understanding a topic.</p>
<p>Other times I describe how I fixed a problem that I just solved while working on some coding project. My memory is very fresh and I can remember what it's like to have the problem, so I can describe it very clearly.</p>
<p>Sometimes I create less practical posts where I talk about things that relate to my experience as a developer, or common struggles, or tips for productivity, for example. Those are the posts that are normally appreciated the most by my readers.</p>
<h3 id="heading-focus-on-being-useful-and-solving-problems">Focus on being useful and solving problems</h3>
<p>Your posts must solve a problem: each post on your blog must have a very specific goal.</p>
<p>This is key, and the post title must perfectly address the problem and solution.</p>
<p>When people search for how to solve that problem, you want your post to be in the top results.</p>
<p>And your content must be awesome.</p>
<p>Exactly what they are looking for.</p>
<p>Focus on creating the absolute best, most valuable content.</p>
<h3 id="heading-write-the-blog-post-that-would-have-helped-past-you">Write the blog post that would have helped past you</h3>
<p>One of my favorite things is writing a blog post that contains the solution to a problem I just solved.</p>
<p>Everyone else solves a problem and moves on.</p>
<p>If you dedicate 10 minutes to document how you solved the problem you had, you are helping other people that might have this problem next week, or next year, or 10 years from now.</p>
<p>They will be thankful that you wrote something that helped them.</p>
<p>And perhaps you can even help yourself in the future.</p>
<p>Sometimes I google for a problem and I find my own post, written many months ago. I completely forgot that I wrote it.</p>
<h3 id="heading-what-not-to-write-about">What not to write about</h3>
<p>One thing I recommend that you not write about is anything that doesn't help other people.</p>
<p>It's difficult to draw a line in the sand, but you should think about what you are writing.</p>
<p>Don't think of a blog like a diary. You <em>can</em> use it like a diary, posting your rants or opinions or what you ate for dinner.</p>
<p>But is it really helping or creating any value for other people?</p>
<p>I personally only try to write about things that I assume will help anyone. Even if a post helps just one person, then it's a good post for the blog.</p>
<h3 id="heading-teach-everything-you-know">Teach everything you know</h3>
<p>I learned this mantra, or motto, from Nathan Barry. He's famous for his book <em>Authority</em> and for being the founder of ConvertKit, a great tool for bloggers that have the need to build a newsletter.</p>
<p>He has this notion that building an audience is the secret hack to creating a successful business, and I really believe that. And to build an audience, the best way is to share, in one way or another, everything you know.</p>
<p>He did that in the form of books, first with two books about design, as that was his specialty. Then he wrote everything he learned about selling those books in another book.</p>
<p>I make my living teaching everything I know, and since there's a finite amount of things I do know at any finite point in time, I had to transition to teaching everything I learn. </p>
<p>I found that many people like the way I talk about stuff, with a very simple approach, and this beginner-oriented point of view has been beneficial to me.</p>
<p>Your approach can be different, but the “teach everything you know” mantra is one that you need to seriously think about.</p>
<h2 id="heading-practical-content-suggestions">Practical content suggestions</h2>
<p>After discussing why content matters, and why you should focus on creating great content, it's time to talk about some practical suggestions.</p>
<h3 id="heading-content-length-how-much-is-enough">Content length, how much is enough?</h3>
<p>It does not matter how long your articles are.</p>
<p>The Internet is full of marketing blogs that tell you the content must be 2000+ words long, 10000+ words long, and so on.</p>
<p>But it does not matter as long as your content solves a problem for a person.</p>
<p>I have posts that solve the problem in 50 words, and if this is the solution to someone's needs, that's great!</p>
<p>There is no need to dilute the content with useless words, and I'm sure you immediately notice when a blog post is trying to transform a 5-line answer into a 200-line one.</p>
<p>The same thing happens with videos, right? You are looking for something, but you need to watch 15 minutes of intro to get to the meat of the subject.</p>
<p>Do the opposite. Do what's great for your readers.</p>
<p>Plus, Google does not care.</p>
<h3 id="heading-keep-posts-focused">Keep posts focused</h3>
<p>When I say that Google does not care about content length, it's because I've observed this first-hand.</p>
<p>Some of my most visited blog posts are very short, yet they take a problem and they solve it, quickly.</p>
<p>And Google notices it. The key is solving a problem. Google notices that you are helping it help its users, and that's what happens when you keep your posts focused on a specific topic.</p>
<p>Some topics will perform better than others, some might be less popular, but as long as it's focused on a little problem and it solves it, it's great.</p>
<h3 id="heading-dont-try-to-appeal-to-everyone">Don't try to appeal to everyone</h3>
<p>You can't write great content for everyone. Pick your ideal person, or group of people, and write for them.</p>
<p>Pick your crowd.</p>
<p>Pick your tribe.</p>
<p>Ignore everything else.</p>
<h3 id="heading-dont-aim-for-perfection">Don't aim for perfection</h3>
<p>Done is better than perfect.</p>
<p>This is my mantra. As long as what I do is technically correct and does not have errors, it's all fine.</p>
<p>You don't need to overthink it. Focus on being good enough. That's when the point of diminishing returns starts.</p>
<p>Most of the time, good enough is already better than 95% of what's out there.</p>
<p>Don't let chasing perfection limit your production volume.</p>
<h3 id="heading-it-does-not-matter-if-someone-already-wrote-about-it">It does not matter if someone already wrote about it</h3>
<p>There are thousands of water brands. Thousands of brands of wine and beer. Thousands and thousands of hotels.</p>
<p>The more people write about a subject, the more interest there is around it, and the more people read about that subject.</p>
<p>If no one wrote about something, it might not mean you are a pioneer or “first", it might just mean no one cares about that topic.</p>
<h3 id="heading-you-dont-need-to-bring-something-new-to-the-table">You don't need to bring something new to the table</h3>
<p>If you worry that you don't have a unique spin on something, or a revolutionary idea, you might be limiting yourself.</p>
<p>Often, a 1% or 5% improvement over something that's already out there is enough.</p>
<p>Google was not the first search engine. It just worked better.</p>
<p>Basecamp was not the first project management tool. It just worked better.</p>
<p>Focus on being better, not new.</p>
<h3 id="heading-you-can-blog-about-anything">You can blog about anything</h3>
<p>I am a programmer and I blog about programming. If you’re a programmer too, you don’t just have to blog about programming.</p>
<p>There’s space for everything.</p>
<p>The topic does not matter, as long as you are passionate about it. There's no way you can force yourself to write about one subject for a long time without burning out.</p>
<p>Anywhere there’s a problem, you can bring solutions.</p>
<p>For me the niche was programming, for you it might be something else. Also, programming is even a bad niche as most developers consider even a little bit of marketing to be spam and mostly hate receiving emails (as they're using email every day and probably already receive a lot of it).</p>
<p>I think blogging, properly done, can be even more successful in less technical topics. It can work, as long as people search for those topics on the internet and have a place where you can find them like a big subreddit, a big Facebook group, or a popular online forum.</p>
<h2 id="heading-create-a-system">Create a system</h2>
<p>I am an engineer and I believe in systems. Humans are weak. Systems are strong. Humans with a system are on a good track.</p>
<p>If only we could have a system for our blog, everything would be simpler.</p>
<p>Turns out that we can definitely have a system, and in this section, I'm going to explain the system I use.</p>
<p>It might not be the perfect system for you, and I won’t pretend it’s a system that works in 100% of the cases. But it's a starting point, and by tweaking it you can create your own perfect system.</p>
<p>A system makes you consistent.</p>
<h3 id="heading-consistency-is-key">Consistency is key</h3>
<p>Why is consistency so important?</p>
<p>Because consistency is deeply entrenched in our lizard brains.</p>
<p>You are the one that makes one blog post every Tuesday. You're not the one that <em>tries</em> to write a blog post consistently each week. You're the one that just <em>does</em>.</p>
<p>It's not me, Flavio, saying so.</p>
<p>Let me share something from Robert Cialdini, author of the amazing book <em>Influence</em>: </p>
<blockquote>
<p><em>Once we have made a choice [...] we will encounter personal and interpersonal pressures to behave consistently with that behavior</em>.</p>
</blockquote>
<p>Once you have a series of 5, 10, 20 weeks of posting, you automatically become the one that posts every week. Or twice a week, or whatever schedule you chose.</p>
<p>That's the key to the system: consistency.</p>
<p>Have you ever heard of Rand Fishkin's Whiteboard Friday? That was a great video series about SEO that came out every Friday. Do you know about FunFunFunction? MPJ releases one video every Monday. Every one of his fans knows and waits for his "good Monday morning" every week. </p>
<p>I’m sure you know YouTubers that post on a pre-determined day. Like Saturday or Tuesday.</p>
<p>Everyone can find the time to create a blog post every week. But not everyone is willing to put in the work to create something every week. Will you?</p>
<h3 id="heading-schedule-posts-ahead-of-time">Schedule posts ahead of time</h3>
<p>As we just discussed, the single best thing you can do with your blog is stay consistent.</p>
<p>But staying consistent is hard.</p>
<p>One of the easiest ways to become inconsistent is to miss a day because you were sick, or because you went to a party, or because you took a vacation.</p>
<p>When you miss a day, and you forgive yourself for this, you will miss other days.</p>
<p>That's what I would do. If I let one day slip by without a post, well… nothing bad happens and I have a track record of missing one post.</p>
<p>Before I realize it, I am sure I will miss other posts, too. Just because I was too lazy one day, I ruined the consistency of my blog and now it's impossible to get that perfect streak of posts back.</p>
<p>How do you prevent that? By scheduling posts ahead of time.</p>
<p>Before you start publishing your blog, before unveiling it to the world and announcing it everyone, write 3 posts as we discussed before, and start building up your queue.</p>
<h3 id="heading-have-a-queue">Have a queue</h3>
<p>When I first started my blog, I discovered the notion of creating a queue by accident.</p>
<p>I happened to work on another project of mine, one that didn't take off as I expected it to.</p>
<p>This project involved creating some long guides, about topics I cared about.</p>
<p>So when I decided to shut down the project, I thought that it was a shame to abandon those long guides to their unknown fate.</p>
<p>So I cut each chapter into several blog posts, and I got about 15-20 of them.</p>
<p>I could have published them all on that day, but I randomly decided to queue them up. One today, one tomorrow, and so on.</p>
<p>A couple of days after that, I had an idea for a new post. I was a blogger now, right? And I queued it after all those posts.</p>
<p>The queue has never dried up since then, over 700 days ago. Some days I reached the end of the queue and I had to fill it up again from zero, but I never missed a day.</p>
<p>I just attribute this result to the system – the queue I've built up, and the shame that would result from having written all those posts in the past and then stopping.</p>
<p>I could not stop.</p>
<h3 id="heading-pick-a-schedule-frequency-you-can-sustain-over-the-long-run">Pick a schedule frequency you can sustain over the long run</h3>
<p>One key part of this scheduling and queuing system is frequency.</p>
<p>How frequently should you post?</p>
<p>My recommendation is to post with a frequency you can maintain over time, consistently.</p>
<p>Start with one day per week. Create a queue, as I suggested, and see if you can maintain this frequency over 2-3 months. Once you start having a queue that's too long, say a blog post you write today will be published 3 months from now, then you can start increasing the frequency.</p>
<p>It's always best to scale up the frequency than to post less frequently because you can't sustain the frequency you initially set.</p>
<p>The reason I focus a lot on consistency and frequency is that people get used to it and they learn to expect a post from you, and they look for it.</p>
<p>If you start missing posts and not sharing information as frequently, then people don't know when to expect a new post from you, and they feel lost and disconnected.</p>
<p>This happens with everything. I notice it with videos.</p>
<p>If you watch YouTube videos frequently, what do you think when a YouTuber that posts every day, and you watch every day, suddenly stops posting for a week?</p>
<p>I subscribe to a YouTuber that posts every Saturday, and every Saturday, unless I am out doing something, I'm there, at noon, watching his video.</p>
<h3 id="heading-ignore-quantity">Ignore quantity</h3>
<p>If you know beforehand that you have 3 hours a week to dedicate to blogging, don't force yourself to create too many posts.</p>
<p>Do one post a week, but do it well. Don't create many posts that are irrelevant or low quality, create one that you can be proud of.</p>
<p>Quality is perceived, and people will associate your worth with the quality of your work.</p>
<p>Be known for creating high quality and helpful content.</p>
<h3 id="heading-focus-on-the-process-not-the-outcome">Focus on the process, not the outcome</h3>
<p>One recommendation I have to be productive is to focus on the process.</p>
<p>I am focused on creating the blog post.</p>
<p>I am focused on creating ebooks.</p>
<p>I am not focused on how many people will read the blog post, or if they will like it.</p>
<p>That's not something I have control over. The best thing I can do is focus on my work and make sure it is the best work I can perform today.</p>
<h3 id="heading-keep-the-process-lean">Keep the process lean</h3>
<p>When thinking about my process, I like to simplify it.</p>
<p>I want to remove all the friction I can remove.</p>
<p>It all needs to be simple, fast, streamlined.</p>
<p>I don't want roadblocks.</p>
<p>I try my best to remove all the resistance and all that powers resistance.</p>
<p>There should be nothing between me and writing a great blog post.</p>
<h3 id="heading-keep-a-list-of-topics">Keep a list of topics</h3>
<p>I don't always have the time to write about something.</p>
<p>Sometimes I have an idea for a topic, and I write down the title of the article in my favorite writing application.</p>
<p>When it's time to write a new blog post, and I don't have an idea ready, I go through the list of titles and find one that is appealing to me in that specific moment.</p>
<h3 id="heading-capitalize-high-energy-days">Capitalize high energy days</h3>
<p>Some days I have really high energy for writing blog posts. Some days I have very little, if any, energy.</p>
<p>On those days when I have the fire, I can write a few blog posts in a row and code the rest of the day (as that's my job). I have fuel for everything.</p>
<p>I capitalize on those days. I sit there and I might write 5 posts, and put them in the queue.</p>
<p>The days I have low energy I am thankful for those high energy days and I am thankful that I did everything I could to get the most out of them.</p>
<h2 id="heading-how-to-get-people-to-your-blog">How to get people to your blog</h2>
<p>Having a blog is great and all, but having a blog that people actually read is deeply satisfying.</p>
<p>There’s a problem though: how do you get people to read your blog?</p>
<h3 id="heading-how-blog-traffic-works">How Blog Traffic Works</h3>
<p>In today's world, if you are not producing valuable and consistent content, you are invisible. There are just too many things pushed at us every day.</p>
<p>I dedicate from 30 minutes to 1 hour every day to the Internet. That means Social Media, mostly Twitter, RSS and content aggregators.</p>
<p>I always see the same people. Those people that are highly successful keep pushing out great content.</p>
<p>It might be an inspiring tweet, a great blog post that's shared a lot, or something that's just worth reading.</p>
<p>Unless you perform at the same level, you are not appearing in my feed because I only give it limited time. And I assume the vast majority of people do the same. People don't just spend the whole day on social media waiting for you.</p>
<h3 id="heading-share-your-work-where-the-people-are">Share your work where the people are</h3>
<p>Sharing your content is a great motivator especially when your blog is young and you don't have an audience yet (more on this later).</p>
<p>In this situation, you can't rely on organic traffic. To avoid losing motivation, it's key to get your first views by sharing your content. </p>
<p>You can do 2 things: share it with your own audience on social media, if you have an audience already, or use sites that provide an audience and try your luck.</p>
<p>Those sites include Reddit, Hacker News, Medium, and forums that specialize in the topic you are talking about. Word of caution: you might have your feelings hurt in some of those venues, so just be prepared for criticism.</p>
<h3 id="heading-organic-growth-is-the-only-reliable-solution-for-long-term-traffic">Organic growth is the only reliable solution for long term traffic</h3>
<p>You might have the proverbial lucky day, and your blog post goes viral in places like Reddit, Hacker News, or on Social Media.</p>
<p>But the key factor for your blog is organic traffic.</p>
<p>Organic traffic means Google will receive a search from a user and will decide that it should show them your blog post.</p>
<p>Organic traffic is a key factor to every website. Social media traffic is generally low quality, hard to get, and hard to maintain over time.</p>
<p>This is a long process. Google needs to trust you, and it can take some time.</p>
<p>My best suggestion to give Google a reason to show your blog posts is to consistently solve people’s problems.</p>
<h3 id="heading-solve-peoples-problems">Solve people’s problems</h3>
<p>How do you get Google (and other search engines) to send loads of traffic to your website?</p>
<p>What matters to Google is that it satisfies its own users.</p>
<p>And those are people searching.</p>
<p>People search in order to solve their own problems.</p>
<p>I see SEO people who suggest that you write 3000+ posts to rank on Google.</p>
<p>That’s a great tip if their goal is to discourage you from writing more. They call it long-form content.</p>
<p>Now, as a non-SEO person, but as a person that does things and observes what works and what doesn’t, I can say that if you solve a problem for a person with a 4-line blog post, Google will thank you by sending you more people who have that problem.</p>
<p>They know using their algorithms when a person found the answer they needed. This is Google’s job. Their job is to solve people’s problems by providing the perfect content they are looking for.</p>
<p>If you can provide that, Google will help you.</p>
<p>Not every post on your blog can solve a problem, of course. But if you have posts that solve problems, you’ll start to notice, as those are the posts that will get the most visitors.</p>
<p>Not every post must be small of course, and if long-form content is best for you, do that.</p>
<h3 id="heading-the-importance-of-links">The importance of links</h3>
<p>When we were talking before about choosing a good domain name, I mentioned domain authority. I said that an old domain name will likely have more domain authority.</p>
<p>What is domain authority?</p>
<p>Domain authority is a sort of score that search engines use to set the importance of a website, and it's determined by many different factors. The specific algorithms and metrics used are not publicly available, but there's one thing which is key to domain authority: links.</p>
<p>The more links to it that a website has, the more authority it has. But it's not that simple. The more authority the domain has that the link comes from, the more important the link is.</p>
<p>Links have very different weights. A link coming from Wikipedia has more power than a link from a random tweet. And search engines do take social metrics into consideration, too. We can't know for sure, but a link in a tweet from an influencer in your field has more weight than a tweet from a Twitter bot account.</p>
<p>Google (I say Google because it's the most important search engine, but others might do a similar thing) is also careful about the topic. If I link to a kitchen recipe site from my computer programming blog, that link is not going to have much value. </p>
<p>If a famous kitchen recipe blog links to a smaller kitchen recipe blog, then that's more relevant for Google, and it will give that link more meaning.</p>
<p>When it comes to links, it's important to get links from relevant and on-topic websites.</p>
<p>This is only something you can get by providing great and useful content.</p>
<h2 id="heading-expand-your-reach-with-an-email-list">Expand your reach with an email list</h2>
<p>Let’s discuss how to augment the experience you create for your blog visitors by using an email list.</p>
<h3 id="heading-what-is-an-email-list">What is an email list?</h3>
<p>Blogs are closely linked to newsletters and email lists. The two often go hand in hand.</p>
<p>A newsletter is the most effective way you can get in touch with your blog readers over time.</p>
<p>If you are not already familiar with the email list concept, you may be wondering whether in the era of Facebook, Instagram, Snapchat, and Twitter if you still need to use an old-style system like email.</p>
<p>In fact, email is a fundamental tool for any online business. Blogs are no exception.</p>
<p>Sending emails to a list of customers is not a system by which people commonly spam, as you might be thinking.</p>
<p>Especially if you're a developer, you need to realize that email is useful, you are not evil for sending emails, and that people want to hear from you.</p>
<p>Email is a cool system where people interested in your content or products can have more information about them, or about new products that you could provide in the future.</p>
<p>Email marketing is one of the most effective systems with which people are converted over time from visitors to customers: people in your list have explicitly asked to receive more information from you in the future.</p>
<p>This does not mean sending an email after 8 months asking them to buy your new product. Instead, the right way to approach this is to ask yourself how you can help your customers, in a consistent way.</p>
<p>Through the list, over time you can build customer loyalty, you create a relationship, and you keep in touch.</p>
<p>Your task with the list is to train people on the subject you are talking about, and to foster anticipation about upcoming news. But try to keep the focus on the customer rather than on you. Remember that a person will not be on your list forever – just as long as you can keep interest high.</p>
<p>So how do you get a person to join your email list in the first place?</p>
<p>With a small gift, called the lead magnet, which can be for example a report, a free ebook, exclusive access to premium content, an email course, or really any gift you can make.</p>
<p>The concept is simple, but it is crucial that the gears that make up this mechanism are calibrated to perfection and oiled regularly. Don't leave anything to chance if you do not want to be amateurish in the eyes of your customers.</p>
<p>It’s fundamental that you offer people what they want. The email list is considered by most online business owners as the most important asset of a business, and the only one that really is 100% yours.</p>
<h3 id="heading-a-typical-use-of-an-email-list">A typical use of an email list</h3>
<p>Let's look at an example. This is the system that most successful blogs use: </p>
<p>a person reaches your site coming from search engines or Facebook. Then a popup appears (more or less invasive) with the request that they enter their email to get a small gift. Then you’ll send them the gift via email, and the person enters this cycle where they will be offered a variety of products over time.</p>
<p>Usually, when a person gets on your list, they enter a phase called the <em>funnel</em>. The funnel is an automated process of warming, that is, the person get "heated" and is brought from being a random visitor to becoming a possible customer via a series of emails.</p>
<p>As soon as the person signs up, they will receive an email. The next day they will receive another, after 3 days another one, all according to predetermined logic. </p>
<p>Typically, these e-mail series terminate after 7-8 mails where a story is told and in the end, they will be offered a product to purchase. If the person doesn't buy right away, emails will continue to flow, and so on until the automated sequence ends.</p>
<p>There are many kinds of different sequence types and usually people do not invent anything new. Instead they use well-tested systems (which you can easily recognize once you are trained).</p>
<p>Once this sequence is over, the person's email is placed in another sequence, or in the general list, which is no longer automated. Then, the person managing the list (you, for example), will send an update email from time to time, say once a month, to make sure the person don’t forget about them.</p>
<p>In short, the author of the list tries to sell a product but if the recipient does not buy it, they will still remain in the list until they cancel the subscription. Because you never know – in the future they could decide to buy and become a customer.</p>
<h3 id="heading-how-to-use-an-email-list">How to use an email list</h3>
<p>Of course, there are several approaches to the list. Let's see some situations that you could apply in your case.</p>
<p>If you sell an ebook: your users are therefore your readers. You could add a link to your site, and use as a lead magnet a free ebook on a topic that you know the user is interested in. </p>
<p>On the list, you could initially present an upsell of other ebooks you've already written. Then you could insert the person into your monthly email, where you'll publish interesting links to the topic, and from time to time promote your new ebooks.</p>
<p>If you sell a product: for an info-product, it's the same process as a typical example used on blogs. Maybe as a lead magnet you use one or more chapters, or you have a video or something else related to the subject.</p>
<p>If you have a software product: the list could be made up of all the people who bought your software if you sell to them directly, which gets you their emails. Or you may want them to sign up for your application. </p>
<p>You could use the list to share updates, inform about the latest releases, cross-promote with other developers, and raise awareness on new products you’ll build over time.</p>
<h3 id="heading-where-to-host-your-email-list">Where to host your email list</h3>
<p>To manage an email list you need a specialized software.</p>
<p>There are many different kinds of email newsletter management tools.</p>
<p>Some are simple. Some are way too complex for your needs. You just need to find the perfect one for you.</p>
<p>The first separation I want to make is between self-hosted software and SAAS. Sendy (<a target="_blank" href="https://sendy.co">https://sendy.co</a>) is an example of a self-hosted software. You don't pay a monthly fee to use it, but you have to manage your own server, and you use a service, typically AWS, to actually send the emails.</p>
<p>ConvertKit is an example of a tool that is SAAS based. You pay them a monthly fee, and they take care of everything.</p>
<p>That tool, in particular, is targeted at bloggers, and it's really well made. I have used it for almost 2 years, and it's really great.</p>
<p>I have recently moved to Sendy, self-hosting my newsletter, because at some point the price, for me, was not sustainable.</p>
<p>To start with, I would definitely recommend ConvertKit. You don't need to overthink spending $29 or $49 a month if that's valuable to you.</p>
<p>But my list became big enough and I was not comfortable spending a lot of money on my email list hosting software.</p>
<p>And it's a business tool: I know several top-performing bloggers with great audiences that use it for lists in the hundreds of thousands, and I'm sure that the ROI (Return on Investment) is well worth not having to manage your own server.</p>
<p>Especially if you are new to managing servers.</p>
<p>ConvertKit is not the only service, of course. There's Mailchimp, Drip, and others.</p>
<p>Some tools let you start free. I think of TinyLetter (https://tinyletter.com/). That's what I started with, in the beginning, until I reached a few hundred subscribers. Then I moved to a tool called ButtonDown and I went from there.</p>
<h3 id="heading-keep-it-alive">Keep it alive</h3>
<p>As with blog posts frequency and consistency, the best advice I can give about mailing lists is to keep them consistent.</p>
<p>Do you write every 2 weeks? Fine. Keep doing it.</p>
<p>Do you write every month? Fine. Keep doing it.</p>
<p>The exact frequency is really personal. Some people write a new email for every post they make on their blog.</p>
<p>Some people email once a month with the list of posts. If you write once a month, however, people might forget who you are. This happened to me: I might subscribe to a newsletter and forget about it if you don't email me quite frequently.</p>
<p>Since I write one post per day, I found my sweet spot at one email every week, on Tuesday, and I always respect this frequency.</p>
<p>People know that Tuesday is "email from me" day.</p>
<h3 id="heading-the-lead-magnet">The lead magnet</h3>
<p>We discussed how having a newsletter is essential. It's also essential to have people signed up for it.</p>
<p>How can you have people decide to give a thing so precious as their email address to you?</p>
<p>The best way I know is to give them something in return. Don't expect people to sign up without a clear gain for them</p>
<p>You need to give an incentive to people to sign up for your newsletter.</p>
<p>This is the lead magnet that we discussed briefly earlier.</p>
<p>It can be a 1-page PDF cheat sheet. A report. A short mini-course of 10 videos. An email-based course.</p>
<p>The sky is the limit when it comes to what the lead magnet should be.</p>
<p>And there is no reason you should only have one lead magnet. You can have multiple.</p>
<p>In the ideal case, every blog post should have a specific lead magnet, but this is of course not always possible. I tend to create a lead magnet for each category of posts I'm writing.</p>
<h3 id="heading-how-i-discovered-lead-magnets">How I discovered lead magnets</h3>
<p>At the beginning of my blogging adventure (a little more than 2 years ago), my blog had zero traffic and Google ignored me.</p>
<p>I shared my posts on Reddit, and some people came and saw the site. I shared my posts on Twitter, where I had like 500 followers, many of them probably bots or inactive followers that I had collected in the 10 years I had been on Twitter.</p>
<p>If I had 10 or 15 visits a day, that was a good day.</p>
<p>After a while, I decided to create a newsletter, with a simple promise: every 2 weeks I'd send you links to all the posts I published. Like everyone does. That was good to get an email subscriber every other day, but that was it.</p>
<p>After some months, traffic grew a little and I was getting 4-5 subscribers every day. This was better.</p>
<p>Then I realized that people will not subscribe to a newsletter if they don't gain an advantage from that. This is a key point. I rarely subscribe to a newsletter just to “stay in touch”. Sometimes I do, and when this happens to you, that’s a quality email subscriber. Someone that really wants to hear from you.</p>
<p>But to get to this level requires people to have received a lot of value from you already, in one way or another. Maybe they already subscribe to your YouTube videos or your podcast. It’s hard for a complete stranger to subscribe.</p>
<p>So I changed my strategy from asking to "Join my newsletter" to offering people something of value. This lets the conversation begin with me offering a valuable asset.</p>
<p>In my case, the valuable asset, in the beginning, was a little PDF with a collection of the best blog posts I had written on a subject, nicely organized as an ebook. </p>
<p>Most people coming to my blog didn’t read more than one page, so I thought that creating a nice little ebook was a good way to show them what I had to offer. This increased signups a lot.</p>
<h2 id="heading-ups-and-downs">Ups and downs</h2>
<p>Having a blog is not all fun and games. There are many things that might give you a hard time on your journey.</p>
<p>Realizing this is a first step in the right direction.</p>
<h3 id="heading-writers-block">Writer's block</h3>
<p>Writer's block is a thing. I have no general advice on this, and whole books were written on the subject so there's a lot of better advice out there than what I could come up with.</p>
<p>My solution when it comes to not knowing what to write about is to pick a subject I want to learn, and start learning it in public. Right as I write this, I am learning a completely new thing (Arduino and electronics sensors) while re-discovering the old electronics topics I studied back in school.</p>
<p>I am shooting videos while I learn this thing, and writing blog posts on the topics that are better suited for blog posts (no, I'm not limiting myself to blogging, I also like doing videos).</p>
<p>If a topic is boring to me, I just don't write about it because if I'm bored writing, I will write a boring article. So I try to write about things I'm interested in and excited about.</p>
<h3 id="heading-imposter-syndrome">Imposter syndrome</h3>
<p>Every person, sooner or later, is going to suffer from this thing which we label <em>imposter syndrome.</em> You might have this feeling now, but you don’t know that it has a name attached.</p>
<p>Let me describe some situations where you might find imposter syndrome in the wild.</p>
<p>You are a developer, have no Computer Science degree, and you feel people that have the CS degree know a lot more than you, and you should get one too in order to be called a developer.</p>
<p>You work on a project and you call it a little side project, not a real project, because – you know – it’s just a simple app.</p>
<p>You constantly belittle yourself, and have low confidence in your abilities.</p>
<p>You think other developers know a lot more than you do.</p>
<p>You think someday someone will find out that you are not worth your job position, as you can’t solve the coding interview quiz #423 from a random book.</p>
<p>You think you don’t belong to the <em>coder’s club.</em></p>
<p>In the case of blogging, you’d like to start blogging but you fear other’s opinions and even think that you can’t add anything new to the table, so you don’t even start.</p>
<p>What's the solution to this problem?</p>
<p>I don't know if it applies to you, but when I start to feel this way, I try to put myself in the learner's shoes. I am not teaching. I am learning in public. Most of the time.</p>
<p>If this is not enough, realize how far you have come from where you started. Look back. There was a day when you could not even figure out how to start the computer. What code even was. You didn’t know you could actually create programs and make the computer do what you want.</p>
<p>Look at you now. You are the best version of yourself and yet you can be perfectly sure that tomorrow you’ll be an even better version. You are improving. Just like your blog posts.</p>
<h3 id="heading-working-in-public">Working in public</h3>
<p>Working in public can be nerve-wracking. Well, it <em>is</em> for me. You don't really know who is watching your work, and what they really think of it.</p>
<p>You're one step away from an intolerant expert judging your work as not relevant.</p>
<p>And maybe the creator of a library is looking at your tutorial on it, thinking you didn't get it right.</p>
<p>But looking at the opposite side of the spectrum, by learning in public you are forced to grow.</p>
<p>Step up the game.</p>
<p>You need to put a lot of effort to make your work great in the eyes of a lot of people.</p>
<h3 id="heading-burnout">Burnout</h3>
<p>It's easy to feel overwhelmed by all the things you are doing. Thinking about new content, writing the actual content, writing guest posts, trying to promote the content as much as you can – but without being spammy, and replying to comments and feedback.</p>
<p>This is not unique to blogging, of course. I have seen this even more in the YouTube space. There, it's even worse to me. You are putting your face and voice in front of a lot of people, instead of just your words and pictures like in a blog post.</p>
<p>My best advice to avoid burnout is to choose a minimalistic approach and to pick a topic that deeply interests you.</p>
<p>If you write about things you are passionate about, you will never have a shortage of things to write about. Your list will be 3 miles long.</p>
<p>Choosing a minimalistic approach means that you have to cut down anything that's not essential. I do not have comments on my blog. I need to care less about what people <em>think</em>, which has the drawback of creating less community, but also has the positive of causing me less stress.</p>
<p>Also, I do not generally promote the content I write on social media or other outlets, except if it is a special article that I really want to be seen, and I do not usually write guest posts on other blogs.</p>
<p>Such activities can be limited once the blog is up and running and you get a fair share of visits every day. So with the increase of views and stress given by many people looking at your work every day, you get the benefit of focus.</p>
<h3 id="heading-lower-your-expectations">Lower your expectations</h3>
<p>If you keep your expectations low, you will never be deluded. Don't expect your blog to be an overnight success. It will not happen. Just like it does not happen with a YouTube channel or a podcast. It's hard. Except for some lucky ones, maybe.</p>
<p>This is why blogging about things you are passionate about is beneficial. If you write about things you always wanted to write about, and will even write if no one is reading, then you are on the right track.</p>
<p>Then if success will ever come to you, you'll be more than ready for it.</p>
<h3 id="heading-trolls-and-negative-feedback">Trolls and negative feedback</h3>
<p>The Internet can be a wild place, and I am sure I don't have to explain this to you. When people write comments online, they can be mean. Sometimes. Most of the time they are not. </p>
<p>I do not have comments on my blog directly, but I do receive feedback via email and on Twitter. And on YouTube videos.</p>
<p>And the rare day I get one blog post featured on Reddit or Hacker News, two sites relevant for my content, I get very stressed about looking at comments.</p>
<p>It must be me, and most of the times comments are wildly positive, which is great. But I heard somewhere that our brain is much more receptive to negative feedback, and I can certainly confirm that I remember bad feedback more than positive feedback. It can take 10 positive comments to make up for a single negative one.</p>
<p>I might be over-sensitive but removing comments altogether from my blog removed the handbrake. I do not have to worry if some content does not resonate with people.</p>
<p>I wrote it, it's like that, I did my best to make sure it's "correct" to my best judgment, and I am off to the next one.</p>
<p>Your mileage might vary.</p>
<h3 id="heading-ignore-vanity-metrics">Ignore vanity metrics</h3>
<p>I have the incredible experience of having enough visitors to be surprised every day of the number of people visiting the blog. </p>
<p>I open Google Analytics at a random point in time during the day and I see the number of people. Then I get back to whatever I was doing. It's kind of addictive, but also useless.</p>
<p>Does that affect my day? No.</p>
<p>Does that change what I'm going to do next? No.</p>
<p>Same for email subscribers. Does it really matter how many people are on the list? No.</p>
<p>What matters the most is that people resonate with your ideas and learn from your work.</p>
<p>Even if it is just a handful of people.</p>
<p>The rest is useless.</p>
<h3 id="heading-blogging-is-lonely">Blogging is lonely</h3>
<p>Blogging is lonely, in the same way that writing a book is lonely. Also working in your secret laboratory is lonely. Being a YouTuber is lonely. Being a remote freelancer is lonely.</p>
<p>There's not much of a solution for this.</p>
<p>Other than accept it, and realize that some people might be more happy to be lonely. I am definitely an introvert and I thrive in a lonely environment, spending days in the silence.</p>
<p>That's probably why I like blogging.</p>
<h3 id="heading-it-takes-time">It takes time</h3>
<p>Let's say it out loud: it's going to take a lot of time. There is no way that your blog will be an overnight success. It will take many months and possibly years before you will see a rising tide of visitors to your blog. Maybe. If you did it alright.</p>
<p>This is a harsh truth, but it's one I think is necessary because I don't want you to believe that success is easy to achieve, and I want to set the right expectations. Time, persistence, showing up every day. This is what it takes, for any kind of success in any kind of activity.</p>
<p>It's a long game, but one that will eventually give you a lot of satisfaction.</p>
<h2 id="heading-making-money-with-a-blog">Making money with a blog</h2>
<p>A blog can be a great launch point for various projects that can make you money.</p>
<p>There’s absolutely no need for your blog to make money if you don’t want it to. But it’s good to know what your options are. In this last chapter, I’m going to explain at a high level the main options for “monetizing” a blog.</p>
<h3 id="heading-get-more-clients-for-your-business">Get more clients for your business</h3>
<p>The first and easiest way, I'd say, is to offer your services.</p>
<p>This especially works with non-location specific services. For example, if you are a plumber it might be harder. Not impossible, especially in large cities, but other channels could work better.</p>
<p>But if your business or activity is not linked to a specific location, a blog can be a great promotion for your business.</p>
<p>You can write articles that position you as an expert in the field you work in, and people will get in touch using the tools you give them: email, chat, or whatever you want.</p>
<p>I’ve seen this applied countless times, and it can lead to big opportunities in consulting. I have also experimented this first-hand when I started my career.</p>
<h3 id="heading-advertising-affiliates-and-sponsors">Advertising, affiliates, and sponsors</h3>
<p>When your blog starts to gain a consistent number of visitors, that’s when it can make you some money in what’s usually called “passive income”.</p>
<p>There are 3 ways, mostly: advertising, affiliates, and sponsors. This is the difference: advertising is banner or text ads that appear on your page. You typically add a code to the site and then forget about it.</p>
<p>There is a broker, like Google Ads or Mediavine or BuySellAds that will take care of everything for you. They'll find companies that want to show their ads, and their ads will be displayed on your blog. You get paid by ad views and/or ad clicks. It’s the simplest method you can find, although it usually requires a high number of page views to work.</p>
<p>Affiliates work in a different way: you get paid when people purchase a product coming from a link put on your website. </p>
<p>A common affiliate system is Amazon affiliate links. I’m sure you’ve seen them everywhere, under YouTube videos, under Instagram posts, and so on. </p>
<p>When Amazon makes a sale, you get a percentage of that. Same works for other smaller affiliate programs. </p>
<p>For affiliate links, you need to generate a specific link and depending on the frequency you have to do that, and the number of products or programs you promote, it will require more work on your part.</p>
<p>Sponsors work in a different way, and you typically need to get in touch with companies via email or phone. They will usually pay a flat fee for a month (or more) of sponsoring. You typically need to put a banner on the site or talk about their products in your posts.</p>
<h3 id="heading-selling-your-own-products">Selling your own products</h3>
<p>The system I like the most is using the blog to promote your own products.</p>
<p>It’s similar to promoting your services, but with products, it requires less work on your part and it can scale very easily.</p>
<p>Sure, you need a product beforehand. And you need a product that you know will be relevant and useful to people who read your posts.</p>
<p>But once you have it, you can promote it to your readers, without paying for ads, and without having to run an affiliate program yourself. Then, all your work – your blog and your products – are all aligned in the same direction: making useful things for the people you want to interact with.</p>
<h2 id="heading-final-words">Final words</h2>
<p>I hope this book was useful to you, and I really hope it might be the inspiration you need to create your own blog.</p>
<p><a target="_blank" href="https://flaviocopes.com/page/book-blog/">Download a PDF and ePub version of the <strong>How to Start a Blog</strong> book here</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Technical Blogging Basics – How to Write Articles as a Developer ]]>
                </title>
                <description>
                    <![CDATA[ Software developers work on designing, coding, testing, and delivering the software we use every day. And whatever that developer's particular specialty, they know a lot about a lot of things – which means they should share that knowledge.  Publishin... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/technical-blogging-basics/</link>
                <guid isPermaLink="false">66be0020eb957b90783c1c6d</guid>
                
                    <category>
                        <![CDATA[ blog ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tapas Adhikary ]]>
                </dc:creator>
                <pubDate>Thu, 15 Apr 2021 16:35:42 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/04/freeCodeCamp-Cover-3.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Software developers work on designing, coding, testing, and delivering the software we use every day. And whatever that developer's particular specialty, they know a lot about a lot of things – which means they should share that knowledge. </p>
<p>Publishing articles and creating video content are great ways to share what we learn as developers. You may have your own blog or you may write for a publication. In either case, you should follow specific processes to write well and feel great about it.</p>
<p>This article will cover the fundamentals of blogging to help you write great articles while not dropping the ball as a developer.</p>
<h1 id="heading-tldr">TL;DR</h1>
<p>This tweet summarizes most of the points at a high level. However, we will talk about some real-life experiences and learning how to blog in more detail. Please keep reading and enjoy.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/tapasadhikary/status/1378224989288062982"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<h1 id="heading-know-your-purpose">Know your purpose</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/intent.png" alt="Image" width="600" height="400" loading="lazy">
<em>Know your purpose</em></p>
<p>We all need a purpose when we start something and the motivation to continue it. The intent behind our actions and our motivation may be different for everyone. You need to find your intent or purpose that explains why you want to start a blog or share your content. </p>
<p>In most cases, the simple answer could be <code>Passion</code>. Fair enough! It could also be a business strategy, or perhaps you want to teach others. Maybe you want to keep learning – practically anything that gets you started will work.</p>
<p>As a developer, we learn something new all the time. It is close to impossible to memorize every piece of what we've learned. When we document those lessons and bits of information, we might as well make that knowledge reusable. </p>
<p>This is why writing an article about something you've learned recently is an excellent idea, and gives you very clear intent for your progressive documentation.</p>
<p>💡 <strong>Tips:</strong> Create a private GitHub repo with a markdown file. When you encounter something new, add a note about it (with code, if needed) in the file. </p>
<p>The contents of this file will then become an excellent source for your future articles. I maintain a file called TIL_2021.md (Things I Learned in the year 2021) for the same purpose.</p>
<p>When I decided on blogging, I intended to learn by sharing knowledge. If you want to learn something deeply, start teaching it. Blogging is a great way to do that.</p>
<h1 id="heading-find-your-motivation">Find Your Motivation</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/motivation.png" alt="Image" width="600" height="400" loading="lazy">
<em>Do not give up, stay motivated</em></p>
<p>Motivation can do wonders when you have it, but it can be hard to continue without it. As a content creator, your biggest motivation is likely to hear feedback from your readers. Positive feedback and constructive criticism always help you improve the content you create.</p>
<p>But there is a problem. Initially, you may not have very many readers to give you feedback. The chances of disappointment are higher if you are an individual blogger. So it helps to have a lot of self-motivation to sustain and continue your work.  </p>
<p>Remember – do not give up, stay motivated. As a developer, you have plenty to learn, share, and write about.</p>
<p>💡 <strong>Tips:</strong> If you want to start blogging as a developer, the developer community is helpful to stay connected and motivated. There are many incredible communities around like <a target="_blank" href="https://hashnode.com/@atapas/joinme">Hashnode</a>, <a target="_blank" href="https://dev.to/">Dev.to</a>, <a target="_blank" href="https://community.codenewbie.org/">Codenewbie</a>, <a target="_blank" href="https://hackernoon.com/">Hackernoon</a>, <a target="_blank" href="https://forum.freecodecamp.org/">freeCodeCamp</a>, <a target="_blank" href="https://girlswhocode.com/">GirlsWhoCode</a>, and many more.</p>
<h1 id="heading-do-your-research">Do Your Research</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/research.png" alt="Image" width="600" height="400" loading="lazy">
<em>Research is the key. Content rules all.</em></p>
<p>In blogging, content rules all. As developers, we may have multiple ideas, problem-solving steps, and new learnings we want to get down. But the most crucial part is being able to turn it into quality content. It's usually necessary to take the time required to research your topic thoroughly.</p>
<p>Let me take an example of content research here. Say you have solved a problem using <code>Linked List</code>, and it is the first time you have used one. You are so excited that want to share what you've learned. Here are a few points to consider:</p>
<ul>
<li>You need to understand <code>Linked List</code> generically and beyond the context of the problem you have solved.</li>
<li>You need to understand both the pros and cons of using <code>Linked List</code>.</li>
<li>You need to set up a few examples that demonstrate how best to use it.</li>
<li>You need to make sure you explain the way you've solved the problem clearly so people can use it in their own use cases.</li>
</ul>
<p>💡 <strong>Tips:</strong> Once you figure out what you need to know, you can learn about it from any well-established resource. Perform a search wionth <code>Google</code>, <code>Quora</code>, <code>Reddit</code>, and so on. <code>Stackoverflow</code> is another excellent platform to check for info on the topic as well. </p>
<p>Make sure you note down what you learn as you make progress. These notes will eventually turn into the article you write and publish.</p>
<h1 id="heading-plan-the-content-structure">Plan the Content Structure</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/plan.png" alt="Image" width="600" height="400" loading="lazy">
<em>Plan the content structure</em></p>
<p>Once you have your content research done, the next thing is to plan the structure of the article. Excellent article content can go ignored by readers if you have an inadequate and messy content structure. </p>
<p>Here are a few tips to help you structure your article content in a readable way:</p>
<ul>
<li><strong>Title:</strong> A compelling title can help influence many readers to visit your article. No matter what, people hardly miss reading the title of the article. Keeping it catchy will increase the traffic to your content.</li>
<li><strong>Cover Image:</strong> A relevant cover image makes your article very attractive. When you share your articles on social media like Twitter, Linkedin, or Reddit, a creative cover image may attract your readers.</li>
<li><strong>Introduction:</strong> this section describes the content at a high level. It can be an initial paragraph or a <a target="_blank" href="https://en.wikipedia.org/wiki/Wikipedia:Too_long;_didn%27t_read">Tl;DR</a> section explaining what you plan to cover in the article.</li>
<li><strong>Headings and Sub Headings:</strong> You should break the content into logical sub-topics. To do that, create sections and provide relevant headings and sub-headings. For example, I have created multiple sections with headings like <code>Know Your Purpose</code>, <code>Find Your Motivation</code>, and so on in this article.</li>
<li><strong>Graphics: "</strong>A picture is worth a thousand words." This is often true, so think of supporting your content with some graphs, pictures, and so on.</li>
<li><strong>Summary:</strong> A summary section at the end helps your reader recap what they have learned from the article so far. It is also helpful for a returning reader to recollect the content by going through the summary.</li>
<li><strong>Important Links:</strong> You may want to end your article with a list of related links for further reading. You can use the same section to list the links to your previously published articles as well.</li>
</ul>
<p>💡 Tips: Try to use a consistent content structure for your articles. Your readers will get used to it and find it easy to follow.</p>
<h1 id="heading-writing-tools">Writing Tools</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/Tools.png" alt="Image" width="600" height="400" loading="lazy">
<em>Using tools to make you efficient and smarter</em></p>
<p>Creating quality content takes time. You can make yourself a productive and efficient content creator by using some of the tools available for free. Here are a few that you may find helpful,</p>
<p>⚒️ <a target="_blank" href="https://www.notion.so/">Notion</a>: this tool can help you manage your personal and professional work TODOs in an efficient manner. Anytime an article idea occurs to you or you solve an interesting problem, create a task in the tool. You can prioritize, schedule, and assign tasks with ease.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-29.png" alt="Image" width="600" height="400" loading="lazy">
<em>Task planner with Notion</em></p>
<p>⚒️ <a target="_blank" href="http://grammarly.com">Grammarly</a>: If you are a non-native English speaker like me, there are times when you might not be familiar enough with the language's grammar rules. </p>
<p>In this case, a tool like <code>Grammarly</code> is a life-saver in many ways. It detects grammatical and spelling mistakes, suggests re-phrasing for complex sentences, corrects passive to active voice, and more. You can start with the free version and go for the premium based on your usage.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-30.png" alt="Image" width="600" height="400" loading="lazy">
<em>Correction suggestion with Grammarly</em></p>
<p>⚒️ <a target="_blank" href="https://hemingwayapp.com/">Hemingway Editor</a>: This is another excellent tool to support you with your English writing. You can use this editor along with <code>Grammarly</code> if you want. I love the way it indicates inadequate use of adverbs, active/passive voice, and complicated words and phrases.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-31.png" alt="Image" width="600" height="400" loading="lazy">
<em>Categorized suggestions with the Hemmingway Editor</em></p>
<p>⚒️ <a target="_blank" href="https://www.canva.com/">Canva</a>: Canva is a tool where you make designs, art, and unleash your creativity. You can create cover images, article graphics, animated gifs, and more without any prior experience with <code>Canva</code>. The generous free plan is sufficient to get started.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-32.png" alt="Image" width="600" height="400" loading="lazy">
<em>Create and organize your creativity using Canva</em></p>
<p>⚒️ <a target="_blank" href="https://pixteller.com/">Pixteller</a>: This is an alternate suggestion for creating cover images, graphics, and so on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-33.png" alt="Image" width="600" height="400" loading="lazy">
<em>Pixteller to create images</em></p>
<p>⚒️ <a target="_blank" href="https://getsharex.com/downloads/">ShareX</a>: It is a super cool productivity tool for screen captures, making animated images, file sharing, and so on.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-34.png" alt="Image" width="600" height="400" loading="lazy">
<em>Create, gifs, screenshots, videos</em></p>
<p>⚒️ <a target="_blank" href="https://obsproject.com/download">OBS Studio</a>: this is a free, open-source video recording and streaming tool. You may be wondering, why do I need this for blogging? </p>
<p>At times, you may want to create a video, upload it to YouTube or Vimeo, and link to it from your articles. You can use the OBS Studio tool to create quality videos with lots of customization options.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/image-35.png" alt="Image" width="600" height="400" loading="lazy">
<em>Create high quality videos</em></p>
<p>⚒️ <a target="_blank" href="https://serpsim.com/">SERP Snippet Generator</a>: SERP (Search Engine Result Page) is the page we see after entering a query into search engines like Google or Bing. A SERP snippet generator helps you finalizing a suitable title and meta description of your article post before you publish it. </p>
<p>See the image below to figure out a title and description within a limit to show the search result correctly.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/serpsim_snapshot-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>SERP Generator</em></p>
<h1 id="heading-do-lots-of-proofreading">Do Lots of Proofreading</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/reading.png" alt="Image" width="600" height="400" loading="lazy">
<em>Review, re-review, re-re-review, and so on...</em></p>
<p>When you write something, you need to check for errors and get your article reviewed before publishing or sharing it. This process of checking and making sure your content is ready to publish is called proofreading. In general, you should check for:</p>
<ul>
<li>Spelling errors</li>
<li>Grammatical mistakes</li>
<li>Formatting issues</li>
<li>Punctuation</li>
<li>Accuracy</li>
<li>Language Consistency</li>
</ul>
<p>When it comes to proofreading and reviewing, here is a famous quote for some inspiration:</p>
<blockquote>
<p>“I've found the best way to revise your own work is to pretend that somebody else wrote it and then to rip the living sh*t out of it.” ― Don Roff</p>
</blockquote>
<h1 id="heading-publish-your-article">Publish Your Article</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/publish.png" alt="Image" width="600" height="400" loading="lazy">
<em>Don't keep it to yourself, just publish it</em></p>
<p>If you are happy with the article after your proofreading, the next logical step is to publish it. You may want to schedule it to publish on a particular day of the week, or you may want to publish right then – it is up to you. </p>
<p>As a general principle, it is better to publish when an article is ready from your side. Similarly, you should never rush to publish an article to meet a deadline.</p>
<p>💡 <strong>Tips:</strong> Publishing your article should be part of the entire plan. If you have to publish an article by a specific date, work backward to plan the content accordingly. Do not compromise the quality of the content in the rush of publishing it.</p>
<h1 id="heading-share-your-article-on-social-media">Share Your Article on Social Media</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/socialize.png" alt="Image" width="600" height="400" loading="lazy">
<em>Social media platforms are a big booster</em></p>
<p>Social media is an extremely powerful tool. And you should make positive use of it as a blogger. </p>
<p>Publishing your article may not be enough if you want it to reach as many potential readers as it can. It's therefore a good idea to share your article on various social media platforms. </p>
<p>Here a few platforms where you should share your article links:</p>
<ul>
<li><a target="_blank" href="https://twitter.com/">Twitter</a></li>
<li><a target="_blank" href="https://www.linkedin.com/feed/">LinkedIn</a></li>
<li><a target="_blank" href="https://www.reddit.com/">Reddit</a></li>
<li><a target="_blank" href="https://news.ycombinator.com/">HackerNews</a></li>
<li><a target="_blank" href="https://facebook.com/">FaceBook</a></li>
</ul>
<p>There are a few more platforms where link sharing alone may not work very well. You can create a cover image/graphic suitable to the topic and upload the image (and share the link) to places like <a target="_blank" href="https://www.instagram.com/">Instagram</a> and <a target="_blank" href="https://in.pinterest.com/">Pinterest</a> using the right hashtags.</p>
<p>💡 Tips: Make sure you follow the policies and guidelines specified by each social media platform when you share your blog link. If you don't, your account could be flagged or banned. </p>
<p>Another exciting way to share your content is by republishing it. You can republish your article on another blogging platform if you are allowed to do so. For example, an article written on the <code>Hashnode</code> platform can be republished on the <code>Dev.to</code> platform and vice-versa. </p>
<p>💡 <strong>Tips:</strong> You can set the <code>Canonical URL</code> to the link of the original article when you republish it. This is a way to tell the search engines like Google which is the original copy of the content and eliminate duplicate content.</p>
<h1 id="heading-good-blogging-platforms">Good Blogging Platforms</h1>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/04/paltform.png" alt="Image" width="600" height="400" loading="lazy">
<em>A Blogging platform to get you started</em></p>
<p>Alright, now we know how to write an article and share it so others can read it. Now let's learn about a few blogging platforms where you can get started. </p>
<p>Here are a few platforms to start blogging and grow as part of the community.</p>
<ul>
<li><a target="_blank" href="https://hashnode.com/@atapas/joinme">Hashnode</a> </li>
<li><a target="_blank" href="https://dev.to/">DEV Community</a> </li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/">freeCodeCamp News</a>    </li>
<li><a target="_blank" href="https://hackernoon.com/">HACKERnoon</a> </li>
<li><a target="_blank" href="https://daily.dev/blog">daily.dev</a></li>
<li><a target="_blank" href="https://www.codenewbie.org/">Codenewbie Community</a></li>
<li><a target="_blank" href="https://www.educative.io/edpresso">Educative Edpresso Shorts</a> </li>
<li><a target="_blank" href="https://cofounderstown.com/">CoFoundersTown</a> </li>
</ul>
<p>There are many publications and organizations who hire and pay content creators. As a developer-blogger, this may open up many freelancing opportunities and let you get compensated for sharing your content. You can also contribute to open-source documentation and other projects.</p>
<h1 id="heading-in-summary">In Summary</h1>
<p>To summarize,</p>
<ul>
<li>Blogging as a developer is manageable as a side activity without compromising your work output.</li>
<li>Problems you've solved and your searches on Google, Quora, and Stackoverflow could be a helpful source of writing ideas.</li>
<li>Find your purpose before you start a blog and write articles. The intent behind your work can be trivial or more significant – either way is fine.</li>
<li>Stay motivated.</li>
<li>Use the right tools to make you a productive writer.</li>
<li>Plan your content structure, proofread your articles, and publish them.</li>
<li>Use social media as a tool to share your articles.</li>
<li>There are some fantastic blogging platforms out there. Give them a try and be part of the developer communities.</li>
<li>Keep learning, keep writing, and keep sharing.</li>
</ul>
<h1 id="heading-before-we-end">Before We End...</h1>
<p>I hope you've found this article insightful, and that it helps you start using these concepts more effectively in blogging. </p>
<p>Let's connect. You will find me active on <a target="_blank" href="https://twitter.com/tapasadhikary">Twitter (@tapasadhikary)</a>. Please feel free to give a follow.</p>
<p>You may also like these articles:</p>
<ul>
<li><a target="_blank" href="https://blog.greenroots.info/how-to-find-blog-content-ideas-effortlessly-ckghrjv5200o7rhs1ewn40102">How to find blog content ideas effortlessly?</a></li>
<li><a target="_blank" href="https://blog.greenroots.info/where-to-begin-some-practical-tips-from-a-beginner-ckcu5llil00ncw8s11dr1fh2w">Where to begin? Some practical tips from a beginner</a></li>
<li><a target="_blank" href="https://blog.greenroots.info/why-do-you-need-to-do-side-projects-as-a-developer-ckhn5m5km05teajs1fvjd7u5f">Why do you need to do Side Projects as A Developer?</a></li>
<li><a target="_blank" href="https://blog.greenroots.info/16-side-project-github-repositories-you-may-find-useful-ckk50hic406quhls1dui2d6sd">16 side project GitHub repositories you may find useful</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/learn-something-new-every-day-as-a-software-developer/">How to Learn Something New Every Day as a Software Developer</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Build a Blog Using a Static Site Generator and a CDN ]]>
                </title>
                <description>
                    <![CDATA[ By Aaron Katz I wanted to set up a fun project for myself to learn some new technologies. And this time I decided I wanted to learn a bit about Static Site Generators (SSGs). My goal was to build a blog using an SSG and have it deploy any time ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-build-a-blog-using-a-static-site-generator-and-a-cdn/</link>
                <guid isPermaLink="false">66d45d5fbd438296f45cd387</guid>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ content delivery network  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Netlify ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Static Site Generators ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 29 Jan 2021 16:46:23 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c95e0740569d1a4ca0ebe.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Aaron Katz</p>
<p>I wanted to set up a fun project for myself to learn some new technologies. And this time I decided I wanted to learn a bit about <strong>Static Site Generators</strong> (SSGs).</p>
<p>My goal was to build a blog using an SSG and have it deploy any time the code repository changed. You can see the result at <a target="_blank" href="https://caliburnsecurity.com">https://caliburnsecurity.com</a>.</p>
<h2 id="heading-blog-requirements">Blog Requirements</h2>
<p>Below are the requirements I put together when determining what I wanted my blog to support.</p>
<ul>
<li>Support Markdown for content generation</li>
<li>Syntax highlighting</li>
<li>Code line numbering</li>
<li>"Serverless"</li>
<li>Ready made themes/plugins - I am so NOT a frontend developer</li>
<li>SEO capabilities</li>
<li>Browse by keyword/category</li>
<li>Search support (because this is statically generated, searching is through Google's index - there are other articles that discuss how to add a dynamic JavaScript powered search)</li>
<li>RSS support</li>
<li>Version controlled</li>
<li>Static - no dynamic content (with a neat side effect of shrinking the site's attack surface and improving security)</li>
</ul>
<h2 id="heading-so-what-actually-is-a-static-site-generator">So what actually is a Static Site Generator?</h2>
<p>In short, an SSG is a framework designed to manage your website and transform it into a site serving only static pages.</p>
<h2 id="heading-why-use-a-ssg-to-build-the-blog">Why use a SSG to build the blog?</h2>
<p>One thing that took me some time to comprehend was why I would use a static site, if I already had a CMS. There were so many articles online about using an SSG with a headless CMS...but why?  </p>
<p>Best I can tell, the benefits are simply that you have more flexibility using familiar frameworks such as React or Vue, while using a CMS to handle all content. </p>
<p>However, as I am by no means a frontend developer, I was close to scrapping this project. I thought "Oh well, I should just use Ghost - it's only $5/month if hosted on a platform like DigitalOcean, and is an all-in-one platform to serve content as well as manage the content".</p>
<p>However, I really wanted to try to learn something new, and see if I could just deploy a blog for free using only Markdown.</p>
<p>As always ends up happening, what I was hoping would take a few hours took quite a bit more time as I went down the rabbit hole of research into various technologies. </p>
<p>I played around with several different technologies, such as (not all of these are SSGs, more on that later):</p>
<ul>
<li>Pelican (Python)</li>
<li>Hugo (Go)</li>
<li>Hexo</li>
<li>Gridsome (Vue - JS)</li>
<li>VuePress (Vue - JS)</li>
<li>Ghost</li>
<li>Gatsby (React - JS)</li>
<li>Jekyll (Ruby)</li>
</ul>
<h3 id="heading-why-i-chose-hugo">Why I Chose Hugo</h3>
<p>I won't go in too much detail on all of the technologies I looked at. But in general, I found Hugo to be super quick to set up and build, and just the <strong>SIMPLEST</strong> of all the options.  </p>
<p>While I know this is similar to Jekyll, I really just didn't want to deal with configuring a Ruby environment, and the speed of Hugo left everything else in the dust.</p>
<h2 id="heading-how-to-start-building-the-blog">How to Start Building the Blog</h2>
<p>For this exercise, let's build a static blog hosted by Netlify (free!).</p>
<p>Note: I'll be using PowerShell on my Windows box for this tutorial, so please recall that if copy/pasting.</p>
<h3 id="heading-make-sure-you-have-these-dependencies">Make sure you have these dependencies:</h3>
<ul>
<li>Git</li>
<li>Visual Studio Code (or your preferred editor)</li>
<li>Hugo binary</li>
</ul>
<h3 id="heading-heres-a-high-level-overview-of-our-workflow">Here's a high level overview of our workflow:</h3>
<ol>
<li>Download/Install Hugo</li>
<li>Create a Hugo project</li>
<li>Add and configure a theme</li>
<li>Add to Git</li>
<li>Deploy to Netlify</li>
<li>(Optional) Configure the free Netlify CMS</li>
</ol>
<h3 id="heading-download-or-install-hugo">Download or install Hugo</h3>
<p>To <a target="_blank" href="https://gohugo.io/getting-started/installing/">install Hugo</a>, I went over to their <a target="_blank" href="https://github.com/gohugoio/hugo/releases">GitHub Releases</a> page and downloaded their standalone Windows x64 binary. I placed it in my Projects directory, where we will be creating our site (you can always install it properly/add the binary to your PATH, but I wanted quick).</p>
<h2 id="heading-how-to-create-the-hugo-site">How to Create the Hugo Site</h2>
<p>To create a new site, simply run the below commands:</p>
<pre><code class="lang-powershell">.\hugo.exe new site hugo<span class="hljs-literal">-blog</span>
<span class="hljs-built_in">mv</span> .\hugo.exe .\hugo<span class="hljs-literal">-blog</span>
<span class="hljs-built_in">cd</span> .\hugo<span class="hljs-literal">-blog</span>
.\hugo.exe server <span class="hljs-literal">-D</span> -<span class="hljs-literal">-gc</span>
</code></pre>
<p>We now have our project created, and have just started the Hugo server. We used the <strong>-D</strong> flag to tell Hugo to show draft content, and I typically add in <strong>--gc</strong> to ensure that cleanup is run each time by clearing the cache.  </p>
<p>You can access your site at http://localhost:1313.</p>
<h3 id="heading-understanding-the-directory-structure">Understanding the directory structure</h3>
<p>You should now see the following directory structure:</p>
<pre><code class="lang-shell">|__archetypes
|__assets *this will not show up by default
|__config *this will not show up by default
|__content
|__data
|__layouts
|__static
|__themes
|__config.toml
</code></pre>
<ul>
<li><strong>archetypes</strong>: Content template files with pre-configured front matter. We won't really be touching this.</li>
<li><strong>assets</strong>: Store any files processed by <a target="_blank" href="https://gohugo.io/hugo-pipes/">Hugo Pipes</a>. This is out of scope for this tutorial.</li>
<li><strong>config</strong>: Optional directory to store configuration files. We won't be doing anything too crazy, so we will just use the default config.toml file.</li>
<li><strong>content</strong>: This is where your content lives - your posts and pages. The top level folders within this directory are treated as a <em>section</em>.</li>
<li><strong>data</strong>: Contains configuration files used by Hugo. I never had a need to touch this directory.</li>
<li><strong>layouts</strong>: Stores partial or full page HTML templates for the site. Anything in here can overwrite a corresponding entry from your theme, allowing you to customize the theme without modifying the theme's actual files.</li>
<li><strong>static</strong>: Store any static content, such as images, CSS, or scripts. Anything in this folder is copied as-is, without any modification or interpretation by Hugo. This is where you will store your media, such as images, for reference in your blog posts.</li>
<li><strong>themes</strong>: The directory where you will install any Hugo themes.</li>
<li><strong>config.toml</strong>: The default site configuration. You can use a separate directory if you want to separate different environments.</li>
</ul>
<h2 id="heading-how-to-add-your-first-theme">How to Add Your First Theme</h2>
<p>For this blog, we will use the <a target="_blank" href="https://github.com/EmielH/tale-hugo">tale</a> theme for Hugo. Run the following commands from the root of the project:</p>
<pre><code class="lang-powershell">git submodule add https://github.com/EmielH/tale<span class="hljs-literal">-hugo</span>.git .\themes\tale
</code></pre>
<p>We will <strong>NOT</strong> be editing any files from the theme, but will make all modifications in the <strong>layouts</strong> folder discussed above. This will let us always update the submodule to update our theme without worry that we will overwrite any changes we have made.</p>
<p>To initialize the theme, edit the <strong>config.toml</strong> in your root directory and add the following lines (while also editing the defaults):</p>
<pre><code class="lang-toml"><span class="hljs-comment"># Theme Settings</span>
<span class="hljs-attr">theme</span> = <span class="hljs-string">"tale"</span>
<span class="hljs-section">[params]</span>
  <span class="hljs-attr">Author</span> = <span class="hljs-string">"Aaron Katz"</span> <span class="hljs-comment"># Add the name of the author (this theme only supports one author)</span>
<span class="hljs-section">[author]</span>
  <span class="hljs-attr">name</span> = <span class="hljs-string">"Caliburn Security"</span> <span class="hljs-comment"># Used by the foot copyright</span>
</code></pre>
<p>There we go, the theme is now active! (Note that in many cases, themes will require you to copy and paste the theme's <strong>theme.toml</strong> file into your <strong>config.toml</strong>)</p>
<p>Go ahead and check out your page – every time you save a file Hugo rebuils the site live.</p>
<h3 id="heading-how-to-modify-theme-files">How to modify theme files</h3>
<p>One issue with the current theme is that non-post content will be displayed in the homepage list.  </p>
<p>To change this, let's copy the <strong>.\themes\tale\layouts\index.html</strong> page to <strong>.\layouts\index.html</strong>. </p>
<p>Once there, replace: <code>{{range (.Paginate .Site.RegularPages).Pages}}</code> with <code>{{ range where .Paginator.Pages "Section" "post" }}</code>. This will ensure only the "post" section will be displayed in the list.</p>
<p>I also wanted to add a brief footer, so go ahead and create a new file at <strong>.\layouts\footer.html</strong> and add the following code:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">footer</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span>
    <span class="hljs-symbol">&amp;copy;</span> <span class="hljs-tag">&lt;<span class="hljs-name">time</span> <span class="hljs-attr">datetime</span>=<span class="hljs-string">"{{ now }}"</span>&gt;</span>{{ now.Format "2006" }}<span class="hljs-tag">&lt;/<span class="hljs-name">time</span>&gt;</span> {{ .Site.Author.name }}
    <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">footer</span>&gt;</span>
</code></pre>
<h3 id="heading-how-to-add-google-analytics">How to Add Google Analytics</h3>
<p>I also wanted to add some Google Analytics to my blog, and I noticed the theme didn't incorporate this functionality.  </p>
<p>Luckily, Hugo makes adding analytics extremely simple. Open up the <strong>config.toml</strong> file and add the following line:</p>
<pre><code class="lang-toml"><span class="hljs-attr">googleAnalytics</span> = <span class="hljs-string">""</span> <span class="hljs-comment"># The UA-XXX number from Google Analytics</span>
</code></pre>
<p>Once the configuration is saved, copy the <strong>.\themes\tale\layouts\partial\head.html</strong> file to <strong>.\layouts\partial\head.html</strong> and add the following code right below the <em>head</em> tag:</p>
<pre><code class="lang-go">{{ template <span class="hljs-string">"_internal/google_analytics_async.html"</span> . }}
</code></pre>
<p>There we go, now we have Google Analytics working. Cool!</p>
<h2 id="heading-how-to-write-content">How to Write Content</h2>
<p>Let's add a nice About page so people know everything there is about me. :)</p>
<pre><code class="lang-powershell">.\hugo.exe new about.md
</code></pre>
<p>To ensure that this page is added to the main menu, add the following line to the page's front matter: <code>menu: main</code>.</p>
<p><em>Note: To build Hugo, which will generate the content under the <strong>.\public</strong> folder, simply run <code>.\hugo.exe</code></em></p>
<h3 id="heading-what-is-front-matter">What is front matter?</h3>
<p>This was a new term for me. Essentially, front matter is just structured metadata for your content. </p>
<p>By default, your template will add the following metadata fields to each page or post you create:</p>
<ul>
<li>title</li>
<li>date</li>
<li>draft</li>
</ul>
<p>Other potentially useful front matter elements are:</p>
<ul>
<li>description - This allows you to enter a description for the content.</li>
<li>expiryDate - Set a datetime for when the content should no longer be published.</li>
<li>keywords - The meta keywords for the content.</li>
<li>lastmod - The datetime for when the content was last modified (if you are using the enableGitInfo configuration command, this will be automatically set as the last time the file was mofieid in Git)</li>
<li>markup - When set to "rst", you can use reStructuredText instead of Markdown (this feature is experimental)</li>
<li>publishDate - Set a date in the future for the content to be displayed.</li>
<li>slug - The tail of the output URL. Defaults to the filename if not specified.</li>
<li>summary - The text used when providing a summary of the article. I find this useful if I don't want the first paragraph to appear in the summary, which is the typical default.</li>
<li> - Use the plural form of the taxonomy index, such as <em>tags</em> or <em>categories</em>.</li>
</ul>
<h4 id="heading-how-to-create-an-archetype-for-blog-posts">How to create an archetype for blog posts</h4>
<p>Let's go ahead and change the default front matter we see for blog posts. In the archetypes folder, create a new file called <strong>posts.md</strong> and add the following:</p>
<pre><code class="lang-yaml"><span class="hljs-meta">---</span>
<span class="hljs-attr">title:</span> <span class="hljs-string">"<span class="hljs-template-variable">{{ replace .Name "-" " " | title }}</span>"</span>
<span class="hljs-attr">date:</span> {{ <span class="hljs-string">.Date</span> }}
<span class="hljs-attr">draft:</span> <span class="hljs-literal">true</span>

<span class="hljs-attr">slug:</span> {{ <span class="hljs-string">.File.BaseFileName</span> }} <span class="hljs-comment"># Will take the filename as the slug. Feel free to change this to any format you like.  I like including this, so that I remind myself I have the option to change if I want.</span>

<span class="hljs-attr">summary:</span> <span class="hljs-string">""</span> <span class="hljs-comment"># Remove this if you want Hugo to just use the first 70 (configurable) characters of the post as the summary.</span>
<span class="hljs-attr">description:</span> <span class="hljs-string">""</span>

<span class="hljs-comment"># Lists</span>
<span class="hljs-attr">keywords:</span>
<span class="hljs-attr">tags:</span>
<span class="hljs-attr">categories:</span>
<span class="hljs-meta">---</span>
</code></pre>
<p>Now let's do one final build with <code>.\hugo.exe</code> and get ready to configure our Git repository.</p>
<h2 id="heading-how-to-configure-git">How to Configure Git</h2>
<p>Time to configure the project for Git:</p>
<pre><code class="lang-powershell">git init
git remote add origin &lt;YOUR GIT URL&gt;
git push <span class="hljs-literal">-u</span> origin master
</code></pre>
<p>Great, we now have our code stored within our repository, and we are ready for deployment!</p>
<h2 id="heading-how-to-deploy-your-blog">How to Deploy Your Blog</h2>
<p>Now that we have our site stored in Git, it's time to deploy! Almost done - I'll now show how to deploy to Netlify in under 10 minutes.</p>
<p>First, we need to create the Netlify application (feel free to create an account using any method available):</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-192.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Next, we need to create the site and tell it where our Git repository is for our Hugo content:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-193.png" alt="Image" width="600" height="400" loading="lazy">
<em>Tell Netlify where your site is located</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-194.png" alt="Image" width="600" height="400" loading="lazy">
<em>Select the repository</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-195.png" alt="Image" width="600" height="400" loading="lazy">
<em>These can be left at the default settings</em></p>
<p>Next up, we will set up a custom domain for our site:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-196.png" alt="Image" width="600" height="400" loading="lazy">
<em>Select the custom domain option</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-197.png" alt="Image" width="600" height="400" loading="lazy">
<em>Enter your custom domain</em></p>
<p>You should now see your domain with a message saying to <strong>Check DNS configuration</strong>. Click on that, and enter the provided DNS record information into whichever service provider manages your DNS records:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-198.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-200.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-201.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example configuration within my Cloudflare account</em></p>
<p>Once complete, wait a few minutes for the DNS settings to propagate, and then select <strong>Verify DNS configuration:</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-202.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Behold, your site is now live!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-203.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example of my new blog hosted on Netlify!</em></p>
<p>Last, we should set up SSL for our site as a best practice. Netlify offers the option to use <a target="_blank" href="http://letsencrypt.org/howitworks/">Let's Encrypt</a> to automatically provision a certificate for your application. To do so, simply select <strong>Provision certificate:</strong></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/01/image-204.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>Note: It can take quite some time for the certificate to be generated, so just be patient.</em></p>
<h3 id="heading-netlify-deployment-settings">Netlify deployment settings</h3>
<p>We have one final step before we are truly ready to use Netlify. Unfortunately, the version of Hugo used by Netlify is somewhat outdated by default. However, we can fix this by creating our own configuration for Netlify to follow when deploying our site.</p>
<p>First, create a file called <code>netlify.toml</code> in the root of your repository, and then add the following configuration:</p>
<pre><code class="lang-toml"><span class="hljs-section">[build]</span>
<span class="hljs-attr">publish</span> = <span class="hljs-string">"public"</span>
<span class="hljs-attr">command</span> = <span class="hljs-string">"hugo --gc --minify"</span>

<span class="hljs-section">[context.production.environment]</span>
<span class="hljs-attr">HUGO_VERSION</span> = <span class="hljs-string">"0.74.3"</span>
<span class="hljs-attr">HUGO_ENV</span> = <span class="hljs-string">"production"</span>
<span class="hljs-attr">HUGO_ENABLEGITINFO</span> = <span class="hljs-string">"true"</span>

<span class="hljs-section">[context.split1]</span>
<span class="hljs-attr">command</span> = <span class="hljs-string">"hugo --gc --minify --enableGitInfo"</span>

<span class="hljs-section">[context.split1.environment]</span>
<span class="hljs-attr">HUGO_VERSION</span> = <span class="hljs-string">"0.74.3"</span>
<span class="hljs-attr">HUGO_ENV</span> = <span class="hljs-string">"production"</span>

<span class="hljs-section">[context.deploy-preview]</span>
<span class="hljs-attr">command</span> = <span class="hljs-string">"hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"</span>

<span class="hljs-section">[context.deploy-preview.environment]</span>
<span class="hljs-attr">HUGO_VERSION</span> = <span class="hljs-string">"0.74.3"</span>

<span class="hljs-section">[context.branch-deploy]</span>
<span class="hljs-attr">command</span> = <span class="hljs-string">"hugo --gc --minify -b $DEPLOY_PRIME_URL"</span>

<span class="hljs-section">[context.branch-deploy.environment]</span>
<span class="hljs-attr">HUGO_VERSION</span> = <span class="hljs-string">"0.74.3"</span>

<span class="hljs-section">[context.next.environment]</span>
<span class="hljs-attr">HUGO_ENABLEGITINFO</span> = <span class="hljs-string">"true"</span>
</code></pre>
<p>All that's left to do is select <strong>Deploy site</strong> within the Netlify console, and your site is now live on a custom domain with SSL!</p>
<h2 id="heading-wrapup">Wrapup</h2>
<p>Whew! That was a lengthy blog post, but hopefully this shows how quick it is to get up and running with a "serverless" blog. Let's see what I learned :)</p>
<h3 id="heading-what-i-loved">What I loved</h3>
<ul>
<li>Super simple to build, just run <code>hugo serve</code></li>
<li>Live reload - make a change, save, and the page will reload</li>
<li>Just simple in general - I didn't need to deal with grunt, gulp, webpack, or others</li>
<li>Customizable output formats let you generate your static site, as well as a Google AMP site, JSON files, and so on.</li>
<li>FAST. Did I mention fast?</li>
<li>Can be deployed just about anywhere - whether using Netlify (my current choice), Amazon S3 &amp; Cloudfront, Heroku, GitHub Pages, and more.</li>
<li>Shortcodes are available if Markdown isn't enough</li>
<li>Continuous deployment - everything is version controlled, and deployed when I publish to the master branch</li>
<li>Allow commenting and sharing of posts</li>
</ul>
<h3 id="heading-challenges">Challenges</h3>
<ul>
<li>Hugo is sometimes too simple.  No plugins or extensions at all, etc.</li>
<li>Using Go is less intuitive and the shortcode feels messier than something like Vue</li>
<li>Not too many themes available, but I expect the library to keep growing, as there is a very active user base</li>
</ul>
<h3 id="heading-so-do-i-need-a-cms">So do I need a CMS?</h3>
<p>After all of this, I still had this question in the back of my mind.  And the answer is, "it depends".  </p>
<p>If I were to incorporate a lot of media, such as images or videos that I need to upload, it would certainly get tedious adding and organizing them all to the images folder in <strong>static</strong>. </p>
<p>At that point, I would look into a headless CMS such as Ghost, Netlify, or Sanity to manage the content, as long as I could still write my posts using Markdown.</p>
<h3 id="heading-references">References</h3>
<ul>
<li>https://medium.com/backticks-tildes/hugo101-getting-started-with-hugo-and-deploying-to-netlify-9a813fe23b94</li>
<li>https://blog.risingstack.com/static-site-generator-hugo-netlify/</li>
<li>http://cloudywithachanceofdevops.com/posts/2018/05/17/setting-up-google-analytics-on-hugo/</li>
<li>https://www.sitepoint.com/premium/books/a-beginner-s-guide-to-creating-a-static-website-with-hugo/read/1</li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Start a Blog for Free with WordPress – Tutorial for Beginners ]]>
                </title>
                <description>
                    <![CDATA[ This article will discuss how to start a blog with WordPress. WordPress is the world’s most popular blogging software and content management system in the world. If you need an introduction, you can learn all about the basics of WordPress in my previ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-start-a-blog-with-wordpress/</link>
                <guid isPermaLink="false">66bb5750f55324ca867c88db</guid>
                
                    <category>
                        <![CDATA[ blog ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ WordPress ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Jim Campbell ]]>
                </dc:creator>
                <pubDate>Mon, 30 Nov 2020 17:54:27 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/11/wordpress-589121_1920.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>This article will discuss how to start a blog with WordPress. WordPress is the world’s most popular blogging software and content management system in the world.</p>
<p>If you need an introduction, you can learn all about the basics of WordPress in my previous article <a target="_blank" href="https://www.freecodecamp.org/news/what-is-wordpress/">here</a>.</p>
<p>In this post, we will discuss:</p>
<ul>
<li>Blogging basics</li>
<li>Why you should choose WordPress</li>
<li>Starting a blog for free with WordPress.com</li>
<li>Starting a self-hosted blog with WordPress.org</li>
</ul>
<p>Before discussing the steps to use WordPress to create a blog, I will start by taking time to explain the basics of blogging.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/laptop-593673_1280.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-what-is-a-blog-and-why-should-you-start-one">What is a blog and why should you start one?</h2>
<p>A blog is a discussion or informational website published on the internet. Blogs can be funny, informational, or inspiring and can be published for highly targeted and niche audiences or a broader array of readers (like freeCodeCamp.org/news).</p>
<blockquote>
<p>A blog (a truncation of "weblog") is a discussion or informational website published on the internet consisting of discrete, often informal diary-style text entries (posts). - <a target="_blank" href="https://en.wikipedia.org/wiki/Blog">Wikipedia</a></p>
</blockquote>
<p>If you are looking to start a blog (and I was once in your shoes) there are a few reasons that might be motivating you:</p>
<ol>
<li>It’s fun and educational.</li>
<li>You are super passionate about a topic and want to share your thoughts with readers about it.</li>
<li>You want to use your blog as a website to generate money.</li>
</ol>
<p>When I created my first blog it was a mix of wanting to share my perspective on a topic and learn more about publishing online (I was 13 and created a blog on <a target="_blank" href="https://en.wikipedia.org/wiki/Yahoo!_GeoCities">GeoCities</a> about video game cheat codes). </p>
<p>That experience has led me to create dozens of websites and now I create websites primarily with WordPress.</p>
<p>The current environment also serves as a catalyst to start a blog. People have more time at home, are reconsidering careers, thinking about pursing graduate school, and <a target="_blank" href="https://freecodecamp.org">learning new programming languages</a> in completely new and unexpected trends.</p>
<p>With the massive rise in working from home, people have had more time to devote to side projects and entrepreneurship. I expect that most people who are starting blogs today are doing so either because they have more time without a commute or they are taking the path of entrepreneurship as the world changes.</p>
<p>Getting started on a new venture has never been easier with a platform like WordPress. Companies like SuperHuman and EarlyBird are able to set-up simple websites that collect pre-registrations. A CMS like WordPress will allow you to start small and expand the capabilities of your website easily over time. </p>
<p>From small ideas to full digital transformation of your business, WordPress comes packed with power to achieve your dreams. No matter how small your idea, it’s easy to get started with WordPress.</p>
<h2 id="heading-why-should-you-choose-wordpress">Why should you choose WordPress?</h2>
<p>WordPress is the most popular blogging software and content management system in the world. It currently powers about <strong>half a billion</strong> websites.</p>
<blockquote>
<p>39% of the web is built on WordPress. More bloggers, small businesses, and Fortune 500 companies use WordPress than all other options combined. Join the millions of people that call WordPress.com home. -<a target="_blank" href="https://wordpress.com/">WordPress.com</a></p>
</blockquote>
<p>If you are looking for blogging software, WordPress is an obvious choice with 60% of the market.  </p>
<p>You have probably heard about or looked at other content managements like <a target="_blank" href="https://www.joomla.org/">Joomla</a>, <a target="_blank" href="http://drupal.org/">Drupal</a>, <a target="_blank" href="https://www.squarespace.com/">Squarespace</a>, <a target="_blank" href="https://www.shopify.com/">Shopify</a>, and <a target="_blank" href="https://www.wix.com/">Wix</a>. These content management systems offer great products, but here are 3 reasons to choose WordPress.</p>
<ol>
<li>500+ sites are built each day using WordPress while only 60-80 per day are built on platform like Shopify and Squarespace</li>
<li>You can get started for <a target="_blank" href="https://wordpress.com/start/"><strong>free</strong></a>.</li>
<li>WordPress has an <a target="_blank" href="https://developer.wordpress.org/">incredible developer ecosystem</a> and you can build your web development skills quickly with WordPress.</li>
</ol>
<p>So if I’ve convinced you to use WordPress, let’s discuss how to actually get started.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/wordpress-923188_1920-1.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Starting a blog with WordPress.org.</em></p>
<h2 id="heading-how-to-start-a-wordpress-blog-for-free-on-wordpresscom">How to start a WordPress blog for free on WordPress.com</h2>
<p>Most people choose to use WordPress.org to create a self-hosted website. More on that below. But you can get started for free by signing up at <a target="_blank" href="https://wordpress.com">WordPress.com</a>. You can learn more about the differences between WordPress.com and WordPress.org at <a target="_blank" href="https://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/">WPBeginner</a>. </p>
<p>The free WordPress.com platform is a good choice to get started with WordPress. It is very user friendly and you will not have to worry about updates or backups. It’s free for up to 3GB of storage space. Beyond 3GB you will have to pay for more space. </p>
<p>WordPress.com’s free blogging platform will allow you to quickly get started.</p>
<p>Get started <a target="_blank" href="https://wordpress.com/start/">here</a> and enter your email, username, and password. </p>
<p>Once you are setup, you will see the WordPress admin backend. Here you can edit your site's contents, select a Theme, and review your site's stats. </p>
<p><img src="https://lh5.googleusercontent.com/-bjsAbPsMjGQG3hYLy2lCtWQc7abr8ZOugUCTIwvdVw1dRFl2jUrKKdgWyXO0mHaUty25IibFOoQ5T0gfcncNOcOR3OdX_-qbzPtzRILoBWXbBdNACwbaojvQOjeW4v5hYWdZcM-" alt="Image" width="1413" height="1127" loading="lazy">
<em><a target="_blank" href="https://wordpress.com">WordPress.com</a> dashboard for a free prototype of a website I built.</em></p>
<p>After customizing your site with easy-to-use visual editing tools, you are all set up to start publishing posts and sharing your content with the world!</p>
<p>The free platform available on WordPress.com is very much <a target="_blank" href="https://en.wikipedia.org/wiki/Freemium">freemium</a> and is designed to get you to upgrade to a paid plan. It is a great way to start playing around with the tool and get familiar with adding pages, posts, and editing content. </p>
<p>All free sites are given a domain name of <em>{something)</em>.wordpress.com. You can upgrade your plan to select your own domain name or transfer it from another service if you already own one. </p>
<p>The real power of WordPress is unlocked with a self-hosted version.</p>
<h2 id="heading-how-to-start-a-self-hosted-blog-with-wordpressorg">How to start a self-hosted blog with WordPress.org</h2>
<p>WordPress.org allows you to create a fully-functioning website with the same features as WordPress.com and no restrictions. WordPress.org is open-source and 100% free for anyone to use, but you will need to pay for two things before getting started.</p>
<p>To get started self-hosting your WordPress, websites you will need three things:</p>
<ol>
<li>A domain name</li>
<li>A hosting provider</li>
<li>A willingness to learn (that’s why you’re on freeCodeCamp!)</li>
</ol>
<p>You can purchase a domain name from a variety of registrars like NameCheap, Bluehost, and GoDaddy. Domains cost about $20 per year.</p>
<p>There are hundreds of hosting providers to choose from. It is easy to choose the same host as your registrar like Bluehost or GoDaddy. Recently, there has been a rise in WordPress-specific hosts like Kinsta that specialize in WordPress. </p>
<p>Once you have your shiny new domain name and hosting provider, you need to install WordPress. Your host will help you do this. </p>
<p>For the advanced developers, you can install WordPress on your own server to have total control over your WordPress installation for better speed and security control. </p>
<p>When installing WordPress, you will usually need to provide some basic site and user information:</p>
<ul>
<li>Site title (easily changed later)</li>
<li>Site tagline (easily changed later)</li>
<li>Admin username (can not be changed, pick something secure)</li>
<li>Admin password</li>
<li>Admin email</li>
</ul>
<p>When WordPress has been successfully installed on your website, you can access the backend at <em>yourdomain.com</em>/wp-admin. Enter in the login information you provided and you'll be taken to the new admin dashboard of your very own website!</p>
<p><img src="https://lh4.googleusercontent.com/PkFZXO16zArdrATwucLmoHZt2oE02vcMyrnj4tZZr5eBw00zHbHUzBFn3uNNRaEGAc5uKeT9T-Ze-hvMoq9vAekrgsmQdMMKt3oS2PKPlphl-sDSulXbkGrH-rpHmKWiPw45g6cP" alt="Image" width="1113" height="674" loading="lazy">
<em>Via What Is the WordPress Admin Dashboard?</em></p>
<p>WordPress comes pre-installed with a theme (which is updated every year) and usually some demo content like a Sample Post and a Sample Page. This content is already available at your domain.</p>
<p>The next steps after successfully accessing the admin dashboard should be to add your customizations to the site. Start with a Theme and then edit your Pages and Posts.</p>
<h3 id="heading-how-to-choose-and-install-themes">How to choose and install themes</h3>
<p>Themes are a fundamental part of WordPress. A <a target="_blank" href="https://wordpress.org/support/article/using-themes/">WordPress Theme</a> is a collection of files that work together to produce a graphical interface with an underlying unifying design for a website. They are the look and feel of your website.</p>
<p>Themes can be endlessly customized, but starting with a great theme will make your life very easy. You can select from thousands of themes available on ThemeForest and <a target="_blank" href="https://wordpress.org/themes/">WordPress.org</a>.</p>
<p>Themes can be easily installed by uploading a zip file into the Wordpress dashboard. Changing the look of your website is as simple as clicking "activate" on the newly installed theme. </p>
<p>After adding some style to your WordPress website, it’s time to add your content.</p>
<h3 id="heading-how-to-add-pages-and-posts-to-your-wordpress-site">How to add Pages and Posts to your Wordpress site</h3>
<p>Pages and Posts make up the majority of your site’s content. Pages are your webpages like your homepage, about page, contact us, and so on. Posts are the more frequently updated “blogs” that can be constantly added and organized under WordPress <a target="_blank" href="https://www.wpbeginner.com/glossary/category/">Categories</a>.</p>
<p>Whatever you need your WordPress blog to be, it all starts with the content. </p>
<p>Whether it is a simple landing page to collect emails like Superhuman, a publishing superpower like <a target="_blank" href="https://techcrunch.com">TechCrunch</a>, the <a target="_blank" href="https://sweden.se/">official site of Sweden</a>, a financial comparison website, or The Official Star Wars Blog (all of these are WP websites), people want to see your content! So get started by adding pages and posts.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/wordpress-552924_1920.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-wrapping-it-all-up">Wrapping it all up</h2>
<p>WordPress is one of the most popular software platforms in the world. </p>
<p>It is easy to set up and is endlessly customizable, making it a great choice for starting your own blog and website. Your web development skills will grow with your content and ideas as you get them out into the world. </p>
<p>Whether you use the free WordPress.com or a self-hosted version, WordPress is a great tool to use. So go get started!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is WordPress? The Blog and Website Tool Explained ]]>
                </title>
                <description>
                    <![CDATA[ WordPress is the world’s most popular content management system, powering about 38% of all websites. A content management system or CMS is software that helps users create and manage content on a website with minimal technical knowledge.  “The basic... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-wordpress/</link>
                <guid isPermaLink="false">66bb57538fc8cb0c8fdc2ec8</guid>
                
                    <category>
                        <![CDATA[ beginners guide ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ PHP ]]>
                    </category>
                
                    <category>
                        <![CDATA[ WordPress ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Jim Campbell ]]>
                </dc:creator>
                <pubDate>Mon, 23 Nov 2020 19:48:14 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/11/wordpress.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>WordPress is the world’s most popular content management system, powering about 38% of all websites. A content management system or CMS is software that helps users create and manage content on a website with minimal technical knowledge. </p>
<blockquote>
<p>“The basic WordPress software is simple and predictable so you can easily get started. It also offers powerful features for growth and success.” - WordPress.com</p>
</blockquote>
<p>In short, WordPress is a reliable way to create a powerful website.</p>
<p>WordPress is easy to install and comes packed with functionality out of the box. The core features of WordPress have everything that you need to set up a website with pages, blog posts, navigation, and user management. </p>
<p>But the real power of WordPress is the extensive options to quickly design a beautiful website with pre-built Themes and add incredible functionality with optional Plugins.</p>
<p>In this article we will cover the basics of WordPress including:</p>
<ul>
<li>WordPress’ origin and popularity</li>
<li>Building the basics with Pages and Posts</li>
<li>Improving design with Themes</li>
<li>Extending functionality with Plugins</li>
</ul>
<h2 id="heading-why-is-wordpress-so-popular">Why is WordPress So Popular?</h2>
<p>WordPress is used by about half a billion other websites, including recognizable names such as TechCrunch, The New Yorker, Variety, the official site of Sweden, and The Walt Disney Company. </p>
<p><em>Tip:</em> to see if a site is running WordPress, you can View Page Source and search for “WordPress” or “wp-” and if you see directories such as “wp-includes” or “wp-content”, the site is running WordPress.</p>
<p>WordPress is still growing like crazy with over 500 new sites built everyday. </p>
<p>Over the past three years, WordPress’ market share of software powering websites has grown by about 8% from 27.3% in 2019 to 35.2% in 2020.</p>
<p>Amazingly, WordPress now powers more websites than websites that do not use any CMS:</p>
<p><img src="https://lh5.googleusercontent.com/bb4ZuDI2RZ71zvzMBLvczjjpzHybK-zs4X6CSnmU4WTaDrQLJ9yB4CUPKnxE40JjnT7AVibNXJGGGXgHeDF92C5Geb4JUBPVI9ENNmxLahaS_7M8sE8veN6NZ657PyKoAG9c41lr" alt="Image" width="1320" height="164" loading="lazy">
<em>Percent of All Websites Not Using a CMS vs. Percent of Sites Using Wordpress. There are more websites using WordPress than websites powered by a CMS. Source: w3techs</em></p>
<p>One of the main drivers of WordPress’ popularity is that it is <strong>free</strong>. WordPress is licensed under the <a target="_blank" href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html">GPLv2</a>, which means it is free to use and modify by anyone. </p>
<p>WordPress is estimated to have had over 100 years of developer time contributed to the open source project.</p>
<h2 id="heading-wordpress-basics-pages-and-posts">WordPress Basics – Pages and Posts</h2>
<p>Setting up a WordPress website involves selecting a domain name, finding a hosting provider, and installing WordPress.</p>
<p>Installing WordPress sets you up with a fully functioning website. But unlocking the real power of WordPress comes with installing Themes, Plugins, and customizing the site. </p>
<p>But let’s start with the basics.</p>
<p>Upon installing WordPress, you will be asked for a username and password. Your credentials can be used to access the admin backend of your website. This can be accessed at <em>yourdomainname.com/</em><strong>wp-admin</strong>. </p>
<p>The admin section looks like this:</p>
<p><img src="https://lh5.googleusercontent.com/OpFPebq7IBpYQNAk1DnWbq3HI9mwgFKVKJrSAJtZm_U7RnAQr75AS_XPvwQrTyjTqcNMB0wLeB1-GTj5wNGn9ga8wUEsNa3TbQp5XBR74h5j8hxyGscQTEHVdFr36zeQirwKZGqx" alt="Image" width="1163" height="661" loading="lazy">
<em>The WordPress admin backend. Source: WordPress</em></p>
<p>As you can see, WordPress comes loaded with features that are accessible via the left navigation. For the purposes of this article, let’s discuss the two important content types Pages and Posts.</p>
<h3 id="heading-wordpress-pages">WordPress Pages</h3>
<p>Pages allow you to quickly build web pages. By adding this type of content, you can create webpages at <em>yourdomain.com</em>/<strong>newpage</strong>.</p>
<p>WordPress has a built in editor that you can use to quickly format text and multimedia into a great looking webpage. The editor is built with “blocks” so that instead of worrying about the alignment and organization of the content, you can focus on creating. </p>
<p>This is what editing content and adding blocks in WordPress looks like:</p>
<p><img src="https://lh4.googleusercontent.com/BHBC2-MeN7JPjJMuAucwwwX-zYEu1bxNDtbrJci1K0PCwwT3Dt21HC0Jdo-v7Fa7bsAXpWLxJjLkogEA65AscfAV8OyLszAa-DdXH4e71byZ5DEoFg3CiFv8ieGNxfonvJAj1eNz" alt="Image" width="1600" height="868" loading="lazy">
<em>Easily insert different “blocks” like code into your Pages and Posts.</em></p>
<p>While the default WordPress Editor is great, it can be enhanced with Plugins and even replaced with content builders that make it easier to drag and drop content in a visual way such as Elementor, Visual Composer, or WP Bakery. The beauty of WordPress is that it is <strong>infinitely customizable</strong>.</p>
<p>Whatever editor you choose to use, using WordPress’ built-in Pages allows you to easily create dynamic and gorgeous web pages. </p>
<h3 id="heading-wordpress-posts">WordPress Posts</h3>
<p>The Posts section has the same Editor as the Pages section, except this content category creates blog posts. Posts are at the core of WordPress because the software began as a blogging tool.  </p>
<p>Posts utilize the same content Editor as Pages, so creating Pages and Posts is the same experience. </p>
<p>The main difference between Pages and Posts is volume. Let’s say a typical small business website will have 5-10 core pages (Home Page, About Us, Contact Us, Services, and so on). That same company could have 100s of blog posts.</p>
<p>To manage the high volume of Posts, WordPress comes with extensive categorization and hierarchy management. Posts can be easily organized into Categories.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/pasted-image-0--2-.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example of categories to organize posts.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/Screen-Shot-2020-11-21-at-9.39.10-AM.png" alt="Image" width="600" height="400" loading="lazy">
<em>Example of hierarchies to organize posts.</em></p>
<p>You can add and nest as many categories as you need. With Categories, content can be displayed hierarchically on your website such a <em>yourdomainname.com</em>/<strong>guides/best-business-practices/</strong><em><strong>yourcontent</strong>.</em> </p>
<p>Since WordPress is so highly customizable this "permalink" structure can also be easily changed in the Settings tab.</p>
<h3 id="heading-custom-post-types-advanced">Custom Post Types (advanced)</h3>
<p>WordPress comes pre-loaded with the two main content types (Posts and Pages) but many users want to further customize their content types.</p>
<p>For example, if you want to build a travel website that has a directory of hotels, a custom post type called "Hotels" would be a great addition. </p>
<p>These custom post types leverage WordPress' built-in Editor, categories, and other features of the Posts and Pages. As such, custom post types are a way to quickly develop a dynamic website. </p>
<p>Custom post types can be added via a Plugin or by adding some code into the core <em>functions.php</em> file. These additions are great example of how WordPress is <strong>extremely customizable</strong> and a <strong>great platform to develop your coding skills</strong>.   </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/pasted-image-0--1-.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/pasted-image-0-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>Custom posts like Hotels and Products can be added into WordPress to better organize content and enhance the functionality of your custom WordPress site.</em></p>
<h2 id="heading-wordpress-themes-looking-good-is-easy">WordPress Themes - Looking Good Is Easy</h2>
<p>Once you’ve set up your WordPress website, the next step is selecting a Theme. </p>
<p>A theme is a collection of templates and stylesheets that define the appearance and functionality of a WordPress website. </p>
<p>WordPress comes preloaded with a standard Theme but very few websites actually use this Theme (or hundreds of millions of sites would look the same!)</p>
<p>Themes allow WordPress users to very quickly have a great looking website. In about 10 minutes you can have a website that has the same backend, engine, and look like great sites such as TechCrunch. All that’s missing is the content!</p>
<p>One of the best parts of building a WordPress website is selecting a Theme due to the variety of designs and options. There are thousands of themes available.  </p>
<p><img src="https://lh6.googleusercontent.com/K-rtleZSuRBt0F5fybx-H-R79LqI3T_NSeHacyKwFVFT5wd0vr8Ex3e4JkL6gnQMcmGRvCRoILWrz7HLs_1FY45w1bb1j6y4EWucCTHRyNVNj7gco7MQfMM_3D2j5isbghzN3ycw" alt="Image" width="1600" height="895" loading="lazy"></p>
<p>Premium Themes can typically be purchased for between $20 and $60. You can download a zip file and easily upload it to WordPress. Once the Theme is activated, your WordPress website adopts the templates and stylesheets. And just like that, you have a professionally designed website!</p>
<p><em>A word of caution</em>: Theme selection can be tricky and there are many things to consider before installing. I would recommend looking for Themes that have high ratings (someone else has tested it), minimum Plugin dependencies, and are fast. </p>
<p>To test the speed, find a demo of the Theme on the developers website and run it though Google Page Speed. If the Theme performs poorly, don't use it.</p>
<p>Once you select a great base Theme, you have the option to <strong>endlessly customize it</strong>. You can completely customize your site by editing the Theme file with HTML, PHP, CSS, and JavaScript. </p>
<p>The easiest way to do this is to install a child theme so that you can still update your theme with the latest version.</p>
<p>With a great Theme, you can have a beautiful website. Plugins add the power.</p>
<h2 id="heading-wordpress-plugins-make-it-more-than-just-a-blog">WordPress Plugins Make it More Than Just a Blog</h2>
<p>WordPress’ history is rooted in personal publishing and blogging. The project started in 2003 when Mike Little and Matt Mullenweg began working on an “elegant and well-architected personal publishing system.”</p>
<p>But WordPress is now much more than just a blog.</p>
<p>WordPress has over 50,000 Plugins available. WordPress Plugins are PHP scripts that extend the functionality of the core content management system. They can add entirely new features to your site.</p>
<p>Plugins are developed by volunteers and companies. They are typically free and many have premium versions.</p>
<p>Beware of installing too many Plugins, as maintaining the updates can be a never-ending task for WordPress webmasters. </p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/Screen-Shot-2020-11-21-at-10.00.34-AM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/08/Screen-Shot-2020-11-21-at-10.01.45-AM.png" alt="Image" width="600" height="400" loading="lazy">
<em>Plugins can be uploaded and updated directly from the admin backend.</em></p>
<h2 id="heading-wrapping-it-all-up">Wrapping It All Up</h2>
<p>WordPress is a great tool to use to build a website. It is fast, reliable, and extendable.</p>
<p>While WordPress started as a simple publishing tool, it has grown far beyond its humble beginnings. Whether you are looking to create a personal blog, an ecommerce store, or a website for your business, WordPress is a great option.</p>
<p>Additionally, WordPress is a great way to start learning more about web development. </p>
<p>When you start building in WordPress you will be coding with HTML, CSS, Javascript, PHP, and MySQL. Since WordPress is open source and insanely popular, there are a ton of free resources (<a target="_blank" href="https://www.freecodecamp.org/news/search/?query=wordpress">including right here on freeCodeCamp</a>) to go as deep as you want.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Technical Writing for Beginners – An A-Z Guide to Tech Blogging Basics ]]>
                </title>
                <description>
                    <![CDATA[ If you love writing and technology, technical writing could be a suitable career for you. It's also something else you can do if you love tech but don’t really fancy coding all day long. Technical writing might also be for you if you love learning by... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/technical-writing-for-beginners/</link>
                <guid isPermaLink="false">66bcb0d7463cb352e42ea098</guid>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Amarachi Johnson ]]>
                </dc:creator>
                <pubDate>Fri, 20 Nov 2020 19:47:34 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/11/etienne-boulanger-aafOjsh-9jU-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you love writing and technology, technical writing could be a suitable career for you. It's also something else you can do if you love tech but don’t really fancy coding all day long.</p>
<p>Technical writing might also be for you if you love learning by teaching others, contributing to open source projects and teaching others how to do so, too, or basically enjoy explaining complex concepts in simple ways through your writing.</p>
<p>Let's dive into the fundamentals and learn about what you should know and consider when getting started with technical writing.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<p>In this article, we’ll be looking at:</p>
<ul>
<li><a class="post-section-overview" href="#what-technical-writing-is">What Technical writing is</a></li>
<li><a class="post-section-overview" href="#benefits">Benefits of Technical Writing</a></li>
<li><a class="post-section-overview" href="#some-necessary-skills">Necessary skills to have as a Technical Writer</a></li>
<li><a class="post-section-overview" href="#heading-the-technical-writing-process">The Technical Writing Process</a></li>
<li><a class="post-section-overview" href="#platforms-for-publishing-your-articles">Platforms for publishing your articles</a></li>
<li><a class="post-section-overview" href="#heading-technical-writing-courses">Technical Writing Courses</a></li>
<li><a class="post-section-overview" href="#heading-technical-writing-forums-and-communities">Technical Writing forums and communities</a></li>
<li><a class="post-section-overview" href="#Some-amazing-technical-writers-to-follow">Some amazing technical writers to follow</a></li>
<li><a class="post-section-overview" href="#heading-final-words">Final Words and references</a></li>
</ul>
<h2 id="heading-what-is-technical-writing">What is Technical Writing?</h2>
<p>Technical writing is the art of providing detail-oriented instruction to help users understand a specific skill or product.</p>
<p>And a technical writer is someone who writes these instructions, otherwise known as technical documentation or tutorials. This could include user manuals, online support articles, or internal docs for coders/API developers.</p>
<p>A technical writer communicates in a way that presents technical information so that the reader can use that information for an intended purpose.</p>
<h2 id="heading-benefits-of-technical-writing">Benefits of Technical Writing</h2>
<p>Technical writers are lifelong learners. Since the job involves communicating complex concepts in simple and straightforward terms, you must be well-versed in the field you're writing about. Or be willing to learn about it.</p>
<p>This is great, because with each new technical document you research and write, you will become an expert on that subject.</p>
<p>Technical writing also gives you a better sense of user empathy. It helps you pay more attention to what the readers or users of a product feel rather than what you think.</p>
<p>You can also make money as a technical writer by contributing to organizations. Here are <a target="_blank" href="https://catalins.tech/websites-that-pay-you-to-write-technical-articles">some organizations that pay you to write for them</a>, like <a target="_blank" href="https://smashingmagazine.com">Smashing Magazine</a>, <a target="_blank" href="https://auth0.com/">AuthO</a>, <a target="_blank" href="https://twilio.com">Twilio</a>, and <a target="_blank" href="https://stackoverflow.com">Stack Overflow</a>.</p>
<p>In addition to all this, you can contribute to Open Source communities and participate in paid open source programs like <a target="_blank" href="https://edidiongasikpo.com/how-to-crack-the-google-season-of-docs-application-process-for-2020">Google Season of Docs</a> and <a target="_blank" href="https://outreachy.org">Outreachy</a>.</p>
<p>You can also take up technical writing as a full time profession – lots of companies need someone with those skills.</p>
<h2 id="heading-necessary-skills-to-have-as-a-technical-writer">Necessary Skills to Have as a Technical Writer</h2>
<h3 id="heading-understand-the-use-of-proper-english">Understand the use of proper English</h3>
<p>Before you consider writing, it is necessary to have a good grasp of English, its tenses, spellings and basic grammar. Your readers don't want to read an article riddled with incorrect grammar and poor word choices.</p>
<h3 id="heading-know-how-to-explain-things-clearly-and-simply">Know how to explain things clearly and simply</h3>
<p>Knowing how to implement a feature doesn't necessarily mean you can clearly communicate the process to others. </p>
<p>In order to be a good teacher, you have to be empathetic, with the ability to teach or describe terms in ways suitable for your intended audience.</p>
<blockquote>
<p>If you can't explain it to a six year old, you don't understand it yourself. Albert Einstein</p>
</blockquote>
<h3 id="heading-possess-some-writing-skills">Possess some writing skills‌‌</h3>
<p>I believe that writers are made, not born. And you can only learn how to write by actually writing. </p>
<p>You might never know you have it in you to write until you put pen to paper. And there's only one way to know if you have some writing skills, and that's by writing. </p>
<p>So I encourage you to start writing today. You can choose to start with any of the platforms I listed in <a class="post-section-overview" href="#Platforms-for-publishing-your-articles">this section</a> to stretch your writing muscles.</p>
<p>And of course, it is also a <strong>huge benefit to have some experience in a technical field.</strong></p>
<h2 id="heading-the-technical-writing-process">The Technical Writing Process</h2>
<h3 id="heading-analyze-and-understand-who-your-readers-are">Analyze and Understand who your Readers are</h3>
<p>The biggest factor to consider when you're writing a technical article is your intended/expected audience. It should always be at the forefront of your mind.</p>
<p>A good technical writer writes based on the reader’s context. <strong>As an example</strong>, let's say you're writing an article targeted at beginners. It is important not to assume that they already know certain concepts.</p>
<p>You can start out your article by outlining any necessary prerequisites. This will make sure that your readers have (or can acquire) the knowledge they need before diving right into your article.</p>
<p>You can also include links to useful resources so your readers can get the information they need with just a click.</p>
<p>In order to know for whom you are writing, you have to gather as much information as possible about who will use the document.</p>
<p>It is important to know if your audience has expertise in the field, if the topic is totally new to them, or if they fall somewhere in between.</p>
<p>Your readers will also have their own expectations and needs. You must determine what the reader is looking for when they begin to read the document and what they'll get out of it.</p>
<p>To understand your reader, ask yourself the following questions before you start writing:</p>
<ul>
<li>Who are my readers?</li>
<li>What do they need?</li>
<li>Where will they be reading?</li>
<li>When will they be reading?</li>
<li>Why will they be reading?</li>
<li>How will they be reading?</li>
</ul>
<p>These questions also help you think about your reader's experience while reading your writing, which we'll talk about more now.</p>
<h3 id="heading-think-about-user-experience">Think About User Experience</h3>
<p>User experience is just as important in a technical document as it is anywhere on the web.</p>
<p>Now that you know your audience and their needs, keep in mind how the document itself services their needs. It’s so easy to ignore how the reader will actually use the document.</p>
<p>As you write, continuously step back and view the document as if you're the reader. Ask yourself: Is it accessible? How will your readers be using it? When will they be using it? Is it easy to navigate?</p>
<p>The goal is to write a document that is both useful to and useable by your readers.</p>
<h3 id="heading-plan-your-document">Plan Your Document</h3>
<p>Bearing in mind who your users are, you can then conceptualize and plan out your document.</p>
<p>This process includes a number of steps, which we'll go over now.</p>
<h4 id="heading-conduct-thorough-research-about-the-topic">Conduct thorough research about the topic</h4>
<p>While planning out your document, you have to research the topic you're writing about. There are tons of resources only a Google search away for you to consume and get deeper insights from. </p>
<p>Don't be tempted to lift off other people's works or articles and pass it off as your own, as this is plagiarism. Rather, use these resources as references and ideas for your work. </p>
<p>Google as much as possible, get facts and figures from research journals, books or news, and gather as much information as you can about your topic. Then you can start making an outline.</p>
<h4 id="heading-make-an-outline">Make an outline</h4>
<p>Outlining the content of your document before expanding on it helps you write in a more focused way. It also lets you organize your thoughts and achieving your goals for your writing.</p>
<p>An outline can also help you identify what you want your readers to get out of the document. And finally, it establishes a timeline for completing your writing.</p>
<h4 id="heading-get-relevant-graphicsimages">Get relevant graphics/images</h4>
<p>Having an outline is very helpful in identifying the various virtual aids (infographics, gifs, videos, tweets) you'll need to embed in different sections of your document. </p>
<p>And it'll make your writing process much easier if you keep these relevant graphics handy. </p>
<h3 id="heading-write-in-the-correct-style">Write in the Correct Style</h3>
<p>Finally, you can start to write! If you've completed all these steps, writing should become a lot easier. But you still need to make sure your writing style is suitable for a technical document.</p>
<p>The writing needs to be accessible, direct, and professional. Flowery or emotional text is not welcome in a technical document. To help you maintain this style, here are some key characteristics you should cultivate.</p>
<h4 id="heading-use-active-voice">Use Active Voice</h4>
<p>It's a good idea to use active voices in your articles, as it is easier to read and understand than the passive voice.</p>
<p>Active voice means that the <strong>subject</strong> of the sentence is the one actively performing the <strong>action</strong> of the verb. Passive voice means that a <strong>subject</strong> is the recipient of a verb's <strong>action</strong>.</p>
<p>Here's an example of <strong>passive voice</strong>: The documentation should be read six times a year by every web developer.</p>
<p>And here's an example of <strong>active voice</strong>: Every web developer should read this documentation 6 times a year.</p>
<h4 id="heading-choose-your-words-carefully">Choose Your Words Carefully</h4>
<p>Word choice is important. Make sure you use the best word for the context. Avoid overusing pronouns such as ‘it’ and ‘this’ as the reader may have difficulty identifying which nouns they refer to. </p>
<p>Also avoid slang and vulgar language – remember you're writing for a wider audience whose disposition and cultural inclinations could differ from yours.</p>
<h4 id="heading-avoid-excessive-jargon">Avoid Excessive Jargon</h4>
<p>If you’re an expert in your field, it can be easy to use jargon you're familiar with without realizing that it may be confusing to other readers. </p>
<p>You should also avoid using acronyms you haven't previously explained.</p>
<p><strong>Here's an Example</strong>:</p>
<p>Less clear: <strong>PWAs</strong> are truly considered the future of multi-platform development. Their availability on both Android and iOS makes them the app of the future.</p>
<p>Improved: <strong>Progressive Web Applications (PWAs)</strong> are truly the future of multi-platform development. Their availability on both Android and iOS makes <strong>PWAs</strong> the app of the future.</p>
<h4 id="heading-use-plain-language">Use Plain Language</h4>
<p>Use fewer words and write in a way so that any reader can understand the text.‌‌ Avoid big lengthy words. Always try to explain concepts and terms in the clearest way possible.</p>
<h4 id="heading-visual-formatting">Visual Formatting</h4>
<p>A wall of text is difficult to read. Even the clearest instructions can be lost in a document that has poor visual representation.</p>
<p>They say a picture is worth a thousand words. This rings true even in technical writing.</p>
<p>But not just any image is worthy of a technical document. Technical information can be difficult to convey in text alone. A well-placed image or diagram can clarify your explanation.</p>
<p>People also love visuals, so it helps to insert them at the right spots. Consider the images below:</p>
<p>First, here's a blog snippet without visuals:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/step2-1.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Here's a snippet of same blog, but with visuals:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/step1-1.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Adding images to your articles makes the content more relatable and easier to understand. In addition to images, you can also use gifs, emoji, embeds (social media, code) and code snippets where necessary.</p>
<p>Thoughtful formatting, templates, and images or diagrams will also make your text more helpful to your readers. You can check out the references below for a technical writing template from @Bolajiayodeji.</p>
<h4 id="heading-do-a-careful-review">Do a Careful Review</h4>
<p>Good writing of any type must be free from spelling and grammatical errors. These errors might seem obvious, but it's not always easy to spot them (especially in lengthy documents).</p>
<p>Always double-check your spelling (you know, dot your Is and cross your Ts) before hitting 'publish'.</p>
<p>There are a number of free tools like <a target="_blank" href="https://grammarly.com/">Grammarly</a> and the <a target="_blank" href="http://www.hemingwayapp.com/">Hemingway app</a> that you can use to check for grammar and spelling errors. You can also share a draft of your article with someone to proofread before publishing.</p>
<h2 id="heading-where-to-publish-your-articles">Where to Publish Your Articles</h2>
<p>Now that you've decided to take up technical writing, here are some good platforms where you can start putting up technical content for free. They can also help you build an appealing portfolio for future employers to check out.</p>
<p><a target="_blank" href="https://dev.to"><strong>Dev.to</strong></a> is a community of thousands of techies where both writers and readers get to meaningfully engage and share ideas and resources.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/devto.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p><a target="_blank" href="https://hashnode.com"><strong>Hashnode</strong></a> is my go-to blogging platform with awesome perks such as custom domain mapping and an interactive community. Setting up a blog on this platform is also easy and fast.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/hashnode.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong><a target="_blank" href="https://freecodecamp.org">freeCodeCamp</a></strong> has a very large community and audience reach and is a great place to publish your articles. However, you'll need to apply to write for their publication with some previous writing samples. </p>
<p>Your application could either be accepted or rejected, but don't be discouraged. You can always reapply later as you get better, and who knows? You could get accepted.</p>
<p>If you do write for them, they'll review and edit your articles before publishing, to make sure you publish the most polished article possible. They'll also share your articles on their social media platforms to help more people read them.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/freecodecamp.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<p><strong><a target="_blank" href="https://hackernoon.com">Hackernoon</a></strong> has over 7,000 writers and could be a great platform for you to start publishing your articles to the over 200,000 daily readers in the community. </p>
<p>Hacker Noon supports writers by proofreading their articles before publishing them on the platform, helping them avoid common mistakes.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/11/hackernoon.PNG" alt="Image" width="600" height="400" loading="lazy"></p>
<h2 id="heading-technical-writing-courses">Technical Writing Courses</h2>
<p>Just like in every other field, there are various processes, rules, best practices, and so on in Technical Writing. </p>
<p>Taking a course on technical writing will help guide you through every thing you need to learn and can also give you a major confidence boost to kick start your writing journey. </p>
<p>Here are some technical writing courses you can check out:</p>
<ul>
<li><a target="_blank" href="https://developers.google.com/tech-writing">Google Technical Writing Course</a> (Free)</li>
<li><a target="_blank" href="https://www.udemy.com/topic/technical-writing/">Udemy Technical Writing Course</a> (Paid)</li>
<li><a target="_blank" href="https://hashnode.com/bootcamp/batch-2">Hashnode Technical Writing Bootcamp</a> (Free)</li>
</ul>
<h2 id="heading-technical-writing-forums-and-communities">Technical Writing Forums and Communities</h2>
<blockquote>
<p>Alone we can do so little, together, we can do so much ~ Helen Keller</p>
</blockquote>
<p>Being part of a community or forum along with people who share same passion as you is beneficial. You can get feedback, corrections, tips and even learn some style tips from other writers in the community. </p>
<p>Here are some communities and forums for you to join:</p>
<ul>
<li><a target="_blank" href="https://hashnode.com">Hashnode</a></li>
<li><a target="_blank" href="https://dev.to">Dev.to</a></li>
<li><a target="_blank" href="http://technicalwritingworld.com/forum">Technical Writing World</a></li>
<li><a target="_blank" href="https://www.linkedin.com/groups/112571/profile">Technical Writer Forum</a></li>
<li><a target="_blank" href="http://forum.writethedocs.org/">Write the Docs Forum</a></li>
</ul>
<h2 id="heading-some-amazing-technical-writers-to-follow">Some Amazing Technical Writers to follow</h2>
<p>In my technical writing journey, I've come and followed some great technical writers whose writing journey, consistency, and style inspire me. </p>
<p>These are the writers whom I look up to and consider virtual mentors on technical writing. Sometimes, they drop technical writing tips that I find helpful and have learned a lot from. </p>
<p>Here are some of those writers (hyperlinked with their twitter handles):</p>
<ul>
<li><a target="_blank" href="https://twitter.com/ossia">Quincy Larson</a></li>
<li><a target="_blank" href="https://twitter.com/didicodes">Edidiong Asikpo</a></li>
<li><a target="_blank" href="https://twitter.com/catalinmpit">Catalin Pit</a></li>
<li><a target="_blank" href="https://twitter.com/lo_victoria2666">Victoria Lo</a></li>
<li><a target="_blank" href="https://twitter.com/iambolajiayo">Bolaji Ayodeji</a></li>
<li><a target="_blank" href="https://twitter.com/amrutaranade">Amruta Ranade</a></li>
<li><a target="_blank" href="https://twitter.com/dailydevtips1">Chris Bongers</a></li>
<li><a target="_blank" href="https://twitter.com/colbyfayock">Colby Fayock</a></li>
</ul>
<h2 id="heading-final-words">Final words</h2>
<p>You do not need a degree in technical writing to start putting out technical content. You can start writing on your personal blog and public GitHub repositories while building your portfolio and gaining practical experience.</p>
<p><strong>Really – Just Start Writing.</strong></p>
<p>Practice by creating new documents for existing programs or projects. There are a number of open source projects on GitHub that you can check out and add to their documentation.</p>
<p>Is there an app that you love to use, but its documentation is poorly written? Write your own and share it online for feedback. You can also quickly set up your blog on <a target="_blank" href="https://hashnode.com">hashnode</a> and start writing.</p>
<blockquote>
<p><em>You learn to write by writing, and by reading and thinking about how writers have created their characters and invented their stories. If you are not a reader, don't even think about being a writer. - Jean M. Auel</em></p>
</blockquote>
<p><strong>Technical writers are always learning</strong>. By diving into new subject areas and receiving external feedback, a good writer never stops honing their craft.</p>
<p>Of course, good writers are also voracious readers. By reviewing highly-read or highly-used documents, your own writing will definitely improve.</p>
<p>Can't wait to see your technical articles!</p>
<h3 id="heading-references">References</h3>
<p><a target="_blank" href="https://www.bittbox.com/advice/introduction-technical-writing">Introduction to Technical Writing</a>‌‌</p>
<p><a target="_blank" href="https://amarachiazubuike.com/how-to-structure-a-technical-article-ckg9yiy9c01sns9s17jk1aazd">How to structure a technical article</a>‌‌</p>
<p><a target="_blank" href="https://edidiongasikpo.com/understanding-your-audience-the-why-and-how">Understanding your audience, the why and how</a></p>
<p>‌‌<a target="_blank" href="https://github.com/BolajiAyodeji/technical-writing-template">Technical Writing template</a></p>
<p>I hope this was helpful. If so, follow me on <a target="_blank" href="https://twitter.com/msamarachukwu">Twitter</a> and let me know!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Why It's OK to Over-engineer Your Blog ]]>
                </title>
                <description>
                    <![CDATA[ Every so often, a popular headline in web development argues why you shouldn’t use a certain framework on your blog. Or why, simply, you shouldn’t over-engineer it.  But what, on the other hand, can over-engineering our personal projects like our blo... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/why-its-ok-to-overengineer-your-blog/</link>
                <guid isPermaLink="false">66b8e3a20a89d796f29a16fa</guid>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Colby Fayock ]]>
                </dc:creator>
                <pubDate>Tue, 21 Jul 2020 23:24:52 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/07/overengineer-blog.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Every so often, a popular headline in web development argues why you shouldn’t use a certain framework on your blog. Or why, simply, you shouldn’t over-engineer it. </p>
<p>But what, on the other hand, can over-engineering our personal projects like our blog do to help us grow as developers?</p>
<h2 id="heading-what-do-i-mean-by-over-engineering-a-blog">What do I mean by over-engineering a blog?</h2>
<p>When people assert that a blog is over-engineered, they're often referencing the fact that blogs are typically made up of groups of static data. Because that data is static, it can be statically generated without needing any kind of Javascript framework on top like React.</p>
<div class="embed-wrapper">
        <blockquote class="twitter-tweet">
          <a href="https://twitter.com/markdalgleish/status/1108433814647300097"></a>
        </blockquote>
        <script defer="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></div>
<p><a target="_blank" href="https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4">Shipping Javascript can be expensive</a>. There’s no question about that. When using tools like React, <a target="_blank" href="https://iainbean.com/posts/2020/your-blog-doesnt-need-a-javascript-framework/">you’re immediately introducing</a> performance implications by simply shipping more Javascript. </p>
<p>If you’re just dumping out static content to a page, why do you need Javascript in the first place?</p>
<h2 id="heading-how-can-over-engineering-help-you-learn">How can over-engineering help you learn?</h2>
<p>While over-engineering websites and apps that you ship can ultimately be costly, especially from a user experience perspective, not all circumstances are the same.</p>
<p>One of the best parts about the development world right now, or arguably one of the most frustrating, is that there are constantly new tools being created. </p>
<p>This is great for a few reasons: as a community we’re constantly pushing tools to become better, and as developers we always have new options that might fit our use case better than the last.</p>
<p>But finding ways to learn those new tools can be challenging. While there are a ton of articles out there that <a target="_blank" href="https://www.freecodecamp.org/news/author/colbyfayock/">walk you through building demo apps</a>, there’s a good chance you don’t find that particular demo topic interesting or it just doesn’t excite you because it’s, well, a demo.</p>
<h2 id="heading-how-can-we-use-personal-projects-as-a-learning-outlet">How can we use personal projects as a learning outlet?</h2>
<p>By funneling that eagerness to learn into our personal projects, we are immediately given a chance to put those tools to use with a real-life project using real-life data.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/07/colby-fayock-portfolio.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Progression of my personal portfolio over the years (not all were published)</em></p>
<p>Personal projects are near and dear to us. I’ve spent countless hours redesigning, rebuilding, and tweaking my personal blog before I settled on something simple because I was content with it.</p>
<p>Because of this deeper meaning, we invest ourselves into constantly making it better. With this investment, it’s an easy outlet to keep learning new things.</p>
<p>Learning new things is ultimately how we grow as developers. We’re not all lucky enough to work at jobs where we have countless new projects that afforded us the ability to try a new framework on each. So what better way to learn than to build up our online presence while learning that cool new tool?</p>
<h2 id="heading-whats-the-excuse-for-bad-user-experience">What's the excuse for bad user experience?</h2>
<p>Frankly there is no excuse. A bad user experience isn’t acceptable anywhere.</p>
<p>But the intent here isn’t to argue whether or not a bad user experience is okay or not. The intent is to argue it’s okay for your personal project that admittedly doesn’t get much traffic to be slightly slower, which doesn’t necessarily equate to a bad UX. </p>
<p>Calling everything “bad UX” is a catchy blog title, but the real world implications aren’t always so dramatic.</p>
<p>Chances are, your personal project isn’t <a target="_blank" href="https://css-tricks.com/">css-tricks.com</a> pulling in tons of traffic every day. Being able to learn from mistakes on your blog (where the impact is profoundly smaller) and not from those on your company’s or client’s app makes it a much lower risk exercise.</p>
<p>Learn about those mistakes when it doesn’t matter as much or when you won't lose the business money for accidentally bringing the site down. Put those lessons learned in practice to make a difference in people’s lives when you’re building new science-based tools for the web.</p>
<p>Your personal blog doesn’t need to have cutting edge performance with 100’s across Google PageSpeed. While that’s a great goal, there’s <a target="_blank" href="https://www.colbyfayock.com/2020/04/overcoming-your-fear-of-writing-and-how-you-can-find-motivation">more you can do to help yourself personally succeed</a>, grow as a developer, and ultimately bring in more traffic than focusing solely on shaving 100ms off of your page load.</p>
<h2 id="heading-so-where-does-that-leave-us">So where does that leave us?</h2>
<p>Go learn new tools and break things on your personal projects. Have fun with it – that's why we're all doing this in the first place, right?</p>
<p>It’s okay to mess things up sometimes. Just learn from those mistakes so the next time it really matters, you'll help make a lasting impact with your work.</p>
<div id="colbyfayock-author-card">
  <p>
    <a href="https://twitter.com/colbyfayock">
      <img src="https://res.cloudinary.com/fay/image/upload/w_2000,h_400,c_fill,q_auto,f_auto/w_1020,c_fit,co_rgb:007079,g_north_west,x_635,y_70,l_text:Source%20Sans%20Pro_64_line_spacing_-10_bold:Colby%20Fayock/w_1020,c_fit,co_rgb:383f43,g_west,x_635,y_6,l_text:Source%20Sans%20Pro_44_line_spacing_0_normal:Follow%20me%20for%20more%20JavaScript%252c%20UX%252c%20and%20other%20interesting%20things!/w_1020,c_fit,co_rgb:007079,g_south_west,x_635,y_70,l_text:Source%20Sans%20Pro_40_line_spacing_-10_semibold:colbyfayock.com/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_68,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_145,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_222,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_295,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/v1/social-footer-card" alt="Follow me for more Javascript, UX, and other interesting things!" width="2000" height="400" loading="lazy">
    </a>
  </p>
  <ul>
    <li>
      <a href="https://twitter.com/colbyfayock">? Follow Me On Twitter</a>
    </li>
    <li>
      <a href="https://youtube.com/colbyfayock">?️ Subscribe To My Youtube</a>
    </li>
    <li>
      <a href="https://www.colbyfayock.com/newsletter/">✉️ Sign Up For My Newsletter</a>
    </li>
  </ul>
</div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Grow Your Audience and Share Your Content with the World ]]>
                </title>
                <description>
                    <![CDATA[ Building quality content can be a really rewarding task. But for those just starting out or those who don't yet have a large audience, that content can easily get buried amongst the other million tweets on Twitter. How can we expand our reach and hel... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-grow-your-audience-and-share-your-content-with-the-world/</link>
                <guid isPermaLink="false">66b8e35f684cb75ad7f76d1e</guid>
                
                    <category>
                        <![CDATA[ blog ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogger ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ #content marketing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ marketing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                    <category>
                        <![CDATA[ write ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Colby Fayock ]]>
                </dc:creator>
                <pubDate>Thu, 11 Jun 2020 14:45:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/06/grow-audience.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Building quality content can be a really rewarding task. But for those just starting out or those who don't yet have a large audience, that content can easily get buried amongst the other million tweets on Twitter. How can we expand our reach and help our content impact more people?</p>
<ul>
<li><a class="post-section-overview" href="#heading-creating-our-content-for-the-masses">Creating our content for the masses</a></li>
<li><a class="post-section-overview" href="#heading-what-do-i-mean-by-building-an-audience">What do I mean by building an audience?</a></li>
<li><a class="post-section-overview" href="#heading-leveraging-larger-platforms-and-publications">Leveraging larger platforms and publications</a></li>
<li><a class="post-section-overview" href="#heading-syndicating-with-other-platforms">Syndicating with other platforms</a></li>
<li><a class="post-section-overview" href="#heading-contributing-to-other-publications">Contributing to other publications</a></li>
<li><a class="post-section-overview" href="#heading-sharing-on-content-curation-platforms">Sharing on content curation platforms</a></li>
<li><a class="post-section-overview" href="#heading-other-notable-places">Other notable places</a></li>
</ul>
<h2 id="heading-creating-our-content-for-the-masses">Creating our content for the masses</h2>
<p>Every content creator has been there – you just wrote an article that you're super excited about and think it's going to be a massive hit. But you quickly find that overnight success never came when you wake up hoping to find thousands of likes on the tweet only to find none.</p>
<p>But that might not have anything to do with your article. It could absolutely be groundbreaking, but unfortunately there's not many people around to see it.</p>
<p>Social networks don't tend to prioritize their feeds based on how good your article is, but how much interaction and engagement that post received. While that kind of makes sense, that doesn't play well for people just starting out.</p>
<p>So how do we expand that reach? While the obvious route is to buy your way to the top with ads, I'm going to focus on more natural ways we can build our audience.</p>
<h2 id="heading-what-do-i-mean-by-building-an-audience">What do I mean by building an audience?</h2>
<p>Your favorite web developers or social media influencers didn't start with 100,000 followers – most of them worked really hard to get where they are.  That process is what building an audience is all about.</p>
<p>By creating content, you're working to find others who enjoy your take or get inspired by it. Ideally, those same people will follow you on their favorite platform with the hope that your next piece will inspire them just the same.</p>
<p>Your audience is those people who followed you or are actively engaging with the content you create. The ones who are supporting you by giving a thumbs up to your new video. The ones who subscribe to <a target="_blank" href="https://www.colbyfayock.com/newsletter/">your newsletter</a> because they're eager to see the awesome work you did that week.</p>
<p>By working hard on your content, being consistent, and <a target="_blank" href="https://www.colbyfayock.com/2020/05/how-to-write-more-effectively-and-develop-your-unique-style/">finding your voice</a>, you'll naturally build that audience. But to build that audience, people first need to see it. So how can we get it in front of people?</p>
<h2 id="heading-leveraging-larger-platforms-and-publications">Leveraging larger platforms and publications</h2>
<p>While your new blog might not have anyone subscribed to your RSS feed, there are platforms out there with large audiences that are actively looking for more authors.</p>
<p>By leveraging these audiences, you're helping to get your foot in the door. While you might need to give up a little bit of ownership of the article by writing it somewhere that's not your own blog, you're providing a means for more people to read your content and find out who you are.</p>
<p>This process can take many forms, but I'm going to focus on a few things:</p>
<ul>
<li>Syndicating with other platforms</li>
<li>Contributing to other publications</li>
<li>Sharing on content curation platforms</li>
</ul>
<h2 id="heading-syndicating-with-other-platforms">Syndicating with other platforms</h2>
<p>Syndicating your content can be one of the more effective means of getting access to a larger network while holding on to a lot of the benefits of hosting your own content.</p>
<p>Not all platforms are the same, but most of the ones I'm going to go over allow you to provide a <a target="_blank" href="https://moz.com/learn/seo/canonicalization">canonical link</a> to your own website. What this does is allow you to publish your work on different platforms all while the "SEO juice" ultimately flows back to your own blog.</p>
<p>While it's important from an SEO perspective, it's also generally a good way to keep your content hosted on your own website where you know you'll maintain it for the foreseeable future. If one of those platforms ends up closing down, you still have all of your content safe at home.</p>
<p>So what are some platforms that we can syndicate with and how can you set it up?</p>
<h3 id="heading-devto">Dev.to</h3>
<p><a target="_blank" href="https://dev.to/">Dev.to</a> is the choice platform for developers who want to share their knowledge and open up conversation to the larger tech community. They provide an incredibly welcoming and safe space where developers experienced and new can publish their work.</p>
<p>The great part about it is that everyone seems to get a bit of a fair chance at getting their work out to the world. While they have similar features to other networks where you can follow your favorite authors, newer authors still show up in the content feed giving you a chance to be seen.</p>
<p>To syndicate on dev.to, you'll want to set up the canonical link in the post configuration. When editing the content, you'll want to look for the settings icon, where you'll then be provided with an input where you can add the original URL for your post.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/devto-post-canonical-url.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Adding a canonical URL to a dev.to post</em></p>
<h3 id="heading-medium">Medium</h3>
<p><a target="_blank" href="https://medium.com/">Medium</a> has suffered a lot of criticism lately due to its aggressive tactics and monetization strategies, but it's still an effective platform for newcomers who don't have an audience to get in front of.</p>
<p>Medium's large network of users and content curation makes it a great platform for expanding your reach. But it doesn't stop at posting there.</p>
<p>To be effective with your Medium posts, you want to look to get published with an existing Medium publication. <a target="_blank" href="https://medium.com/better-programming">Better Programming</a> is one of the larger developer publications that are always <a target="_blank" href="https://medium.com/better-programming/write-for-us-5c4bcba59397">looking for new authors</a> to contribute.</p>
<p>Submitting to a Medium publication will help you take advantage of not only Medium's network, but that publication's network that gives you a better chance of getting selected by Medium's curation team and landing in someone's newsletter inbox.</p>
<p>Adding a canonical link to your Medium posts is a bit trickier though. To do this, you must "import" your story rather than copy and pasting it in. The good news, is Medium also tries to import all of the content, ideally making it a bit easier to add (remember to review all of the formatting!).</p>
<p>On your Stories page, you can find the Import button.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/medium-import-story.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Importing a story on Medium</em></p>
<p>Once it's imported, you won't really be able to see much, but once you preview the page, you can view the source and find the canonical link added.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/06/medium-post-source-canonical-link.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Canonical link in Medium post source</em></p>
<h2 id="heading-contributing-to-other-publications">Contributing to other publications</h2>
<p>While you might have to give up ownership of your content, writing for other publications or writing as a "guest post" is a great way to get started and gain some ground where you might not have had any before.</p>
<p>Depending on the publisher, you might not ever get the opportunity to post it on your own website, but you're trading that for the privilege to get your work out to potentially millions of people instead of the 10 unique visitors from the month of May.</p>
<p>This can even open up the door to more opportunities. This helps give your name recognition and authority that can help in your job search or simply another chance to write for the same publisher or a different bigger one.</p>
<p>The good news – is there's an endless supply of big name publishers that you can submit your work to. Here are a few you can get started with:</p>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/developer-news-style-guide/">freeCodeCamp News</a></li>
<li><a target="_blank" href="https://www.smashingmagazine.com/write-for-us/">Smashing Magazine</a></li>
<li><a target="_blank" href="https://css-tricks.com/guest-posting/">CSS-Tricks</a></li>
<li><a target="_blank" href="https://sitepoint.typeform.com/to/DMmYfn">Sitepoint</a></li>
<li><a target="_blank" href="https://envato.formstack.com/forms/create_a_tutorial?Source=&amp;Medium=">Tuts+</a></li>
<li><a target="_blank" href="https://www.webdesignerdepot.com/write-for-us/">Web Designer Depot</a></li>
<li><a target="_blank" href="https://dzone.com/pages/contribute">DZone</a></li>
<li><a target="_blank" href="https://www.pluralsight.com/guides">Pluralsight Guides</a> (See "Teach" in footer)</li>
</ul>
<p>Each of these publications have different processes of getting published. So be patient and keep working hard at your content.</p>
<p><em>Note: know of another publisher that offers writing opportunities? <a target="_blank" href="https://twitter.com/colbyfayock">Let me know</a> and I'll add them above!</em></p>
<h2 id="heading-sharing-on-content-curation-platforms">Sharing on content curation platforms</h2>
<p>It would be great if we all had a massive Twitter following where we could post about our new blog, but that's typically not the case. So while you should absolutely set up a <a target="_blank" href="https://twitter.com/colbyfayock">social media profile</a> and get your content out there, I'll focus on other platforms here.</p>
<h3 id="heading-reddit">Reddit</h3>
<p>Though there are certainly rules about self-promotion depending on the subreddit, <a target="_blank" href="https://www.reddit.com/">Reddit's</a> a massive community of real people who are curious and eager to learn about something new.</p>
<p>Learn about the different tech or <a target="_blank" href="https://www.reddit.com/r/webdev/">webdev</a> subreddits that are out there. Start getting involved with other people's posts. Develop a relationship with the people there and show why your content has value.</p>
<h3 id="heading-hacker-news">Hacker News</h3>
<p><a target="_blank" href="https://news.ycombinator.com/">Hacker News</a> is tough. It's hard to get noticed and on the front page. And even when you get on the front page, there's a good chance you'll get a lot of criticism you never expected to get.</p>
<p>But if you can have thick skin and learn to take the heat should you get noticed, Hacker News can be an incredible way to broadcast to the world. People have turned into <a target="_blank" href="https://www.youtube.com/watch?v=ifq3xhik8tE">overnight successes</a> by ending up on the front page of Hacker News whether they're the ones who posted it there or not.</p>
<h3 id="heading-more-platforms">More platforms</h3>
<p>While those are two of the big ones, there are a ton more. Here are a few more to get you started:</p>
<ul>
<li><a target="_blank" href="https://www.echojs.com/">Echo JS</a></li>
<li><a target="_blank" href="http://www.rubyflow.com/">RubyFlow</a></li>
<li><a target="_blank" href="https://golangnews.com/">Golang News</a></li>
<li><a target="_blank" href="https://www.webdesignernews.com/">Web Designer News</a></li>
</ul>
<h2 id="heading-other-notable-places">Other notable places</h2>
<h3 id="heading-chat-based-communities">Chat-based Communities</h3>
<p>There are a ton of <a target="_blank" href="https://www.freecodecamp.org/news/freecodecamp-discord-chat-room-server/">communities</a> using platforms like <a target="_blank" href="https://slack.com/">Slack</a> or <a target="_blank" href="https://discord.com/">Discord</a> that are <a target="_blank" href="https://www.100daysofcode.com/resources/">incredibly supportive</a> in helping each other grow. While you shouldn't simply spam your content, try to start a conversation around it. Talk about why the topic is important to you or how your tutorial can help others in their code journey.</p>
<h3 id="heading-newsletters">Newsletters</h3>
<p>This is something a lot of people regret not starting earlier – myself included. It's not too much effort to start a newsletter <a target="_blank" href="https://app.convertkit.com/referrals/l/36ce3fce-f231-48b5-b878-e622d0265c3f">with a platform that has a free tier</a> and keep it in your back pocket until you see some growth. No one's going to judge you for waiting a few months to put out content, but once you begin to grow your audience, they'll be excited to see all of your new work.</p>
<h3 id="heading-other-peoples-newsletters">Other people's newsletters</h3>
<p>You don't have to have your own newsletter to get into someone's inbox, there are already a ton of newsletter curators doing a lot of hard work to find great content around the web, but if they don't see it, how can they include it?</p>
<p>Most newsletter publications love to receive submissions. This helps their publication grow and include content from people who might not have a good opportunity on their own.</p>
<p>While you can Google around and find a newsletter that makes sense for you, here are a few that I follow along with that I know would love to see your work:</p>
<ul>
<li>All <a target="_blank" href="https://cooperpress.com/publications/">Cooperpress</a> Publications including <a target="_blank" href="http://javascriptweekly.com/">Javascript Weekly</a>, <a target="_blank" href="https://serverless.email/">Serverless Status</a>, and <a target="_blank" href="https://cooperpress.com/publications/">a bunch more</a></li>
<li><a target="_blank" href="https://webtoolsweekly.com/">Web Tools Weekly</a></li>
<li><a target="_blank" href="https://css-weekly.com/">CSS Weekly</a></li>
</ul>
<h2 id="heading-building-your-brand">Building your "brand"</h2>
<p>"Brand" is a funny word and can come sometimes come with negative connotations. But really as an author, your goal should be to build a presence that you carry with you consistently through all of your different outlets of work.</p>
<p>For instance, when possible, try to always use the same username when creating author profiles. You can find me mostly anywhere at <a target="_blank" href="https://twitter.com/colbyfayock">@colbyfayock</a> – it makes it easy for people to find me on a new network.</p>
<p>Also try to use the same picture. While it's definitely fun to customize your different profiles depending on who's there, the benefit of using the same picture is people will come to recognize you by that picture. They'll instantly be able to remember they saw your blog post when they see your tweet come through their feed.</p>
<h2 id="heading-be-patient-your-time-will-come">Be patient, your time will come</h2>
<p>You're not going to find an overnight success without spending a lot of money, so be patient. Content development is hard, it takes time to both build an audience and figure out your voice.</p>
<p>But chances are, if this is your first article you've ever written, maybe that first publisher you sent it to wasn't interested in it.</p>
<p><strong>THAT'S OKAY!</strong> Don't give up! Send it to another publisher and try the original one for your next article. When I first started out, it took a few articles before I got accepted as an author to freeCodeCamp's Medium publication.</p>
<p>The more you write, the more <a target="_blank" href="https://www.colbyfayock.com/2020/05/how-to-write-more-effectively-and-develop-your-unique-style/">you'll learn about what's effective</a>. It's not a sprint – be patient and just keep up the hard work.</p>
<h2 id="heading-overcoming-the-fear-of-sharing-your-work">Overcoming the fear of sharing your work</h2>
<p>Most of these things aren't easy to do. The idea that you might have to face critical feedback of your work is absolutely scary!</p>
<p>But <a target="_blank" href="https://www.colbyfayock.com/2020/04/overcoming-your-fear-of-writing-and-how-you-can-find-motivation/">overcoming this fear</a> is an important step of the process. I personally struggled with this when I began writing, but the more you put yourself our there, the less scary it becomes and you'll quickly notice there aren't as many bad people out there looking to say bad things about your work.</p>
<p>Instead, you're opening yourself up to an opportunity to learn and grow. Though not everyone's the same, the tech community can be overwhelmingly welcoming and supportive. The more you share and put yourself out there, the more receptive people will be to wanting to hear what you have to say.</p>
<h2 id="heading-how-do-you-share-your-work">How do you share your work?</h2>
<p><a target="_blank" href="https://twitter.com/colbyfayock">Let me know on Twitter!</a></p>
<div id="colbyfayock-author-card">
  <p>
    <a href="https://twitter.com/colbyfayock">
      <img src="https://res.cloudinary.com/fay/image/upload/w_2000,h_400,c_fill,q_auto,f_auto/w_1020,c_fit,co_rgb:007079,g_north_west,x_635,y_70,l_text:Source%20Sans%20Pro_64_line_spacing_-10_bold:Colby%20Fayock/w_1020,c_fit,co_rgb:383f43,g_west,x_635,y_6,l_text:Source%20Sans%20Pro_44_line_spacing_0_normal:Follow%20me%20for%20more%20JavaScript%252c%20UX%252c%20and%20other%20interesting%20things!/w_1020,c_fit,co_rgb:007079,g_south_west,x_635,y_70,l_text:Source%20Sans%20Pro_40_line_spacing_-10_semibold:colbyfayock.com/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_68,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_145,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_222,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_295,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/v1/social-footer-card" alt="Follow me for more Javascript, UX, and other interesting things!" width="2000" height="400" loading="lazy">
    </a>
  </p>
  <ul>
    <li>
      <a href="https://twitter.com/colbyfayock">? Follow Me On Twitter</a>
    </li>
    <li>
      <a href="https://youtube.com/colbyfayock">?️ Subscribe To My Youtube</a>
    </li>
    <li>
      <a href="https://www.colbyfayock.com/newsletter/">✉️ Sign Up For My Newsletter</a>
    </li>
  </ul>
</div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Overcome Your Fear of Writing and Find Motivation to Start ]]>
                </title>
                <description>
                    <![CDATA[ Writing about our work is one of those things that most of us have on our to-do list. But whether it's due to procrastination or fear, we never actually get to it. Here's some more motivation and reasons why you should give it a shot! Why should we w... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/overcoming-your-fear-of-writing-and-how-you-can-find-motivation/</link>
                <guid isPermaLink="false">66bee941dceb56d88f491c64</guid>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                    <category>
                        <![CDATA[ code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ education ]]>
                    </category>
                
                    <category>
                        <![CDATA[ goal-setting ]]>
                    </category>
                
                    <category>
                        <![CDATA[ goals ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learn to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning ]]>
                    </category>
                
                    <category>
                        <![CDATA[ learning to code ]]>
                    </category>
                
                    <category>
                        <![CDATA[ motivation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ self-improvement  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ teaching ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technical writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ writing tips ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Colby Fayock ]]>
                </dc:creator>
                <pubDate>Thu, 30 Apr 2020 14:45:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/04/writing-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Writing about our work is one of those things that most of us have on our to-do list. But whether it's due to procrastination or fear, we never actually get to it. Here's some more motivation and reasons why you should give it a shot!</p>
<h2 id="heading-why-should-we-write-in-the-first-place">Why should we write in the first place?</h2>
<p>Maybe you've never thought about writing before or maybe you're looking for a little more motivation. Whatever the case, there are a lot of good reasons why writing can help us grow.</p>
<h3 id="heading-helping-others-to-learn">Helping others to learn</h3>
<p>Coding can be tough. And we all started somewhere at the beginning.</p>
<p>It's a long journey that each of us go through and it's even harder to go at it alone. Luckily, we've had websites like <a target="_blank" href="https://www.freecodecamp.org/">freecodecamp.org</a> and <a target="_blank" href="https://css-tricks.com/">css-tricks.com</a> along the way that have made that journey more manageable, but there's always going to be a challenge that just doesn't make sense.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/css-tricks-around-2011.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>CSS-Tricks around 2011 when I got my first official coding job via <a target="_blank" href="https://web.archive.org/web/20110701022701/http://css-tricks.com/">Way Back Machine</a></em></p>
<p>This is where we have an opportunity to share our experiences to help others grow. While our favorite coding sites have tons of amazing tutorials, maybe they're missing a key point someone needed to fully grasp the solution. </p>
<p>Whether you're at the beginning or middle of your journey, every experience, big or small, can help another developer on their own journey.</p>
<p>And this is where it can be rewarding. One of my favorite parts of writing has been getting a <a target="_blank" href="https://twitter.com/colbyfayock">Twitter</a> DM from someone about how <a target="_blank" href="https://www.freecodecamp.org/news/author/colbyfayock/">one of my tutorials</a> helped them learn. It's a great feeling knowing you helped someone else on their journey.</p>
<p>Take this as a way for you to give back to the community that helped you learn and grow.</p>
<h3 id="heading-reinforcing-your-learning">Reinforcing your learning</h3>
<p>Thinking back to your grade school Spanish class, one of the tricks to helping the students learn was to reinforce learning. Teachers use different methods like reading, writing, speaking, flashcards, or even that Cinco de Mayo fiesta where you learned about and celebrated Mexico's heritage to help make the language stick.</p>
<p>This applies to development concepts as well. While your solution is still fresh in your head, write it down! Being able to teach what you've learned by writing about it will help those concepts stick in your head.</p>
<p>And just because you write it, it doesn't mean you have to share it. If you're not comfortable sharing it with the world, just keep a copy in a private notebook. You'll always be able to reference it yourself and still reinforce what you know by writing it down.</p>
<h3 id="heading-documenting-our-experiences">Documenting our experiences</h3>
<p>Doubling up on reinforcing your learning, by writing about your experiences, you're kind of creating your own personal <a target="_blank" href="https://stackoverflow.com/">StackOverflow</a> with a list of problems you've already solved.</p>
<p>As much as we had hoped we would remember how to speak Spanish from the classes we took, 10 years goes by pretty quickly and you suddenly realize you can only correctly say "hola" in Spanish.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/hola-sign.jpg" alt="Image" width="600" height="400" loading="lazy">
_Hola sign from Jon Tyson on <a target="_blank" href="https://unsplash.com/photos/8MMtYM_3xMY">Unsplash</a>_</p>
<p>If you were the ambitious type, maybe you saved all of your notes. If not, maybe you remember a good website that has flashcards.</p>
<p>Either way, having resources to go back to, whether it's your own notes or that website you still have bookmarked, helps us to quickly reference challenges we've already come across. By writing down your experiences, you're adding to that digital notebook that you know you can always use to remember that quirk you fixed.</p>
<h3 id="heading-growing-your-personal-network">Growing your personal network</h3>
<p>Everyone has their own reasons for wanting to write and share content – and that's okay! While some of us might be doing this to help others learn, others might be simply trying to get a job or grow their Twitter following.</p>
<p>One of the benefits of sharing your experiences is that you're immediately growing the network of developers that have a little more insight into who you are and the work you've done.</p>
<p>This doesn't guarantee a job, but it certainly can help. All teams are a little different in how they recruit. Smaller teams tend to include other developers more in the beginning of the process who are probably more likely to open your blog and not only read a little bit, but actually understand it.</p>
<p>But even if you don't immediately get hired, you're playing the long game. Opportunities will start to come in small ways that lead to bigger opportunities down the road.</p>
<h2 id="heading-why-you-might-be-hesitating-and-how-we-can-look-at-it-another-way">Why you might be hesitating and how we can look at it another way</h2>
<p>Sometimes motivation isn't enough. We all have our personal challenges that might prevent us from doing something we want to do. But sometimes it's a matter of finding a different perspective to give you that bit of inspiration to finally dive in.</p>
<h3 id="heading-imposter-syndrome-who-am-i-to-write-about-this">Imposter syndrome – who am I to write about this?</h3>
<p>This is something I've personally struggled with for the majority of my career. Whether I was confident in my ability to do my job or not, I never felt like it was enough to be one of the people writing guides for others.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/colby-fayock-personal-website.jpg" alt="Image" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.colbyfayock.com/">My website and blog</a></em></p>
<p>It wasn't until another team member brought another perspective to this argument (thanks Marquet) – everyone learns differently and maybe my way of telling a story can help someone learn. </p>
<p>If someone doesn't read my work, what are the consequences beyond a little bit of wasted time? On the other hand, maybe my blog post resonated with someone in a way that other blog posts didn't and they were finally able to solve their problem.</p>
<p>And this goes for any level of experience. As <a target="_blank" href="https://twitter.com/swyx">Swyx</a> says, <a target="_blank" href="https://www.swyx.io/writing/learn-in-public/">the fastest way to learn is in public</a>. If you're not helping someone else, you're at least helping yourself grow.</p>
<h3 id="heading-finding-time-it-takes-a-while-to-write-a-post">Finding time – it takes a while to write a post</h3>
<p>Time is a funny thing – it becomes an excuse that we use when we don't want to admit the real reason we're holding back.</p>
<p>Of course that's not always the case. Realistically a lot of us have a ton on our plates already whether we work, take care of a family, or are volunteering to help others. It can be a struggle to not want to just sit on the couch after a hard day's work.</p>
<p>But consider the free time you do have. Can you spare 10 minutes jotting down a few notes or even starting an outline of some things you want to say?</p>
<p>While 10 minutes won't write a whole post, if you start the habit and write another paragraph or two every day, you'll slowly end up with a blog post that you can feel good about sharing.</p>
<p>Just don't set the bar too high. If you start off with an unrealistic goal, you're likely to burn out fast and end up back in the same position you're at now.</p>
<h3 id="heading-no-topic-not-knowing-what-to-write-about">No topic – not knowing what to write about</h3>
<p>From speaking with other developers, I've noticed this seems to be tied a little bit to imposter syndrome. Maybe you're getting confident enough that you're more willing to write, but you're struggling to find what to write about. Is it because you can't think of a topic or is it because every topic you think about, you don't think you're enough of an expert to write about it?</p>
<p>Not having a topic can be a legitimate problem, but there's inspiration all around us. If you're working every day as a developer, you're working on problems that you ultimately need to solve. Why not write about those problems? And if you can't write about the problems due to contract concerns, what about writing about them in an abstract way without any sensitive information?</p>
<p>Inspiration for me comes from my experience talking with others. I'm lucky to be on a team that encourages growth of junior developers and during my time helping them out, their questions lead me to think about topics that I took for granted.</p>
<p>Whenever a topic like that comes up, I immediately note it down for later. This topic was on that list! Over time, my list of topics has grown to a point where I don't think I'll even finish it by the end of the year.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/list-of-topic-ideas.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>My personal list of topic ideas</em></p>
<p>While that could feel overwhelming, it's also motivates me to have a bigger selection of what I'm in the mood to write about rather than forcing myself to both think of a new topic and write about something I don't want to write about each week.</p>
<p>Whatever the case, find your source of inspiration. You don't need to be an expert on it. It doesn't matter if someone more experienced already wrote about it. Write what you know. Share your experiences. Maybe you'll help someone see the problem from a different perspective.</p>
<h2 id="heading-finding-what-motivates-you">Finding what motivates you</h2>
<p>At the end of the day, writing is something that each of us will need to find our own motivation to do.</p>
<p>Try to evaluate your goals. What are you looking to achieve? If writing is something you truly want to do, you'll need to find your own source of inspiration.</p>
<p>While some reasons might be more valid than others, it's easier to find reasons not to do something than it is to do it.</p>
<p>You got this! ?</p>
<div id="colbyfayock-author-card">
  <p>
    <a href="https://twitter.com/colbyfayock">
      <img src="https://res.cloudinary.com/fay/image/upload/w_2000,h_400,c_fill,q_auto,f_auto/w_1020,c_fit,co_rgb:007079,g_north_west,x_635,y_70,l_text:Source%20Sans%20Pro_64_line_spacing_-10_bold:Colby%20Fayock/w_1020,c_fit,co_rgb:383f43,g_west,x_635,y_6,l_text:Source%20Sans%20Pro_44_line_spacing_0_normal:Follow%20me%20for%20more%20JavaScript%252c%20UX%252c%20and%20other%20interesting%20things!/w_1020,c_fit,co_rgb:007079,g_south_west,x_635,y_70,l_text:Source%20Sans%20Pro_40_line_spacing_-10_semibold:colbyfayock.com/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_68,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_145,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_222,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_295,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/v1/social-footer-card" alt="Follow me for more Javascript, UX, and other interesting things!" width="2000" height="400" loading="lazy">
    </a>
  </p>
  <ul>
    <li>
      <a href="https://twitter.com/colbyfayock">? Follow Me On Twitter</a>
    </li>
    <li>
      <a href="https://youtube.com/colbyfayock">?️ Subscribe To My Youtube</a>
    </li>
    <li>
      <a href="https://www.colbyfayock.com/newsletter/">✉️ Sign Up For My Newsletter</a>
    </li>
  </ul>
</div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How To Embed Multiple Choice Quiz Questions into Your Article ]]>
                </title>
                <description>
                    <![CDATA[ By Alexander Arobelidze In my experience, supplementing study with practical exercises greatly improves my understanding of a topic. This is especially true when I can test my knowledge as I go and receive instant feedback for each question. The mult... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/multiple-choice-quiz-template/</link>
                <guid isPermaLink="false">66d45d61230dff01669057a1</guid>
                
                    <category>
                        <![CDATA[ blog ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Blogging ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 06 Apr 2020 08:30:53 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9bc5740569d1a4ca2dcf.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Alexander Arobelidze</p>
<p>In my experience, supplementing study with practical exercises greatly improves my understanding of a topic. This is especially true when I can test my knowledge as I go and receive instant feedback for each question.</p>
<p>The multiple choice quiz format is perfect for this. I developed a method to embed multiple choice questions in the math articles I write for freeCodeCamp, and I want to show other authors how to do the same.</p>
<h2 id="heading-how-to-add-code-to-your-article">How to add code to your article</h2>
<p>The Ghost editor allows you to embed blocks of code throughout an article. The code editor can be accessed by clicking the round button with a plus sign <strong>(+)</strong> used for adding images, YouTube videos, and so on:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/image-25.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Click on the "HTML" button to add an editor to the article. The editor supports HTML, CSS, and even JavaScript.</p>
<p>Once you start adding code, click anywhere outside the editor frame to render the code and view your progress. Double click on the rendered output to reopen the editor window:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/editor.gif" alt="Image" width="600" height="400" loading="lazy"></p>
<p>To test the functionality of your code, save the article by pressing Ctrl/⌘ + S, then click on the "View Preview" button that appears in the bottom left corner:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/04/image-26.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Your article will open in a separate tab where you can see how your code will be rendered once your article is published. Take some time to check on the styling and functionality of your multiple choice quiz.</p>
<p>Boilerplate code for the multiple choice quiz is available in the next section. All you need to do is paste it into your own article and change the question and answers.</p>
<h2 id="heading-how-the-multiple-choice-quiz-works">How the multiple choice quiz works</h2>
<p>You can add as many different questions as you want. However, while your article might have multiple quizzes, they're all contained within a <strong>single HTML body</strong> behind the scenes. Each question element starts with the following code:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(0.65); position: relative; top: -100px;'</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">h3</span>&gt;</span>WRITE YOUR QUESTION HERE<span class="hljs-tag">&lt;/<span class="hljs-name">h3</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Choose 1 answer<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">hr</span> /&gt;</span>
</code></pre>
<p>Each of the following <code>div</code> elements contains a possible answer:</p>
<pre><code class="lang-html">  ...
  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'block-11'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'padding: 10px;'</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">'option-11'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">' padding: 5px; font-size: 2.5rem;'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'radio'</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'option'</span> <span class="hljs-attr">value</span>=<span class="hljs-string">'6/24'</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'option-11'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(1.6); margin-right: 10px; vertical-align: middle; margin-top: -2px;'</span> /&gt;</span>
      ANSWER 1<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'result-11'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</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">hr</span> /&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'block-12'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'padding: 10px;'</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">'option-12'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">' padding: 5px; font-size: 2.5rem;'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'radio'</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'option'</span> <span class="hljs-attr">value</span>=<span class="hljs-string">'6'</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'option-12'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(1.6); margin-right: 10px; vertical-align: middle; margin-top: -2px;'</span> /&gt;</span>
      ANSWER 2<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'result-12'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</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">hr</span> /&gt;</span>
  ...
</code></pre>
<p>At the time of writing, Ghost's embedded code editor does not support template literals, so some things have to be hard coded. </p>
<p>Remember that all the questions are essentially loaded together behind the scenes, so the two digit numbers in each <code>id</code> represent the following:</p>
<ul>
<li>The <strong>first</strong> digit indicates the order of the multiple choice question in the article (1 is question one, 2 is question two, and so on)</li>
<li>The <strong>second</strong> digit indicates the order of each possible answer within its question block (1 is answer choice one, 2 is answer choice two, etc.)</li>
</ul>
<p>For example, <code>block-12</code> represents <strong>question</strong> <strong>1/answer choice 2</strong>, while <code>block-43</code> is <strong>question 4/answer choice 3</strong>.</p>
<p>This indexing convention is necessary for different question blocks to function independently from each other.</p>
<p>Similar logic applies to the function names responsible for interactivity. The code that handles user interaction is placed within <code>&lt;script&gt;</code> tags and consists of two parts. First part is the function that evaluates answers and displays results: </p>
<pre><code class="lang-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">displayAnswer1</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-11'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-11'</span>).style.border = <span class="hljs-string">'3px solid limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).style.color = <span class="hljs-string">'limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).innerHTML = <span class="hljs-string">'Correct!'</span>
    }
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-12'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-12'</span>).style.border = <span class="hljs-string">'3px solid red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-12'</span>).style.color = <span class="hljs-string">'red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-12'</span>).innerHTML = <span class="hljs-string">'Incorrect!'</span>
      showCorrectAnswer1()
    }
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-13'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-13'</span>).style.border = <span class="hljs-string">'3px solid red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-13'</span>).style.color = <span class="hljs-string">'red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-13'</span>).innerHTML = <span class="hljs-string">'Incorrect!'</span>
      showCorrectAnswer1()
    }
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-14'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-14'</span>).style.border = <span class="hljs-string">'3px solid red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-14'</span>).style.color = <span class="hljs-string">'red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-14'</span>).innerHTML = <span class="hljs-string">'Incorrect!'</span>
      showCorrectAnswer1()
    }
  }
</code></pre>
<p>Like the name suggests, the <code>displayAnswer1</code> function handles the first question within an article. If there's a third question in your article, <code>displayAnswer3</code> will handle it.</p>
<p>In the example above, <code>option-11</code> is the correct answer, and the styling in the first <code>if</code> block is updated to show the right answer was selected. If any of the other incorrect answers are selected, the styling is updated to reflect that.</p>
<p>Feel free to play with the <code>displayAnswer_</code> functions in your own article. Just remember to attach the appropriate styling to the correct and incorrect answers.</p>
<p>Here's the second part of the code that handles user interaction:</p>
<pre><code class="lang-js"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">showCorrectAnswer1</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">let</span> showAnswer1 = <span class="hljs-built_in">document</span>.createElement(<span class="hljs-string">'p'</span>)
    showAnswer1.innerHTML = <span class="hljs-string">'Show Corrent Answer'</span>
    showAnswer1.style.position = <span class="hljs-string">'relative'</span>
    showAnswer1.style.top = <span class="hljs-string">'-180px'</span>
    showAnswer1.style.fontSize = <span class="hljs-string">'1.75rem'</span>
    <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'showanswer1'</span>).appendChild(showAnswer1)
    showAnswer1.addEventListener(<span class="hljs-string">'click'</span>, <span class="hljs-function">() =&gt;</span> {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-11'</span>).style.border = <span class="hljs-string">'3px solid limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).style.color = <span class="hljs-string">'limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).innerHTML = <span class="hljs-string">'Correct!'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'showanswer1'</span>).removeChild(showAnswer1)
    })
  }
</code></pre>
<p>This function is called <code>showCorrectAnswer1</code> because it handles the first multiple choice question in the article. You'll have to add <code>showCorrectAnswer2</code>, <code>showCorrectAnswer3</code>, and more if your article has more than one question.</p>
<p>Please play around with the styling and dimensions used throughout the code, and customize it to your taste. Also, I'm sure there are other ways to implement multiple choice quizzes, but this is mine, and I'm happy to share it with you.</p>
<p>Here's the full code and a working example:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(0.65); position: relative; top: -100px;'</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">h3</span>&gt;</span>What fraction of a day is 6 hours?<span class="hljs-tag">&lt;/<span class="hljs-name">h3</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Choose 1 answer<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">hr</span> /&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'block-11'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'padding: 10px;'</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">'option-11'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">' padding: 5px; font-size: 2.5rem;'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'radio'</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'option'</span> <span class="hljs-attr">value</span>=<span class="hljs-string">'6/24'</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'option-11'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(1.6); margin-right: 10px; vertical-align: middle; margin-top: -2px;'</span> /&gt;</span>
      6/24<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'result-11'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</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">hr</span> /&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'block-12'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'padding: 10px;'</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">'option-12'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">' padding: 5px; font-size: 2.5rem;'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'radio'</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'option'</span> <span class="hljs-attr">value</span>=<span class="hljs-string">'6'</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'option-12'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(1.6); margin-right: 10px; vertical-align: middle; margin-top: -2px;'</span> /&gt;</span>
      6<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'result-12'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</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">hr</span> /&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'block-13'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'padding: 10px;'</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">'option-13'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">' padding: 5px; font-size: 2.5rem;'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'radio'</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'option'</span> <span class="hljs-attr">value</span>=<span class="hljs-string">'1/3'</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'option-13'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(1.6); margin-right: 10px; vertical-align: middle; margin-top: -2px;'</span> /&gt;</span>
      1/3<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'result-13'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</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">hr</span> /&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'block-14'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'padding: 10px;'</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">label</span> <span class="hljs-attr">for</span>=<span class="hljs-string">'option-14'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">' padding: 5px; font-size: 2.5rem;'</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">input</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'radio'</span> <span class="hljs-attr">name</span>=<span class="hljs-string">'option'</span> <span class="hljs-attr">value</span>=<span class="hljs-string">'1/6'</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'option-14'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'transform: scale(1.6); margin-right: 10px; vertical-align: middle; margin-top: -2px;'</span> /&gt;</span>
      1/6<span class="hljs-tag">&lt;/<span class="hljs-name">label</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'result-14'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</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">hr</span> /&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">type</span>=<span class="hljs-string">'button'</span> <span class="hljs-attr">onclick</span>=<span class="hljs-string">'displayAnswer1()'</span> <span class="hljs-attr">style</span>=<span class="hljs-string">'width: 100px; height: 40px; border-radius: 3px; background-color: lightblue; font-weight: 700;'</span>&gt;</span>Submit<span class="hljs-tag">&lt;/<span class="hljs-name">button</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">a</span> <span class="hljs-attr">id</span>=<span class="hljs-string">'showanswer1'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
  <span class="hljs-comment">//    The function evaluates the answer and displays result</span>
  <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">displayAnswer1</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-11'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-11'</span>).style.border = <span class="hljs-string">'3px solid limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).style.color = <span class="hljs-string">'limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).innerHTML = <span class="hljs-string">'Correct!'</span>
    }
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-12'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-12'</span>).style.border = <span class="hljs-string">'3px solid red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-12'</span>).style.color = <span class="hljs-string">'red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-12'</span>).innerHTML = <span class="hljs-string">'Incorrect!'</span>
      showCorrectAnswer1()
    }
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-13'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-13'</span>).style.border = <span class="hljs-string">'3px solid red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-13'</span>).style.color = <span class="hljs-string">'red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-13'</span>).innerHTML = <span class="hljs-string">'Incorrect!'</span>
      showCorrectAnswer1()
    }
    <span class="hljs-keyword">if</span> (<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'option-14'</span>).checked) {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-14'</span>).style.border = <span class="hljs-string">'3px solid red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-14'</span>).style.color = <span class="hljs-string">'red'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-14'</span>).innerHTML = <span class="hljs-string">'Incorrect!'</span>
      showCorrectAnswer1()
    }
  }
  <span class="hljs-comment">// the functon displays the link to the correct answer</span>
  <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">showCorrectAnswer1</span>(<span class="hljs-params"></span>) </span>{
    <span class="hljs-keyword">let</span> showAnswer1 = <span class="hljs-built_in">document</span>.createElement(<span class="hljs-string">'p'</span>)
    showAnswer1.innerHTML = <span class="hljs-string">'Show Corrent Answer'</span>
    showAnswer1.style.position = <span class="hljs-string">'relative'</span>
    showAnswer1.style.top = <span class="hljs-string">'-180px'</span>
    showAnswer1.style.fontSize = <span class="hljs-string">'1.75rem'</span>
    <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'showanswer1'</span>).appendChild(showAnswer1)
    showAnswer1.addEventListener(<span class="hljs-string">'click'</span>, <span class="hljs-function">() =&gt;</span> {
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'block-11'</span>).style.border = <span class="hljs-string">'3px solid limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).style.color = <span class="hljs-string">'limegreen'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'result-11'</span>).innerHTML = <span class="hljs-string">'Correct!'</span>
      <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'showanswer1'</span>).removeChild(showAnswer1)
    })
  }
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
</code></pre>
<p></p><div>
  <h3 id="heading-what-fraction-of-a-day-is-6-hours">What fraction of a day is 6 hours?</h3>
  <p>Choose 1 answer</p>
  <hr><p></p>
<p>  </p><div id="block-11">
    
      
      6/24
    <span id="result-11"></span>
  </div>
  <hr><p></p>
<p>  </p><div id="block-12">
    
      
      6
    <span id="result-12"></span>
  </div>
  <hr><p></p>
<p>  </p><div id="block-13">
    
      
      1/3
    <span id="result-13"></span>
  </div>
  <hr><p></p>
<p>  </p><div id="block-14">
    
      
      1/6
    <span id="result-14"></span>
  </div>
  <hr>
  Submit
</div>
<a id="showanswer1"></a><p></p>


<p>You can also find the complete boilerplate code <a target="_blank" href="https://github.com/sandroarobeli/quiz-template/blob/master/testTemplateHTML.txt">here on GitHub</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
