<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ rss feed - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ rss feed - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 26 May 2026 04:44:36 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/rss-feed/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Automatically Cross-post from Your GatsbyJS Blog with RSS ]]>
                </title>
                <description>
                    <![CDATA[ By Dane Stevens With the recent exodus from Medium many developers are now creating their own GatsbyJS Blogs and then cross-posting to Medium or publications like freecodecamp.org and dev.to. Cross-posting is time consuming, but necessary to drive tr... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-automatically-cross-post-from-your-gatsbyjs-blog-with-rss/</link>
                <guid isPermaLink="false">66d84e8829e30bc0ad477561</guid>
                
                    <category>
                        <![CDATA[ blog ]]>
                    </category>
                
                    <category>
                        <![CDATA[ canonical url ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Gatsby ]]>
                    </category>
                
                    <category>
                        <![CDATA[ GatsbyJS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ rss feed ]]>
                    </category>
                
                    <category>
                        <![CDATA[ SEO ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 11 Jun 2019 18:45:27 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/06/gatsby-rss.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Dane Stevens</p>
<p>With the recent exodus from <a target="_blank" href="https://medium.com">Medium</a> many developers are now creating their own GatsbyJS Blogs and then cross-posting to <a target="_blank" href="https://medium.com">Medium</a> or publications like <a target="_blank" href="https://www.freecodecamp.org/news/">freecodecamp.org</a> and <a target="_blank" href="https://dev.to">dev.to</a>.</p>
<p>Cross-posting is time consuming, but necessary to drive traffic to your personal site. Let's look at how we can automate this by adding an RSS feed to your personal GatsbyJS blog.</p>
<h2 id="heading-add-canonical-urls-to-your-blog">Add Canonical URL's to Your Blog</h2>
<p>What is a canonical url?</p>
<p><img src="https://cdn.tueri.io/274877907146/carbon.png" alt="Canonical URL for Tueri.io" width="600" height="400" loading="lazy"></p>
<p>A canonical url tells search engines which page is the primary or authorative page when duplicate content is found (ie. cross-posting).</p>
<p>Let's install <a target="_blank" href="https://www.gatsbyjs.org/packages/gatsby-plugin-canonical-urls/">gatsby-plugin-canonical-urls</a></p>
<p><strong>Quick tip:</strong> <code>npm i</code> is an alias for <code>npm install --save</code></p>
<pre><code>npm i gatsby-plugin-canonical-urls
</code></pre><p><strong>Note:</strong> If you are using <code>gatsby-plugin-react-helmet</code> install this plugin instead: <a target="_blank" href="https://www.gatsbyjs.org/packages/gatsby-plugin-react-helmet-canonical-urls/">gatsby-plugin-react-helmet-canonical-urls</a>*</p>
<pre><code>npm i gatsby-plugin-react-helmet-canonical-urls
</code></pre><p>Add plugin configuration to <code>/gatsby-config.js</code></p>
<pre><code class="lang-javascript"><span class="hljs-comment">// In your gatsby-config.js</span>
<span class="hljs-attr">plugins</span>: [
  {
    <span class="hljs-attr">resolve</span>: <span class="hljs-string">`gatsby-plugin-canonical-urls`</span>,
    <span class="hljs-comment">// or</span>
    <span class="hljs-comment">// resolve: `gatsby-plugin-react-helmet-canonical-urls`</span>
    <span class="hljs-attr">options</span>: {
      <span class="hljs-comment">// Change `siteUrl` to your domain </span>
      <span class="hljs-attr">siteUrl</span>: <span class="hljs-string">`https://tueri.io`</span>

      <span class="hljs-comment">// Query string parameters are inclued by default.</span>
      <span class="hljs-comment">// Set `stripQueryString: true` if you don't want `/blog` </span>
      <span class="hljs-comment">// and `/blog?tag=foobar` to be indexed separately</span>
      <span class="hljs-attr">stripQueryString</span>: <span class="hljs-literal">true</span>
    }
  }
]
</code></pre>
<p>With this configuration, the plugin will add a <code>&lt;link rel="canonical" ... /&gt;</code> to the head of every page e.g.</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"canonical"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://tueri.io/2019-04-04-how-to-securely-deploy-to-kubernetes-from-bitbucket-pipelines/"</span> /&gt;</span>
</code></pre>
<h2 id="heading-install-an-rss-feed-generator">Install an RSS Feed Generator</h2>
<p>We'll use <a target="_blank" href="https://www.gatsbyjs.org/packages/gatsby-plugin-feed/">gatsby-plugin-feed</a> to generate an rss feed from our blog posts.</p>
<pre><code>npm i gatsby-plugin-feed
</code></pre><p>Add plugin configuration to <code>/gatsby-config.js</code></p>
<pre><code class="lang-javascript"><span class="hljs-comment">// In your gatsby-config.js</span>
<span class="hljs-attr">plugins</span>: [
  {
    <span class="hljs-attr">resolve</span>: <span class="hljs-string">`gatsby-plugin-feed`</span>,
    <span class="hljs-attr">options</span>: {
      <span class="hljs-attr">query</span>: <span class="hljs-string">`
        {
          site {
            siteMetadata {
              title
              description
              siteUrl
              site_url: siteUrl
            }
          }
        }
      `</span>,
      <span class="hljs-attr">feeds</span>: [
        {
          <span class="hljs-attr">serialize</span>: <span class="hljs-function">(<span class="hljs-params">{ query: { site, allMarkdownRemark } }</span>) =&gt;</span> {
            <span class="hljs-keyword">return</span> allMarkdownRemark.edges.map(<span class="hljs-function"><span class="hljs-params">edge</span> =&gt;</span> {
              <span class="hljs-keyword">return</span> <span class="hljs-built_in">Object</span>.assign({}, edge.node.frontmatter, {
                <span class="hljs-attr">description</span>: edge.node.excerpt,
                <span class="hljs-attr">date</span>: edge.node.frontmatter.date,
                <span class="hljs-attr">url</span>: site.siteMetadata.siteUrl + edge.node.fields.slug,
                <span class="hljs-attr">guid</span>: site.siteMetadata.siteUrl + edge.node.fields.slug,
                <span class="hljs-attr">custom_elements</span>: [{ <span class="hljs-string">"content:encoded"</span>: edge.node.html }],
              })
            })
          },
          <span class="hljs-attr">query</span>: <span class="hljs-string">`
            {
              allMarkdownRemark(
                sort: { order: DESC, fields: [frontmatter___date] },
              ) {
                edges {
                  node {
                    excerpt
                    html
                    fields { slug }
                    frontmatter {
                      title
                      date
                    }
                  }
                }
              }
            }
          `</span>,
          <span class="hljs-attr">output</span>: <span class="hljs-string">"/rss.xml"</span>,
          <span class="hljs-attr">title</span>: <span class="hljs-string">"Your Site's RSS Feed"</span>,
          <span class="hljs-comment">// optional configuration to insert feed reference in pages:</span>
          <span class="hljs-comment">// if `string` is used, it will be used to create RegExp and then test if pathname</span>
          <span class="hljs-comment">// of current page satisfied this regular expression;</span>
          <span class="hljs-comment">// if not provided or `undefined`, all pages will have feed reference inserted</span>
          <span class="hljs-attr">match</span>: <span class="hljs-string">"^/blog/"</span>,
        },
      ],
    }
  }
]
</code></pre>
<p><strong>NOTE:</strong> This plugin will only generates the <code>xml</code> file(s) when run in <code>production</code> mode! To test your feed, run: <code>gatsby build &amp;&amp; gatsby serve</code></p>
<p>Here's what our feed looks like: <a target="_blank" href="https://tueri.io/rss.xml">Tueri.io's RSS Feed</a></p>
<p>For more information on configuring your feed check out the <a target="_blank" href="https://www.gatsbyjs.org/packages/gatsby-plugin-feed/">plugin docs</a>.</p>
<h2 id="heading-connect-devtohttpsdevto-to-your-rss-feed">Connect <a target="_blank" href="https://dev.to">dev.to</a> to Your RSS Feed</h2>
<ol>
<li>Log in to your <a target="_blank" href="https://dev.to">dev.to</a> account</li>
<li>Go to: Settings &gt; Publishing from RSS or <a target="_blank" href="https://dev.to/settings/publishing-from-rss">https://dev.to/settings/publishing-from-rss</a></li>
<li>Add your "RSS Feed URL" e.g. <a target="_blank" href="https://tueri.io/rss.xml">https://tueri.io/rss.xml</a></li>
<li>Check "Mark the RSS source as canonical URL by default</li>
<li>Click "Update"</li>
</ol>
<p><img src="https://cdn.tueri.io/274877907149/screencapture-dev-to-settings-publishing-from-rss-2019-06-06-06_48_32.png" alt="Screenshot of dev.to RSS settings" width="942" height="924" loading="lazy"></p>
<h2 id="heading-connect-mediumhttpsmediumcom-to-your-rss-feed">Connect <a target="_blank" href="https://medium.com">Medium</a> to Your RSS Feed</h2>
<p>The connection for <a target="_blank" href="https://medium.com">Medium</a> is not quite as straight-forward, but simple enough using <a target="_blank" href="https://zapier.com">Zapier</a>.</p>
<p>Head on over to <a target="_blank" href="https://zapier.com">Zapier</a> and create a free account.</p>
<h3 id="heading-make-a-zap">"Make a Zap"</h3>
<ol>
<li>Choose "RSS" as your "Trigger App"</li>
<li>Select "New Item in Feed"</li>
<li>Paste in your "Feed URL"</li>
<li>Select a sample from your feed.</li>
<li>Choose "Medium" as your "Action App"</li>
<li>Select "Create Story"</li>
<li>Authorize your Medium account</li>
<li>Select your fields: make sure you select your Canonical URL</li>
<li>Send a test to Medium</li>
<li>Finish and turn on your Zap</li>
</ol>
<p><img src="https://cdn.tueri.io/274877907150/screencapture-zapier-app-editor-59814153-nodes-59814313-fields-2019-06-06-06_53_55.png" alt="Screenshot of connecting RSS to Medium with Zapier" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Make sure Google gives you credit for your content by using Canonical URL's.</p>
<p>I hope you found this helpful and that it saves you lots of time cross-posting your content!</p>
<hr>
<p>_Originally published at <a target="_blank" href="https://tueri.io/blog/2019-06-06-how-to-automatically-cross-post-from-your-gatsbyjs-blog-with-rss/?utm_source=Freecodecamp&amp;utm_medium=Post&amp;utm_campaign=">Tueri.io</a>_</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
