<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayotunde Ikuesan</title>
    <description>The latest articles on DEV Community by Ayotunde Ikuesan (@tundeio).</description>
    <link>https://dev.to/tundeio</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F253424%2F59487810-62aa-4cec-a74c-77fb3f989b39.jpg</url>
      <title>DEV Community: Ayotunde Ikuesan</title>
      <link>https://dev.to/tundeio</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tundeio"/>
    <language>en</language>
    <item>
      <title>The best way to start your developer career</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Fri, 19 Aug 2022 11:27:00 +0000</pubDate>
      <link>https://dev.to/tundeio/the-best-way-to-start-your-developer-career-517j</link>
      <guid>https://dev.to/tundeio/the-best-way-to-start-your-developer-career-517j</guid>
      <description>&lt;p&gt;I get this question a lot:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ayooooo! I wanna get into coding. What languages do you recommend?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Normally, I’d give the standard answer of Python or Javascript — each being a widely adopted language with many great resources available for learning. But lately I’ve been giving that response a little more thought.&lt;/p&gt;

&lt;p&gt;In my opinion, the best way to start your developer career is by investing your time and energy into something that inspires you about technology. For example, if you like using apps, learn to make one yourself. If web design interests you, learn how to create a website. If you’re more into algorithms and maths, why not focus on something related to data science or machine learning?&lt;/p&gt;

&lt;p&gt;The reason I say this is because from my own personal experience, I feel like focussing on web and mobile app development would have been a better use of my time at uni. Don’t get me wrong, all four years were incredibly valuable for learning theories &amp;amp; concepts, increasing my chances of employability and of course, making good friends. But (speaking only technically), I’ve only used a subset of what I’ve learnt from my degree in the real world and everything I’ve learned about web development since I did via some YouTube videos &amp;amp; online tutorials.&lt;/p&gt;

&lt;p&gt;If getting a degree in computer science isn’t looking like an option, or something you’re not interested in, a lot of the online courses available assume no prior programming knowledge. This makes it even easier for beginners to get into coding — if you were worried you needed to know the basics beforehand. Not to mention, these courses are typically much cheaper than a £9000+ per year degree (at least here in the UK). For instance, &lt;a href="https://www.freecodecamp.org"&gt;freeCodeCamp&lt;/a&gt; offers a wealth of knowledge and certifications for absolutely no fee whatsoever. People literally use the platform to get the knowledge they need and then get the job they want.&lt;/p&gt;

&lt;p&gt;Speaking of which, if you’re completely stuck and don’t know where to begin, I’d recommend taking a look at a few junior level job adverts and taking note of what sort of programming languages and tools they expect you to be familiar with. Find some trends and commonalities in those ads and then, commit to learning that tech! Once you’re comfortable, use those skills to build a portfolio that will demonstrate your abilities to potential employers. The earlier exposure you have to the languages and tools you’ll be working with every day, the better!&lt;/p&gt;

&lt;p&gt;If you were looking for some quick and dirty method to start your coding career, this probably isn’t what you wanted to read. Not gonna lie, coding in general is not the most straightforward thing to pick up and instantly become a master at. Even I still question my life choices every time I’m left gazing upon a meaty bug. But it’s the same with anything worthwhile — your time, energy and genuine commitment will be required to succeed. So regardless of whatever you’re seeking to learn, commit to it and you’ll get there. 💪🏾&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Privacy first analytics with Cloudflare Web Analytics</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Mon, 02 May 2022 07:41:15 +0000</pubDate>
      <link>https://dev.to/tundeio/privacy-first-analytics-with-cloudflare-web-analytics-1l2c</link>
      <guid>https://dev.to/tundeio/privacy-first-analytics-with-cloudflare-web-analytics-1l2c</guid>
      <description>&lt;p&gt;&lt;em&gt;&amp;gt; “We use cookies to track your activity across the internet and build a personalised profile about your interests, background and location so advertisers can sell you stuff you’re likely to be interested in but don’t actually need. Is that cool?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No. I’m tired of having to reject all non-essential cookies from almost every single website I visit online. Similarly, when I’m building a website, the last thing I want to do is put anyone else through that burden. However, when I was building &lt;a href="https://www.tunde.io" rel="noopener noreferrer"&gt;my website&lt;/a&gt;, I didn’t want to be without a way to track which pages and blog posts were popular and where my visitors were coming from… And I wanted to do it for free.&lt;/p&gt;

&lt;p&gt;The natural choice was to go for Google Analytics, but apart from it &lt;a href="https://plausible.io/blog/google-analytics-illegal" rel="noopener noreferrer"&gt;now apparently being “illegal”&lt;/a&gt;, I’d be injecting one of the most invasive tracking cookies into my visitor’s browsers - which I wanted to avoid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Cloudflare Web Analytics
&lt;/h2&gt;

&lt;p&gt;The thing is, when something is free, you normally pay for it in some other way. Google Analytics is a free, effective service for tracking a wide array of site metrics, but it does so at the expense of user’s data. &lt;a href="https://www.cloudflare.com/web-analytics/" rel="noopener noreferrer"&gt;Cloudflare Web Analytics&lt;/a&gt; on the other hand is a totally free service that does not collect or use any personal data from users. The tool provides exactly all the information I’m looking for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Page views&lt;/li&gt;
&lt;li&gt;Popular browsers, devices &amp;amp; operating systems&lt;/li&gt;
&lt;li&gt;Referrers&lt;/li&gt;
&lt;li&gt;Geographical location of visitors (by country)&lt;/li&gt;
&lt;li&gt;Core Web Vitals (LCP, FID, CLS)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a low-traffic website like mine, there’s not much else I can ask for.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does it work?
&lt;/h2&gt;

&lt;p&gt;After signing up for a free account with Cloudflare, there’s two options for getting analytics working on your site.&lt;/p&gt;

&lt;p&gt;If your domain’s DNS records are using Cloudflare’s nameservers, then you can simply select your domain from the admin interface and you’re good to go!&lt;/p&gt;

&lt;p&gt;If not, then you’ll need to add a lightweight script to your website in order to start tracking.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;‹script defer src="https://static.cloudflareinsights.com/beacon.min.js"
    data-cf-beacon='{"token":"your-script-token"}'&amp;gt;
‹script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;small&gt;&lt;br&gt;
If you test on multiple environments, no need to worry, as the tracking only applies to a single hostname you define — i.e. &lt;code&gt;www.yourwebsite.com&lt;/code&gt;&lt;br&gt;
&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;The best thing about both of these methods, is that there’s no need for yet another cookie banner to find its way onto the internet! 🙌🏾&lt;/p&gt;

&lt;h2&gt;
  
  
  Is it enough?
&lt;/h2&gt;

&lt;p&gt;For businesses, marketers and content creators trying to understand user behaviours and drive conversion rates, then it’s likely that Cloudflare Web Analytics won’t be enough. For example, I couldn’t find any options for tracking  outbound button clicks. Also, data is restricted to 15 items on any report. So you’ll only see the top 15 pages, browsers, countries and so on, at any one time. Whether or not you decide to use CWA will come down to your own needs and assessment of the tool.&lt;/p&gt;

&lt;p&gt;But if you are looking for a simple, free, privacy-focussed tool to track metrics on your website then Cloudflare Web Analytics is a pretty good option. However, if you don't mind paying and want a little more data &amp;amp; extra features, &lt;a href="https://plausible.io" rel="noopener noreferrer"&gt;Plausible.io&lt;/a&gt; looks like another great option that maintains user's privacy.&lt;/p&gt;

&lt;p&gt;Either way, leave the cookies in the cookie jar.&lt;/p&gt;

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

</description>
      <category>webdev</category>
      <category>privacy</category>
    </item>
    <item>
      <title>How to optimise remote images in Gatsby</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Mon, 02 May 2022 07:28:28 +0000</pubDate>
      <link>https://dev.to/tundeio/how-to-optimise-remote-images-in-gatsby-jah</link>
      <guid>https://dev.to/tundeio/how-to-optimise-remote-images-in-gatsby-jah</guid>
      <description>&lt;p&gt;GatsbyJS is awesome for creating fast, scalable, static websites that source content from anywhere. Whilst a lot of the major plugins for feeding data into your site support the Gatsby image optimisation plugin (&lt;a href="https://www.gatsbyjs.com/plugins/gatsby-plugin-image/"&gt;gatsby-plugin-image&lt;/a&gt;) out-of-the-box, it’s not the case for all. Luckily for us, it's simple to transform such images and make them utilise that optimising goodness! 🤤&lt;/p&gt;

&lt;h2&gt;
  
  
  Why bother?
&lt;/h2&gt;

&lt;p&gt;In the relentless pursuit of owning a &lt;a href="https://mcdsystems.co.uk/lighthouse-scores-what-are-they-and-why-are-they-important/"&gt;perfect Lighthouse score&lt;/a&gt; for your website, having properly optimised images is only going to help. The file sizes are smaller overall, so it's quicker to load a webpage on devices with a dodgy internet connection. Also, using responsive images that are sized according to the device width, is going to ensure your images look great on all screen sizes. i.e. who wants to wait for an 8K image to load on their 4-inch iPhone SE? If you want to follow the best practices and recommendations for building a modern website, your images have got to be optimised.&lt;/p&gt;

&lt;p&gt;So let's get it working for Gatsby!&lt;/p&gt;

&lt;h2&gt;
  
  
  Update project dependencies
&lt;/h2&gt;

&lt;p&gt;In order to get things working, we need to first update our project dependencies. Run the following command in a Gatsby project directory to get all the necessary packages for optimising images:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;yarn add gatsby-plugin-image gatsby-plugin-sharp gatsby-source-filesystem gatsby-transformer-sharp&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And just in case you're wondering, here's what each plugin does:&lt;br&gt;
&lt;code&gt;gatsby-plugin-image&lt;/code&gt; creates responsive, optimised images for our Gatsby site.&lt;br&gt;
&lt;code&gt;gatsby-source-filesystem&lt;/code&gt; creates file nodes from our remote images.&lt;br&gt;
&lt;code&gt;gatsby-plugin-sharp&lt;/code&gt; handles the processing of our images.&lt;br&gt;
&lt;code&gt;gatsby-transformer-sharp&lt;/code&gt; creates the necessary nodes we can query with GraphQL for our site in conjunction with &lt;code&gt;gatsby-source-filesystem&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next, we should get our source plugin where we'll pull content into our Gatsby site. For this tutorial we'll use &lt;a href="https://github.com/TryGhost/gatsby-source-ghost"&gt;gatsby-source-ghost&lt;/a&gt; to pull content from a Ghost blog, but feel free to use any other source plugin.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;yarn add gatsby-source-ghost&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, check out this &lt;a href="https://github.com/tundeio/gatsby-optimise-remote-images"&gt;GitHub repo&lt;/a&gt; where you’ll find all the dependencies and the completed example project.&lt;/p&gt;

&lt;p&gt;Now we just need to add our new plugins to the list of plugins in &lt;code&gt;gatsby-config.js&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require("dotenv").config({
  path: `.env.${process.env.NODE_ENV}`,
})
module.exports = {
  siteMetadata: {
    siteUrl: "https://www.example.tld",
    title: "gatsby-optimise-remote-images",
  },
  plugins: [
    "gatsby-plugin-image",
    "gatsby-plugin-sharp",
    "gatsby-transformer-sharp",
    {
      resolve: "gatsby-source-ghost",
      options: {
        apiUrl: process.env.GHOST_API_URL,
        contentApiKey: process.env.GHOST_API_KEY,
        version: "v3",
      },
    },
  ],
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;small&gt;&lt;br&gt;
If you don’t have a Ghost blog already, &lt;a href="https://ghost.org/docs/install/local/"&gt;follow these instructions&lt;/a&gt; to set one up on your machine. If you need API keys, &lt;a href="https://ghost.org/integrations/custom-integrations/#add-a-new-custom-integration"&gt;this guide&lt;/a&gt; will show you what to do. Just be sure to put them into a &lt;code&gt;.env.development&lt;/code&gt; file.&lt;/small&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Create remote nodes for GraphQL queries
&lt;/h2&gt;

&lt;p&gt;Now with our dependencies installed, we can move on to creating the necessary nodes for our optimised remote images. With this, we can include the nodes in our GraphQL queries and access the necessary data to feed into the &lt;code&gt;GatsbyImage&lt;/code&gt; component, which will optimise our images.&lt;/p&gt;

&lt;p&gt;Create the file &lt;code&gt;gatsby-node.js&lt;/code&gt; if you don't have it already and add in the following code. Peep the comments if you want to know what’s going on! 👀&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// gatsby-node,js
const { createRemoteFileNode } = require("gatsby-source-filesystem"); // We'll use this to create the file nodes from the remote images
exports.createSchemaCustomization = ({ actions }) =&amp;gt; {
  const { createTypes } = actions;

  // creates a relationship between GhostPost and the File node for the optimized image
  createTypes(`
    type GhostPost implements Node {
      remote_image: File @link
    }
  `); // change "GhostPost" to whatever type you're using from your source plugin
};
exports.onCreateNode = async ({
  actions: { createNode },
  getCache,
  createNodeId,
  node, }) =&amp;gt; {
  // we need to verify that we're using the correct node created by our source plugin so we check its type and if it has a value
  if (node.internal.type === `GhostPost` &amp;amp;&amp;amp; node.feature_image !== null) {
    // create the file node
    const fileNode = await createRemoteFileNode({
      url: node.feature_image, // URL of the remote image
      getCache, // Gatsby cache
      createNode, // helper function to generate the node
      createNodeId, // helper function to generate the node ID
      parentNodeId: node.id, // id of the parent node of the file
      node
    });
    // if the file node was created, attach the new node
    if (fileNode) {
      node.remote_image = fileNode.id;
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we can access our new remote images for optimisation in our GraphQL queries! 🎉 Put simply, all that we're doing here is downloading the remote images to the filesystem, so that Gatsby can use the created files and optimise our images for us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage in pages
&lt;/h2&gt;

&lt;p&gt;Adding the optimised images to our site is exactly the same procedure we would use for adding a locally sourced image. We just need to update the GraphQL query. Let's test this out by adding a list of our blog posts to the home page, with their featured images displayed as well. This is where we'll make use of the &lt;code&gt;GatsbyImage&lt;/code&gt; component. Replace everything in &lt;code&gt;src/pages/index.js&lt;/code&gt; with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// src/pages/index.js
import * as React from "react"
import { Link, graphql } from "gatsby"
import { GatsbyImage } from "gatsby-plugin-image"
const IndexPage = ({ data }) =&amp;gt; {
  const blogPosts = data.allGhostPost.edges
  return (
    &amp;lt;&amp;gt;
      &amp;lt;h1&amp;gt;Blog Posts&amp;lt;/h1&amp;gt;
      &amp;lt;div&amp;gt;
        &amp;lt;ul&amp;gt;
          {blogPosts.map((post, i) =&amp;gt; (
            &amp;lt;li key={I}&amp;gt;
              &amp;lt;Link to={post.node.slug}&amp;gt;
                {/* GatsbyImage component to render our optimised image */}
                &amp;lt;GatsbyImage
                  image={post.node.remote_image.childImageSharp.gatsbyImageData}
                  alt={post.node.title}
                /&amp;gt;
                &amp;lt;p&amp;gt;{post.node.title}&amp;lt;/p&amp;gt;
              &amp;lt;/Link&amp;gt;
            &amp;lt;/li&amp;gt;
          ))}
        &amp;lt;/ul&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/&amp;gt;
  )
}
export default IndexPage
export const IndexQuery = graphql`
  query blogListQuery {
    allGhostPost(sort: { fields: [published_at], order: DESC }) {
      edges {
        node {
          slug
          title
          published_at(formatString: "DD MMMM YYYY")
          remote_image {
            childImageSharp {
              # this is the field which we'll pass into the GatsbyImage component
              # we add the DOMINANT_COLOR placeholder to make a nice effect when lazy loading
              gatsbyImageData(placeholder: DOMINANT_COLOR)
            }
          }
        }
      }
    }
  }
`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! Run &lt;code&gt;yarn develop&lt;/code&gt; in your terminal and navigate to &lt;a href="http://localhost:8000"&gt;http://localhost:8000/&lt;/a&gt; to see it all in action. Don't forget to add some styles to make it all look 🔥&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>gatsby</category>
    </item>
    <item>
      <title>Building my new website with NextJS, Ghost and Tailwind</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Fri, 04 Mar 2022 06:48:16 +0000</pubDate>
      <link>https://dev.to/tundeio/building-my-new-website-with-nextjs-ghost-and-tailwind-377d</link>
      <guid>https://dev.to/tundeio/building-my-new-website-with-nextjs-ghost-and-tailwind-377d</guid>
      <description>&lt;p&gt;For some reason, rebuilding my website from scratch has become some kind of yearly, unforced habit of mine. 2021 was a miss, but now in 2022 we’re back on track. With each iteration, I try to find a way to make some aspect of the site better. It’s a fun little side project I spend way too much time on.&lt;/p&gt;

&lt;p&gt;This time, the focus was a little different. It wasn’t so much about making the technical implementation better, but instead, concentrating on one of my favourite hobbies: writing. In 2021 I wrote and published exactly &lt;em&gt;0&lt;/em&gt; articles. (There’s a trend here.) This year I plan to change that and so I wanted to build myself a platform where I would be proud to publish all of my articles. My website is where I get to exercise pretty much every creative muscle I have by bringing together two passions: coding and writing. And so this is how things went this time around.&lt;/p&gt;

&lt;h2&gt;
  
  
  From Markdown to Ghost
&lt;/h2&gt;

&lt;p&gt;The previous version of my website had all of its content sourced from Markdown files. Combined with &lt;a href="https://gatsbyjs.com" rel="noopener noreferrer"&gt;Gatsby&lt;/a&gt; it was pretty much the perfect match in terms of managing blog posts and other site data. I used GraphQL and a few Gatsby source/transformer plugins and that was it. It was so simple.&lt;/p&gt;

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

&lt;p&gt;And yet, building up a reliable authoring system was a challenge. If I wanted to schedule a post in advance, then I’d need to set up some GitHub Actions. In order to keep my blog tags consistent, I’d have to remind myself of what tags I’d used previously and make sure the spelling was perfect. Editing a post meant pushing another commit to GitHub… You get the idea. In all honesty those things aren’t a big deal separately, but added together it put me off writing any new posts.&lt;/p&gt;

&lt;p&gt;So, given the focus is now on the content, I felt I had to use a CMS for this new version of my site and in my opinion there is no better CMS for blogging than &lt;a href="https://ghost.org" rel="noopener noreferrer"&gt;Ghost&lt;/a&gt;. Everything about it from the developer documentation to the actual editor itself is so well crafted. All the functionality I could need is right there: scheduling posts, webhooks, extensive tag management. And the platform is so easy to use.&lt;/p&gt;

&lt;p&gt;Another thing about Ghost I found beneficial was the fact that it comes with a default set of posts after installing on your machine. This “dummy” content is not just Lorem Ipsum (or, my favourite, &lt;a href="https://baconipsum.com" rel="noopener noreferrer"&gt;Bacon Ipsum&lt;/a&gt; ). They’re fully fledged blog posts with headings, images, lists, block quotes and some other fancy elements. This made styling my website even easier to get on with, as I had a ready-made example of almost every possible element. I know it’s not the most advanced feature of any CMS, but it saved a lot of time.&lt;/p&gt;

&lt;p&gt;(👀 I’m hosting Ghost on Digital Ocean. If you want to try it out for yourself, here’s a &lt;a href="https://m.do.co/c/f44f175f084f" rel="noopener noreferrer"&gt;Digital Ocean referral link&lt;/a&gt; you can use with $100 credit 🤗)&lt;/p&gt;

&lt;h2&gt;
  
  
  Building with NextJS
&lt;/h2&gt;

&lt;p&gt;I think the thing that really won me over with Ghost is being able to source content with its Javascript API library. It made working with &lt;a href="https://nextjs.org" rel="noopener noreferrer"&gt;NextJS&lt;/a&gt; even simpler than the previous GraphQL + Gatsby setup. Which is great because I’m still fairly new to the NextJS framework. I switched over from Gatsby for exactly that reason — to learn something new. However, there is definitely a learning curve when you’re already used to doing things a certain way.&lt;/p&gt;

&lt;p&gt;For example, the &lt;a href="https://www.tunde.io/work" rel="noopener noreferrer"&gt;work&lt;/a&gt; section of my website is still sourced by Markdown files. By contrast to Gatsby, sourcing and using Markdown in Next feels a lot more convoluted. What was abstracted away into two plugins now has to be re-implemented using multiple libraries and some DIY Javascript. It’s good practice to be honest and thankfully, there was an example to follow. In fact, that turned out to be the case with a lot of what I wanted to do with Next. There are many &lt;a href="https://nextjs.org/examples" rel="noopener noreferrer"&gt;example projects&lt;/a&gt; which look at different functionalities for your site. E.g. adding sitemaps, styling with various CSS frameworks, getting content from different sources, adding comments to blog posts… the list goes on and on. It made the transition from Gatsby to Next a lot smoother.&lt;/p&gt;

&lt;p&gt;And of course, opting to go with Next, I still have all the same benefits of a static site as with Gatsby: super speedy, secure and scalable. I haven’t made use of the Incremental Static Generation or preview mode as of yet, but I’m pretty sure these will be straightforward enough to add later on.&lt;/p&gt;

&lt;p&gt;(👀 I plan on going more in-depth with the features &amp;amp; differences with NextJS and Gatsby soon. Stay tuned!)&lt;/p&gt;

&lt;h2&gt;
  
  
  Styles by Tailwind
&lt;/h2&gt;

&lt;p&gt;I’ve being using &lt;a href="https://tailwindcss.com" rel="noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt; for a while now and each time I work with it, I’m amazed at how simple yet powerful it is at creating completely custom layouts and designs. There’s no wrestling with prebuilt styles like with other CSS frameworks and if you need to configure something it’s usually just a simple change in the config file.&lt;/p&gt;

&lt;p&gt;This kind of workflow enables me to work much quicker. With the previous version of my website, I had to style each HTML element in my blog posts and ensure all the styles were responsive. Now (with the help of an &lt;a href="https://tailwindcss.com/docs/typography-plugin" rel="noopener noreferrer"&gt;additional plugin&lt;/a&gt; ) all I need to do is add a &lt;code&gt;prose&lt;/code&gt; class where my blog content is and the whole thing is styled up with a nice set of opinionated styles.&lt;/p&gt;

&lt;p&gt;The best bit about all of this though is that dark-mode ( &lt;code&gt;prefers-color-scheme&lt;/code&gt; version) is &lt;a href="https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration" rel="noopener noreferrer"&gt;enabled by default in Tailwind V3&lt;/a&gt;. So all I need to do is add &lt;code&gt;dark:&lt;/code&gt; followed by the relevant property value across my components and layouts.&lt;/p&gt;

&lt;p&gt;I know the low-level utility vibes aren’t for everybody and that standard CSS still has its usages. But for brand new projects with no other dependencies or strict coding guidelines, Tailwind is my go to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Going forward
&lt;/h2&gt;

&lt;p&gt;I’m pretty happy with how things turned out this time round with redesigning my website. If another update comes later this year, I’m preempting it’s going to be a lot more iterative. Adding blog comments &amp;amp; reactions is still on my radar, alongside potentially setting up a newsletter and introducing some funky animations.&lt;/p&gt;

&lt;p&gt;But at the end of the day, what’s the point in adding all these features if &lt;em&gt;what you’re reading now&lt;/em&gt; is the only post I publish in 2022?&lt;/p&gt;

&lt;p&gt;So here’s to getting the balance right between writing code and writing stories this year 🍻&lt;/p&gt;

&lt;p&gt;…and going outside every once in a while.&lt;/p&gt;

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

</description>
      <category>webdev</category>
      <category>nextjs</category>
      <category>tailwindcss</category>
      <category>jamstack</category>
    </item>
    <item>
      <title>Introduction to HTML</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Thu, 29 Oct 2020 18:19:05 +0000</pubDate>
      <link>https://dev.to/tundeio/introduction-to-html-2hd7</link>
      <guid>https://dev.to/tundeio/introduction-to-html-2hd7</guid>
      <description>&lt;p&gt;Hypertext Markup Language is the language of the world wide web. Every single webpage in existence eventually boils down to some kind of HTML. This is because it plays a fundamental role in building webpages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Purpose
&lt;/h2&gt;

&lt;p&gt;HTML defines the &lt;strong&gt;structure&lt;/strong&gt; of a webpage. It does this by making use of different &lt;strong&gt;elements&lt;/strong&gt; which are defined by &lt;strong&gt;tags&lt;/strong&gt;. These elements can describe any number of things including paragraphs, headings, images, lists, tables and more.&lt;/p&gt;

&lt;p&gt;For example, the following would define some truly &lt;em&gt;basic&lt;/em&gt; content.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;I like cheese&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Oh, how I yearn for the enticing, creamy flavour of dairy's finest.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Just one more bite of that savoury goodness, then I shall be complete.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;These are my reasons for my love of cheese:&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;It's creamy.&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;I like yellow food.&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;It's fun to look at.&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://source.unsplash.com/gMW2NZ7JGrE/800x400"&lt;/span&gt; &lt;span class="na"&gt;alt=&lt;/span&gt;&lt;span class="s"&gt;"Some maaaaddd cheese bro."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  That don’t look pretty.
&lt;/h3&gt;

&lt;p&gt;True. If you were to type out the above into a code editor and view it on your browser, you’d probably get some old school Times New Roman abomination and a picture of some &lt;strong&gt;maaaaddd&lt;/strong&gt; cheese. HTML only has one very specific purpose, which as we found out earlier is to define the structure of content on a web page. Making it look like something a little less basic? That task belongs to CSS. But that’s outside our scope here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attributes
&lt;/h2&gt;

&lt;p&gt;Taking another look at our example above, you may notice an extra bit of code on that &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag. It has a &lt;code&gt;src&lt;/code&gt; attribute. In this case, the &lt;code&gt;src&lt;/code&gt; attribute defines where the browser should look to source the image from. This could be anywhere — so an image located somewhere on our server, or from another website. &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt; is a particularly great source for &lt;strong&gt;free&lt;/strong&gt; images.&lt;/p&gt;

&lt;p&gt;Attributes can define a wide array of extra bits needed to ensure an element functions correctly. But not all attributes work across all elements. For example: an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;  is commonly coupled with the &lt;code&gt;src&lt;/code&gt; and &lt;code&gt;alt&lt;/code&gt; attributes. But these would be useless for an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; (link) element which at its most basic level only needs &lt;code&gt;href&lt;/code&gt; to tell the browser where to link to. &lt;code&gt;class&lt;/code&gt; is one of the most well known attributes and can be used with the majority of HTML elements. Its purpose is to provide names of ‘classes’ which can then be used for styling and other purposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The &amp;lt;head&amp;gt;
&lt;/h2&gt;

&lt;p&gt;You might be thinking:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Okay, that’s great. I understand HTML defines the structure and presentation of a webpage. Tell me then good sir, where does the title of a page come from?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To understand this, we need to back up a little bit. The structure of a complete HTML webpage usually looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt; 
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;YOUR TITLE HERE!&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class="c"&gt;&amp;lt;!-- Page content --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;small&gt;(Try saving this code in a HTML file and then opening it with your browser to see what the above will look like as a proper webpage.)&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;Let’s break down each part:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/code&gt; — this is the declaration which lives at the top of our file. It tells the browser that this is a HTML file, and the page should be handled as such. It’s mandatory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;html lang=“en”&amp;gt;&lt;/code&gt; — this is the HTML element. Inside here is where we can write the rest of our HTML code. The &lt;code&gt;lang&lt;/code&gt; attribute is recommended so the browser knows what language the content is written in.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; — here is where we can define the things that will actually render out on our page. Our mad cheese example will live in here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And so what about the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;In a way, the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; is special, because it doesn’t actually render any viewable content, but instead describes some things about our webpage. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;meta charset="UTF-8"&amp;gt;&lt;/code&gt; — defines the character encoding our webpage is written in.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;&lt;/code&gt; — tells the browser how to handle the page’s size and any scaling that's needed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;title&amp;gt;YOUR TITLE HERE!&amp;lt;/title&amp;gt;&lt;/code&gt; — where we define our page’s title. This will appear on the tabs section of your browser (depending on which one you use) and your browser's history.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s really just a subset of what the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; gets used for though. From here, we can also link to external stylesheets, set the description for our page, set up social media sharing content (i.e. the stuff that appears on Facebook when someone shares a link on their platform), and even inject some Javascript!&lt;/p&gt;

&lt;p&gt;&lt;small&gt;This is quite a big subject. If you want to know more, &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML"&gt;this article from MDN&lt;/a&gt; is a great starting point!&lt;/small&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Nesting
&lt;/h2&gt;

&lt;p&gt;You’ll notice nesting has been in all of the code examples so far, but let’s talk more about it. Here is where the structure part of HTML becomes important. Although basic, the language does require you to follow some practices when you’re using it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;It’s creamy&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;I like things that are yellow&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;li&amp;gt;&lt;/span&gt;It’s fun to look at&lt;span class="nt"&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Coming back to our cheesy example, this provides a great demonstration of nesting in action. The &lt;code&gt;&amp;lt;ul&amp;gt;&lt;/code&gt; tag denotes an “unordered list”. This will basically render a list of bullet points. However, in order for this to work, we need to add list items &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; &lt;em&gt;within&lt;/em&gt; the unordered list. This is syntactically correct and browsers will know how to render this code properly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is this really a big deal?
&lt;/h3&gt;

&lt;p&gt;Of course, you might not even notice the effects of a syntax error with HTML. You might even be able to get around most visual bugs with some clever CSS. But these days web browsers are getting smarter and accessibility is increasingly important. Many browsers have the feature of displaying a “reader view” for articles and long form text. If the syntax of the page isn’t correct, this view might appear incorrect. More importantly, tabbing through web pages could be the primary way a user interacts with your site. To ensure they have the best experience possible, it’s important the page makes sense semantically (the elements chosen to structure the webpage) and syntactically (the order those elements are arranged).&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;p&gt;Even though HTML is one of the most basic languages used in web development, it still comes with a few gotchas! Most elements require an opening and closing tag, but there are some which don’t. These are the elements that don’t necessarily render any text. So &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; for images and &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; for line breaks. In these scenarios, it’s common to leave the element unclosed, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;“https://yourimagesource.jpg”&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you’re working with &lt;a href="https://reactjs.org/"&gt;React&lt;/a&gt;, you have no choice but to close those elements. But that’s something else altogether.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up
&lt;/h2&gt;

&lt;p&gt;We’ve only just scratched the surface of HTML! There’s a lot more we can go into, but hopefully that’s given you an insight into what it is, what it does and how to use it. For more reading, I’d recommend &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML"&gt;this other article&lt;/a&gt; from MDN.&lt;/p&gt;

&lt;p&gt;Until next time.&lt;br&gt;&lt;br&gt;
✌🏾&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>html</category>
    </item>
    <item>
      <title>Adding Tailwind CSS to a Gatsby project</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Thu, 06 Aug 2020 06:50:36 +0000</pubDate>
      <link>https://dev.to/tundeio/adding-tailwind-css-to-a-gatsby-project-35g9</link>
      <guid>https://dev.to/tundeio/adding-tailwind-css-to-a-gatsby-project-35g9</guid>
      <description>&lt;p&gt;There are two types of people in this world: those who don’t put a case on their phone and those who put a case, side load apps, run beta versions of an unreleased OS, jailbreak their device &lt;strong&gt;and&lt;/strong&gt; &lt;em&gt;accept tracking cookies.&lt;/em&gt; 😬 Cookies aside, sometimes you just need a little customisation to get the most out of something. The same can be said for styling web apps. CSS frameworks like Bulma &amp;amp; Bootstrap give you some awesome styles out of the box, but that’s what your stuck with. If you’re tasked with creating something truly unique, surely there’s another way than just writing 100s of lines of CSS code yourself?&lt;/p&gt;

&lt;h2&gt;
  
  
  Introducing Tailwind CSS
&lt;/h2&gt;

&lt;p&gt;Yes, it’s another framework, but there is a significant difference with this one. Tailwind works under the basis of “utility classes”. For example, rather than giving you a pre-defined &lt;code&gt;button&lt;/code&gt; class which would style your buttons, you can group together a bunch of low-level classes which would render out any kind of button you can think of. Something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Green button
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conversely, with Bulma for example, you’re likely doing something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Simples.
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;“Multiple classes instead of a simple, single class? Hogwash I say!”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;True. At first it looks a little dicey and completely against the standard way of writing HTML and CSS. Luckily for us, Tailwind also allows you to extract commonly used classes into component classes. So we can get back to our beloved way of writing the web:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn btn-green"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Green button
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class="nc"&gt;.btn&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="err"&gt;@apply&lt;/span&gt; &lt;span class="err"&gt;font-bold&lt;/span&gt; &lt;span class="err"&gt;py-2&lt;/span&gt; &lt;span class="err"&gt;px-4&lt;/span&gt; &lt;span class="err"&gt;rounded;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.btn-green&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="err"&gt;@apply&lt;/span&gt; &lt;span class="err"&gt;bg-green-500&lt;/span&gt; &lt;span class="err"&gt;text-white;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.btn-green&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#2F855A&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Lol, those styles can also exist in a CSS file if you want — more on that later…)&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@apply&lt;/code&gt; directive allows us to use Tailwind classes in CSS (really useful if you’ve defined some extra custom stuff in your config), but you can also mix and match with traditional CSS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding to Gatsby
&lt;/h2&gt;

&lt;p&gt;Now we’ve got an idea of what Tailwind is and how it works, let’s add it to a Gatsby project. We’ll be using Tailwind via PostCSS, but other methods are available. If you want to find out more, visit the &lt;a href="https://www.gatsbyjs.org/docs/tailwind-css/"&gt;Gatsby docs&lt;/a&gt;. You’ll need a Gatsby project to follow along with. If you don’t have one yet, just run these commands in your terminal to get started:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn global add gatsby-cli  &lt;span class="c"&gt;# install gatsby-cli globally&lt;/span&gt;
gatsby new gatsby-site      &lt;span class="c"&gt;# create a new site&lt;/span&gt;
&lt;span class="nb"&gt;cd &lt;/span&gt;gatsby-site              &lt;span class="c"&gt;# change into our newly created site's directory&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we’re ready! 🔥💪🏾&lt;br&gt;
Firstly, let’s install the additional dependencies we’re going to need in our project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add gatsby-plugin-postcss tailwindcss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(If you’re rocking npm, replace those yarn commands above with the following: &lt;code&gt;npm install -g gatsby-cli&lt;/code&gt; &amp;amp; &lt;code&gt;npm install gatsby-plugin-postcss tailwindcss&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;We’re using PostCSS so we can use the &lt;code&gt;@tailwind&lt;/code&gt; directives in our CSS files, alongside all the other directives — like &lt;code&gt;@apply&lt;/code&gt; mentioned previously.&lt;/p&gt;

&lt;p&gt;Go ahead and add the PostCSS plugin into your &lt;code&gt;gatsby-config.js&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// gatsby-config.js &lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s2"&gt;`gatsby-plugin-postcss`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now create a &lt;code&gt;postcss.config.js&lt;/code&gt; file in the root of your project. This is where we’ll include our reference to Tailwind:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// postcss.config.js&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;tailwindcss&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we just need to include the Tailwind directives in our CSS file, giving us access to all of that utility first goodness! 🤤&lt;/p&gt;

&lt;p&gt;Open up &lt;code&gt;layout.css&lt;/code&gt; (should be located in:&lt;code&gt;src/components&lt;/code&gt; if not, create it and import it in your app’s layout component ). That’s a lot of CSS in there! We can leave this as it is for now, but we need to add some things around it. Begin by adding &lt;code&gt;@tailwind base;&lt;/code&gt; in the very first line of the file. Then underneath that &lt;em&gt;mountain&lt;/em&gt; of CSS code, add &lt;code&gt;@tailwind components;&lt;/code&gt; . Finally, underneath that, add &lt;code&gt;@tailwind utilities;&lt;/code&gt;. So you should have something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* src/components/layout.css */&lt;/span&gt;

&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;base&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nt"&gt;html&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;-ms-text-size-adjust&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;-webkit-text-size-adjust&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;/* ...the rest of the element styles... */&lt;/span&gt;

&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;components&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;.heading&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="err"&gt;@apply&lt;/span&gt; &lt;span class="err"&gt;font-bold&lt;/span&gt; &lt;span class="err"&gt;text-4xl;&lt;/span&gt; &lt;span class="c"&gt;/* a heading with bold font and 2.25rem font size */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@tailwind&lt;/span&gt; &lt;span class="n"&gt;utilities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s go over those directives!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;@tailwind base&lt;/code&gt; -- adds base styles offered by Tailwind and any additional plugins, alongside boilerplate CSS&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@tailwind components&lt;/code&gt; -- adds component classes from Tailwind and any additional plugins&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;@tailwind utilities&lt;/code&gt; -- adds utility classes from Tailwind and, of course, any additional plugins&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’ll notice I’ve also sneaked in a cheeky custom component class there called &lt;code&gt;heading&lt;/code&gt;. This is just to demonstrate how easy it is to add reusable component classes in your CSS. Now everything’s installed and configured, let’s use it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Tailwind
&lt;/h2&gt;

&lt;p&gt;This. Is. Easy. Make a new file in your pages directory called &lt;code&gt;demo.js&lt;/code&gt; and add the following code to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/pages/demo.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Layout&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../components/layout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;SEO&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;../components/seo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;DemoPage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Layout&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SEO&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Tailwind Demo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h1&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;heading&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;What&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;s up, my people!&amp;lt;/h1&amp;gt;
        &amp;lt;p className="tracking-wide"&amp;gt;Ain&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="nx"&gt;sweet&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/p&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;font-bold py-2 px-4 rounded bg-green-500 text-white hover:bg-green-700 block mb-8&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Yaaassssss&lt;/span&gt;&lt;span class="o"&gt;!&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;inline-block md:hidden text-xl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Small&lt;/span&gt; &lt;span class="nx"&gt;screen&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;full&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="nx"&gt;paragraph&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hidden lg:hidden md:inline-block text-xl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Medium&lt;/span&gt; &lt;span class="nx"&gt;screen&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="nx"&gt;paragraph&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hidden lg:inline-block text-xl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Large&lt;/span&gt; &lt;span class="nx"&gt;screen&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="nx"&gt;paragraph&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;w-full md:w-3/4 lg:w-1/2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nx"&gt;Look&lt;/span&gt; &lt;span class="nx"&gt;at&lt;/span&gt; &lt;span class="nx"&gt;me&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;am&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;really&lt;/span&gt; &lt;span class="nx"&gt;long&lt;/span&gt; &lt;span class="nx"&gt;paragraph&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;demonstrate&lt;/span&gt; &lt;span class="nx"&gt;how&lt;/span&gt; &lt;span class="nx"&gt;Tailwind&lt;/span&gt; &lt;span class="nx"&gt;handles&lt;/span&gt; &lt;span class="nx"&gt;responsive&lt;/span&gt; &lt;span class="nx"&gt;layouts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Unfortunately&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;have&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="nx"&gt;out&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;things&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;say&lt;/span&gt; &lt;span class="nx"&gt;so&lt;/span&gt; &lt;span class="nx"&gt;will&lt;/span&gt; &lt;span class="nx"&gt;now&lt;/span&gt; &lt;span class="nx"&gt;revert&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;everyone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;s favourite: &amp;lt;a className="font-bold underline" href="https://baconipsum.com/"&amp;gt;Bacon Ipsum!!!!&amp;lt;/a&amp;gt; Bacon ipsum dolor amet tail beef ribs prosciutto tenderloin. Leberkas brisket sausage landjaeger shoulder filet mignon. Chislic tail andouille strip steak, short loin turducken pork leberkas prosciutto burgdoggen sausage alcatra bresaola tongue. Kielbasa turkey tongue ground round meatloaf venison.
        &amp;lt;/p&amp;gt;
    &amp;lt;/Layout&amp;gt;
)

export default DemoPage

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

&lt;/div&gt;



&lt;p&gt;As you can see, in the &lt;code&gt;className&lt;/code&gt;  props, we’re just adding Tailwind classes, alongside our custom &lt;code&gt;heading&lt;/code&gt; class we created earlier. Run &lt;code&gt;gatsby develop&lt;/code&gt; in your terminal and navigate to &lt;a href="http://localhost:8000/demo"&gt;localhost:8000/demo&lt;/a&gt; in your browser to see what it looks like. Try resizing your screen to see some pseudo responsiveness in action!&lt;/p&gt;

&lt;p&gt;With our simple demo, we’ve only just scratched the surface of what we can do with Tailwind. &lt;a href="https://tailwindcss.com/docs/installation/"&gt;Their documentation&lt;/a&gt; is the best place to go to understand what other classes and styles are available, as well as information on how to utilise Flexbox and grids to achieve some modern, responsive layouts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Customising
&lt;/h2&gt;

&lt;p&gt;Let’s say you really wanted to up your customisation game and include your own colours, container styles and more. Well, it’s pretty straightforward to do that with Tailwind, but we do need to set up some more configurations. In the root of your project, create a new file called: &lt;code&gt;tailwind.config.js&lt;/code&gt; and enter the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tailwind.config.js&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;purge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./src/**/*.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./src/**/*.tsx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;theme&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;container&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;center&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;sm&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;lg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;3rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="na"&gt;xl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;4rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="na"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="na"&gt;primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#de7261&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

            &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1/4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;25vh&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1/3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;33vh&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1/2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;50vh&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;3/4&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;75vh&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;in&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;inherit&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;},&lt;/span&gt;

            &lt;span class="na"&gt;fontSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;7xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;5rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;8xl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;6rem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above is telling Tailwind that we’d like to modify our theme by allowing container styles (otherwise disabled by default) and extending the colour, height and fontSize options with some new values. This theme section is where we can define a custom colour palette, fonts families, breakpoints — everything related to the visual style and design. With the options above, we can now use &lt;code&gt;bg-primary&lt;/code&gt; , &lt;code&gt;h-3/4&lt;/code&gt; and &lt;code&gt;text-7xl&lt;/code&gt; throughout our site’s styles wherever we want! (As well as similar classes for the other options.)&lt;/p&gt;

&lt;p&gt;Also notice the purge bit at the top of the file. This means our final compiled CSS (in production builds only) will be stripped of all the styles that we didn’t use, minimising the size of our overall app.&lt;/p&gt;

&lt;p&gt;Try adding some of these new classes into any page of your project or extend the config further to create your own styles and watch something truly unique come to life!&lt;/p&gt;

&lt;p&gt;(You’ll probably need to restart your dev server to see the changes take place!)&lt;/p&gt;

&lt;h2&gt;
  
  
  Further reading
&lt;/h2&gt;

&lt;p&gt;Like I said we’re only just scratching the surface with Tailwind here. Once you get the hang of it, it’s pretty easy to create cards, landing page heroes, forms and everything else one of those other frameworks could do. The difference being, it’s your own totally unique style!&lt;/p&gt;

&lt;p&gt;If you want to read some more, the following links will come in handy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://tailwindcss.com/docs/installation/"&gt;Tailwind Docs&lt;/a&gt; — Official documentation from Tailwind&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.gatsbyjs.org/docs/tailwind-css/#option-2-css-in-js"&gt;Adding Tailwind to Gatsby via CSS-in-JS&lt;/a&gt; — Instructions on installing Tailwind to use with CSS-in-JSS library, Emotion&lt;br&gt;&lt;br&gt;
&lt;a href="https://tailwindui.com/"&gt;Tailwind UI&lt;/a&gt; — Pre-built components made by the people who made Tailwind&lt;br&gt;&lt;br&gt;
&lt;a href="https://tailwindcss.com/docs/configuration/"&gt;Configuring Tailwind&lt;/a&gt; - A guide to configuring Tailwind  &lt;/p&gt;

&lt;p&gt;The full source code for this demo is available on my &lt;a href="https://github.com/tundeio/gatsby-tailwind-demo"&gt;GitHub&lt;/a&gt;.&lt;br&gt;&lt;br&gt;
✌🏾&lt;/p&gt;




&lt;p&gt;&lt;small&gt;&lt;em&gt;“Err, what’s up with the random dog???”&lt;/em&gt;&lt;/small&gt;&lt;br&gt;&lt;br&gt;
&lt;small&gt;It has a &lt;strong&gt;tail&lt;/strong&gt; … I’ll see myself out.&lt;/small&gt;&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>css</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>From Ghost To Markdown Files -- Updating my website (again)</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Tue, 04 Aug 2020 14:54:05 +0000</pubDate>
      <link>https://dev.to/tundeio/from-ghost-to-markdown-files-updating-my-website-again-20ch</link>
      <guid>https://dev.to/tundeio/from-ghost-to-markdown-files-updating-my-website-again-20ch</guid>
      <description>&lt;p&gt;Change is always driven by some kind of problem, right? Something that exists to eventually be fixed, no? These rhetorical questions are annoying, yes? The latest round of &lt;em&gt;changes&lt;/em&gt; that have befallen my website can be summed up in one word: control. As in, I have taken it back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Jheez, when did you lose it?
&lt;/h2&gt;

&lt;p&gt;Previously, I have &lt;a href="https://www.tunde.io/blog/changelog-3-0"&gt;raved about&lt;/a&gt; the CMS &lt;em&gt;Ghost.&lt;/em&gt; It’s a fast, modern and easy way to host a blog and get your content onto the internet. However, when you want to expand beyond the boundaries of blogging, things can get a little awkward. The platform itself is geared toward online magazines and newsletters — not necessarily bored web developers with too much time on their hands during a lockdown, who want to expand their online presence.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What does that even mean?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;All of the content I had planned for this latest iteration of my website wouldn’t sit well within a CMS made for articles. 👈🏾 This was the problem that inspired the change.&lt;/p&gt;

&lt;p&gt;So I started my search for a new CMS that would allow for a flexible, customisable content model. I considered a whole host of offerings including Contentful, Prismic and Sanity. I even ventured back to… Wordpress &amp;lt;shudders&amp;gt;. Alas, I wasn’t fully satisfied with any of them. I felt more a like passenger, rather than the one in the driving seat.&lt;/p&gt;

&lt;p&gt;(Sidenote: I’m also cheap and didn’t want to pay Digital Ocean $5 a month for the Ghost server that gets used 5 minutes a week. But if &lt;strong&gt;you&lt;/strong&gt; do, here’s a &lt;a href="https://m.do.co/c/cc1463273b50"&gt;referral link&lt;/a&gt; 😉)&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;My search for a new CMS had me scouring the internet for inspiration. Eventually, I stumbled over this post from Samantha Ming: &lt;a href="https://www.samanthaming.com/blog/building-my-new-site-with-vuepress/"&gt;Building my New Site with VuePress&lt;/a&gt;. In it she talks about a static site generator called VuePress. It’s pretty cool and comes with a plethora of features baked in. I was still happy with Gatsby for all my SSG needs, but something else about her post garnered my interest:&lt;/p&gt;

&lt;h3&gt;
  
  
  The Power of Markdown
&lt;/h3&gt;

&lt;p&gt;I’ve used the markup language before, but never saw it as the basis for storing different kinds of content. Older and wiser, I realise that by defining different frontmatter fields, I can create pretty much any type of &lt;em&gt;anything&lt;/em&gt; that my brain can imagine. Meaning, my content no longer has to be manipulated to fit the management system, the system can be easily manipulated to fit the content. It’s all just there, however I define it — ready to be consumed by my GraphQL queries and rendered into something presentable through a React component.&lt;/p&gt;

&lt;p&gt;Combined with Gatsby, Markdown gains some extra superpowers. (I think that’s the nerdiest thing I’ve ever written in my life.) Headings can easily be extracted and linked up from my posts to create some permalinks. Images can be referenced and designed with predefined styles. The time to read a post can be taken from a query and used in an archive listing (for example). I’m only scratching the surface here.&lt;/p&gt;

&lt;p&gt;It’s undeniable. A perfectly made match: Markdown + Gatsby, like cookies and cream.&lt;/p&gt;

&lt;p&gt;However in this context, Markdown is like the juice, not the bottle. In terms of an actual CMS, that’s just files in git being handled by a code editor. I’ve got both eyes on TinaCMS, but in all honesty that makes no difference for you: the person consuming the content. So what exactly &lt;em&gt;does&lt;/em&gt; change for you?&lt;/p&gt;

&lt;h2&gt;
  
  
  New Design
&lt;/h2&gt;

&lt;p&gt;Another problem I had with the previous site was using a CSS framework. Pretty much the same story: as soon as I tried to do something out of the ordinary, things became unnecessarily complex. Bulma was the framework in question. It’s honestly great and I’d recommend it to anybody, but if you’re looking for something that allows you to be more creative, Tailwind CSS is awesome. (Another inspiration from Samantha’s post!)&lt;/p&gt;

&lt;p&gt;It’s different to other CSS frameworks. The best way to demonstrate is by example. Let’s say I wanted to create a nice button. Here’s how that might look with Bulma:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Tidy.
&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And with Tailwind:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"whitespace-no-wrap inline-flex px-2 py-1 rounded-sm text-sm tracking-widest items-center justify-center leading-6 font-medium transition ease-in-out duration-150 bg-dark text-white"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Wowza.
&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I know, I know. Why would anyone want so many classes in their HTML? Well, when you’re in the pursuit of control, this kind of tool can be incredibly helpful. Tailwind works by giving us &lt;em&gt;utility&lt;/em&gt; classes. These classes — rather than holding an entire set of styles like that &lt;code&gt;button&lt;/code&gt; for Bulma — each specify a subset/one thing about your HTML element. I agree, it looks messy, but this &lt;em&gt;can&lt;/em&gt; be cleared up to look a lot neater:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"btn btn-secodnary"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Phew.
&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can do this by abstracting Tailwind’s utility classes into custom component classes for our elements/components. See &lt;a href="https://tailwindcss.com/docs/extracting-components#extracting-css-components-with-apply"&gt;this article&lt;/a&gt; if you’re interested.&lt;/p&gt;

&lt;p&gt;The point is, this way of styling my site has allowed me to create something that’s truly one-of-a-kind — heavily influenced by &lt;a href="https://www.temicoker.co"&gt;Temi Coker’s website&lt;/a&gt; — without having to write thousands of lines of CSS code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tutorials*
&lt;/h2&gt;

&lt;p&gt;But let’s say you &lt;em&gt;do&lt;/em&gt; want to write thousands of lines of CSS, or better yet just know what it is. Helping and encouraging others has been a driving force behind my interest in technology and programming since day one. What good is knowledge stored up within yourself if you don’t share it with other people? So I’ve created a new &lt;a href="https://dev.to/tutorials"&gt;Tutorials&lt;/a&gt; section — bringing (what I hope are) useful, easy to follow tutorials and intros on various aspects of web development. The hope is you’ll learn something and if I’ve really succeeded, become a fellow nerd. 🤓&lt;/p&gt;

&lt;p&gt;&lt;small&gt;*Follow me on &lt;a href="https://dev.to/tundeio"&gt;DEV&lt;/a&gt; for just the 1s and 0s!&lt;/small&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Privacy
&lt;/h2&gt;

&lt;p&gt;In an effort to enhance visitor’s privacy, I’ve switched out Google Analytics for Netlify Analytics. Using analytics directly from the same peeps who are hosting this site allows for a more simple and streamlined analytics gathering experience, with a focus on user privacy. The data is collected from the servers dishing out the content, rather than from cookies and scripts loaded onto your browser. In theory, that also means no performance loss! 🙌🏾 Maintaining fast load times, not storing any cookies on your browser and being totally GDPR compliant is peace of mind for you and for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap up
&lt;/h2&gt;

&lt;p&gt;Anyway, that pretty much wraps up this latest round of changes! It’s become a sort of unofficial yearly tradition of mine to reiterate this website and try out some new features and designs. I’m excited to see what’s going to crop up, now I’m back in control.&lt;/p&gt;

&lt;p&gt;✌🏾&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Learn to Code</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Sat, 01 Aug 2020 09:32:35 +0000</pubDate>
      <link>https://dev.to/tundeio/learn-to-code-4oec</link>
      <guid>https://dev.to/tundeio/learn-to-code-4oec</guid>
      <description>&lt;p&gt;When I first started my computer science degree seven years ago (&lt;em&gt;whoa&lt;/em&gt;), I instantly regretted all the decisions that led up to that first lecture. It quickly became apparent that I couldn't write or perhaps more importantly &lt;em&gt;understand&lt;/em&gt; code. Literally, it was like trying to learn an entirely new language. I found it so difficult that I considered giving up and trying something else.&lt;/p&gt;

&lt;p&gt;But I persisted through my wayward understanding, smashed my dissertation, graduated and got a job in web development which has me set up nicely for the rest of my career. Even more surprising is the fact that I now enjoy writing code and creating components for the web that people can use.&lt;/p&gt;

&lt;p&gt;None of this would have been possible if I gave up or completely ignored the prospect of programming in the first place. So now I'm here to convince you, digital stranger, that you should learn to code also. It could genuinely change your life and the lives of those around you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting Out
&lt;/h2&gt;

&lt;p&gt;It’s pretty easy to get overwhelmed here. When it comes to learning how to code, there are many different routes to go down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web development&lt;/li&gt;
&lt;li&gt;Mobile app development&lt;/li&gt;
&lt;li&gt;Software engineering&lt;/li&gt;
&lt;li&gt;Data analytics&lt;/li&gt;
&lt;li&gt;DevOps&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of those can even be split into more granular specialities. I've learned that the general consensus for beginners is to start off learning something like &lt;a href="https://www.python.org/"&gt;Python&lt;/a&gt;. It’s an easy to learn scripting language that will get you up and running with the basics of programming very quickly. By all means, do that. However, I also like to encourage people that you should start off with what actually interests you. If the snazziest, fanciest websites get your heart racing (like &lt;a href="https://www.tunde.io"&gt;my one&lt;/a&gt; no doubt), then why not learn how to make one? Or, if you’re fascinated by all the apps keeping you glued to your phone, then try creating some. These initial projects tend to be more involved than writing lines of Python code, but at the end of it you’ll have a solid understanding of programming that can be readily applied to real world applications.&lt;/p&gt;

&lt;p&gt;Having spoken to many people about what they should start with, the number one fear always seems to be &lt;em&gt;‘finding it too difficult’&lt;/em&gt; and I too can vouch for that. Real talk, creating websites and mobile apps can be complex. But regardless of whatever you choose to start out with, there exists thousands of online tutorials and articles that can help you learn at a pace that suits you. A bunch of those are also guaranteed to require &lt;em&gt;no prior programming knowledge&lt;/em&gt; (🙌🏾) so you can learn from scratch. Just remember, you’ll only get out what you put in.&lt;/p&gt;

&lt;h2&gt;
  
  
  When do I become rich and famous?
&lt;/h2&gt;

&lt;p&gt;&lt;br&gt;
    &lt;a href="https://i.giphy.com/media/d49xKuZ49wP8RUpq/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/d49xKuZ49wP8RUpq/giphy.gif" alt="Not Today Gif - from Giphy (https://gph.is/24dezDQ)"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;br&gt;&lt;/p&gt;

&lt;p&gt;It is well documented that this field of work can be incredibly lucrative. We’ve all heard of Mark Zuckerberg and the book of faces along with Dong Nguyen and the bird that flaps. But where does that leave you, a promising prospective programmer? Well, actually in quite a good position according to the following average salaries for various developer positions in London*&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Software Engineer: £55,000/yr (&lt;a href="https://www.glassdoor.co.uk/Salaries/london-software-engineer-salary-SRCH_IL.0,6_IM1035_KO7,24.htm"&gt;https://www.glassdoor.co.uk/Salaries/london-software-engineer-salary-SRCH_IL.0,6_IM1035_KO7,24.htm&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Web developer: £39,249/yr (&lt;a href="https://www.glassdoor.co.uk/Salaries/london-web-developer-salary-SRCH_IL.0,6_IM1035_KO7,20.htm"&gt;https://www.glassdoor.co.uk/Salaries/london-web-developer-salary-SRCH_IL.0,6_IM1035_KO7,20.htm&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;DevOps: £53,445/yr (&lt;a href="https://www.glassdoor.co.uk/Salaries/london-devops-engineer-salary-SRCH_IL.0,6_IM1035_KO7,22.htm"&gt;https://www.glassdoor.co.uk/Salaries/london-devops-engineer-salary-SRCH_IL.0,6_IM1035_KO7,22.htm&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Mobile app (iOS) developer: £53,391/yr (&lt;a href="https://www.glassdoor.co.uk/Salaries/london-ios-developer-salary-SRCH_IL.0,6_IM1035_KO7,20.htm"&gt;https://www.glassdoor.co.uk/Salaries/london-ios-developer-salary-SRCH_IL.0,6_IM1035_KO7,20.htm&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are all full time salaries. You could earn a lot more if you hire yourself out as a contractor — up to and over £500 a day.&lt;/p&gt;

&lt;p&gt;But I sense &lt;em&gt;you&lt;/em&gt; want more. You want to be earning millions and billions and trillions for your highly addictive and super successful app, right? The truth is, success stories like Nguyen's and Zuckerberg’s aren’t necessarily the norm and have perhaps warped expectations when it comes to understanding how much you can earn from this line of work. If you’re going to learn to code and make a career out of it, how much money you make shouldn’t be the driving factor. Same could be said for pretty much any other kind of work. You'll find a lot more fulfilment in managing your expectations well and doing something because you love it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools 🛠
&lt;/h2&gt;

&lt;p&gt;So, you know where you want to start out and what kind of job you want afterwards. Now it’s time to learn about some commonplace tools to help you out with your brand new venture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integrated Development Environment (IDE)
&lt;/h3&gt;

&lt;p&gt;This is where the magic happens. IDEs are basically where your code gets written and in some cases, compiles and debugs too. Here’s some of my favourites:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://code.visualstudio.com/"&gt;Visual Studio Code&lt;/a&gt; — great for web development and Javascript apps.&lt;br&gt;&lt;br&gt;
&lt;a href="https://developer.apple.com/xcode/"&gt;Xcode&lt;/a&gt; — Apple’s own IDE for building apps across the Apple ecosystem.&lt;br&gt;&lt;br&gt;
&lt;a href="https://visualstudio.microsoft.com/"&gt;Visual Studio&lt;/a&gt; — different to the other VS, but great for building more complex websites and apps utilising Microsoft products (for example, the &lt;a href="https://dotnet.microsoft.com/"&gt;.NET framework&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  Websites
&lt;/h3&gt;

&lt;p&gt;Some useful tools that’ll help you understand your code, connect with others, and enhance your apps:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/"&gt;Github&lt;/a&gt; — think of this as like Dropbox for your code. You can push and pull down updates via the cloud and even roll back to previous versions whenever you need to.&lt;br&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/"&gt;MDN Web Docs&lt;/a&gt; — if you’re building a website, this is an invaluable resource covering tutorials and explanations on various aspects of web development.&lt;br&gt;&lt;br&gt;
&lt;a href="https://dev.to/"&gt;DEV Community&lt;/a&gt; — a community of developers from many different disciplines sharing walkthroughs and experiences about literally anything you can think of related to code.&lt;br&gt;&lt;br&gt;
&lt;a href="https://web.dev/"&gt;web.dev&lt;/a&gt; — after you’ve built your website and it’s live (or in staging), this is a great place where you can test it out and see how it performs regarding today’s best web practices.&lt;br&gt;&lt;br&gt;
&lt;a href="https://fonts.google.com/"&gt;Google Fonts&lt;/a&gt; — a vast collection of open source fonts, available for use in your projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Apps
&lt;/h3&gt;

&lt;p&gt;More useful tools to enhance your developer experience!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sipapp.io/"&gt;Sip&lt;/a&gt; — a Mac app allowing you to collate different colour palettes for your projects.&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.postman.com/"&gt;Postman&lt;/a&gt; — you can use this to test out API calls and see what kind of responses you get. &lt;br&gt;
&lt;a href="https://desktop.github.com/"&gt;Github Desktop&lt;/a&gt; — a simple, easy-to-use git GUI that will make handling your code a lot easier! (If you detest the command line.)&lt;/p&gt;

&lt;p&gt;Also, just bookmark &lt;a href="https://stackoverflow.com/"&gt;StackOverflow.com&lt;/a&gt; right now. This is a programming forum and it will save your life.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final tips
&lt;/h2&gt;

&lt;p&gt;Persistence is key. Practice makes perfect. I could throw a bunch more clichés at you, but the message remains the same. If you want to become the world's next Ultimate Developer, you'll have to put in the hours. When I discovered this for myself as I was starting out, my heart broke into thousands of little 1s and 0s. But the value of hard work is tangible with programming. Nothing beats the feeling of creating something that — after many hours of debugging, screaming and refactoring — actually, finally, works.&lt;/p&gt;




&lt;p&gt;&lt;small&gt;*Salaries correct as of 24th July 2020&lt;/small&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>From Wordpress to Gatsby -- Updating my blog!</title>
      <dc:creator>Ayotunde Ikuesan</dc:creator>
      <pubDate>Fri, 01 Nov 2019 09:25:46 +0000</pubDate>
      <link>https://dev.to/tundeio/from-wordpress-to-gatsby-updating-my-blog-4ckm</link>
      <guid>https://dev.to/tundeio/from-wordpress-to-gatsby-updating-my-blog-4ckm</guid>
      <description>&lt;p&gt;I recently updated &lt;a href="https://www.tunde.io"&gt;my blog&lt;/a&gt;. Except this time, I wanted to try something different. If by some miracle you're an avid follower of my blog, you'll know I've been a fan of WordPress for many years. The platform powers around 30% of the internet and has gained a cult following amongst many bloggers, developers and publications around the world.&lt;/p&gt;

&lt;p&gt;Alas, not too long ago, I decided that it's no longer for me. Not for the first time mind you, but this time I'm fairly certain that decision is going to stick.&lt;/p&gt;

&lt;h1&gt;
  
  
  The problem
&lt;/h1&gt;

&lt;p&gt;My biggest problem with the platform is one of its most important features: themes and templates. Trying to style one of these themes to get it to look exactly how I want is guaranteed to ruin any day. As a web developer, the restricted layout and styling options provided hinder my creativity. And the interface which allows me to express whatever amount of said creativity is left, is just as poor. Limited CSS, only a handful of colour palettes, paying more to unlock more features and relatively slow page loads led me to a dark and lowly place: I had a created website I secretly hated.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Jeez man, so dramatic. Why don't you just self host?"&lt;/em&gt; 🙄&lt;/p&gt;

&lt;p&gt;It's true, a self-hosted instance of WordPress would have allowed me to upload my own fully designed template and install a whole host of plugins, without paying significantly more. But hosting WordPress on your own is a tricky business. Security vulnerabilities are lurking around every corner and I don't have the experience to confidently manage my own LAMP stack.&lt;/p&gt;

&lt;p&gt;Don't even get me started on PHP.&lt;/p&gt;

&lt;h1&gt;
  
  
  The solution
&lt;/h1&gt;

&lt;p&gt;I needed a platform that would allow for a few of things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Freedom to easily style my blog any way I like&lt;/li&gt;
&lt;li&gt;Use of modern web development languages and architectures&lt;/li&gt;
&lt;li&gt;Super fast&lt;/li&gt;
&lt;li&gt;Super cheap&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's all I asked for.&lt;/p&gt;

&lt;p&gt;A few thorough Google searches later (going all the way to page three folks), I came across a cool tool called &lt;a href="https://ghost.org"&gt;Ghost&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Think of Ghost as being like that really popular dude at your school or work that your friend introduces you to, then you realise you already know them. Ghost powers the publications behind some of the world's biggest companies: Apple, Tinder and DailyMotion just to name a few. When I started looking for an alternative to WordPress,  I hadn't heard of Ghost beforehand (apart from once but I think that was an accident). In a lot of ways it's similar to WordPress, but it's different enough in all the ways that count:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I can fully customise everything about this website, from head to footer.&lt;/li&gt;
&lt;li&gt;The platform runs on Node.js, bringing it into the era of modern web development.&lt;/li&gt;
&lt;li&gt;Advanced SEO tools also come as standard (paid with Wordpress.com), making &lt;a href="https://www.tunde.io"&gt;tunde.io&lt;/a&gt; more visible on the web and across social media. Which is good because not a lot of people are searching or indeed asking for it.&lt;/li&gt;
&lt;li&gt;$5/month hosting with Digital Ocean 🌊&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;small&gt;(Dare I sneak in a free referral link for DO? I do! &lt;a href="https://m.do.co/c/73c719991456"&gt;https://m.do.co/c/73c719991456&lt;/a&gt;)&lt;/small&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Good, but not good enough
&lt;/h2&gt;

&lt;p&gt;I wasn't finished there. Ghost would turn out to only be part of the story. I had the whole blog set up – ready to push that big blue publish button and go live – when I started to think about scaling. Let's be optimistic for a second and assume that one day, a vast number of people want to access the blog (I can't think of a valid reason either). That's gonna put a lot of pressure on the one server I had set up to run the website. With new page requests coming in every single second from every corner of the globe, that server would only crash and burn, leaving a pool of melting 1s and 0s...&lt;/p&gt;

&lt;p&gt;So I took myself back to Google, in search of more wisdom, and came across &lt;a href="https://www.gatsbyjs.org"&gt;Gatsby&lt;/a&gt;. Gatsby is a static site generator. Put simply, SSGs allow you to create websites that serve pre-compiled web pages, rather than dynamically generating the content whenever you want to access a page. Imagine having your Facebook feed loaded as soon you clicked &lt;code&gt;facebook.com&lt;/code&gt;, rather than having to wait for a database to be queried to generate all of your friend's cat pics.&lt;/p&gt;

&lt;p&gt;Having everything ready to go in these pre-compiled pages, reduces the amount of time it takes to serve that page to you, making all of the things so much faster. These compiled pages can also be served efficiently via a CDN, significantly reducing server cramp and providing you with even faster content delivery times.&lt;/p&gt;

&lt;p&gt;So how does this all tie in here? Well, Ghost has been set up in such a way that it's possible to retrieve only the content (i.e. my blog posts and pages) via an API -- a headless CMS if you will. Gatsby then takes that content and spits out what you're reading right now. This spit, gets pushed to a CDN, ready when you are to serve the pages, fast. Almost - almost, like a bird feeding a chick. And because of the way Gatsby is integrated with Ghost, I lose none of those benefits listed earlier.&lt;/p&gt;

&lt;p&gt;It's probably a bit overkill for my little corner of the world wide web, I'm fully aware. Check out the end result for yourself at &lt;a href="https://www.tunde.io"&gt;tunde.io&lt;/a&gt;. Whether you do or don't, the nerd in me thinks it's all rather cool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/9Pk3Y2QCF1fR7TyXqZ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/9Pk3Y2QCF1fR7TyXqZ/giphy.gif" alt="Nerd Gif" width="600" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>webdev</category>
      <category>wordpress</category>
    </item>
  </channel>
</rss>
