Gatsby SSG x Ghost

Gatsby SSG x Ghost

November 17, 2025

Intro

Among all SSGs and their awsome ecosystem: https://github.com/myles/awesome-static-generators

I got recently one of them, Gatsby, to work with GhostCMS.

I was recently tinkering here with Ghost and its API for automatic post creation.

Ghost is one of those OSS Selfhostable CMS aka no code website builder that allow to create very cool websites.

Also, their hosted plan mission is great.

About the Web

You know the drill:

There is also a very important one: https://trends.google.com/trends/


Gatsby SSG

I was following this gatsby course:

React based framework (open source JS, Meta). https://github.com/gatsbyjs/gatsby

Load Data From Anywhere. Gatsby pulls in data from any data source, whether it’s Markdown files, a headless CMS like Contentful or WordPress, or a REST or GraphQL API.

Use source plugins to load your data, then develop using Gatsby’s uniform GraphQL interface.

Go Beyond Static Websites.

Get all the benefits of static websites with none of the limitations.

Gatsby sites are fully functional React apps, so you can create high-quality, dynamic web apps, from blogs to e-commerce sites to user dashboards.

  1. You need nodejs installed
  2. Then see: https://github.com/gatsbyjs/gatsby

About Gatsby plugins

Gatsby plugins are a fundamental part of the Gatsby ecosystem and play a crucial role in extending the functionality of your Gatsby site.

They allow you to add various features, optimize performance, and integrate with external services.

More about Gatsby Plugins 👇
  1. Content Sourcing: Gatsby plugins can help you source content from various data sources, such as Markdown files, JSON, APIs, databases, or even content management systems (CMS) like WordPress, Drupal, or Contentful. Popular content-sourcing plugins include gatsby-source-filesystem and gatsby-source-contentful.

  2. Data Transformation: You can use plugins to transform and manipulate data before it’s used to generate pages. For example, you can use gatsby-transformer-remark to process Markdown files and convert them into HTML.

  3. Styling and CSS: Gatsby plugins can be used to handle CSS and styling. gatsby-plugin-sass, gatsby-plugin-styled-components, and others help you manage styles in your Gatsby project.

  4. Image Optimization: To optimize images for performance, you can use plugins like gatsby-plugin-sharp and gatsby-transformer-sharp. These plugins generate multiple image sizes and formats for your site, ensuring that the right image is served based on the user’s device and screen size.

  5. SEO and Metadata: Plugins like gatsby-plugin-react-helmet allow you to set up metadata and SEO tags (such as title, description, and Open Graph tags) for each page.

  6. Pagination: If you have a blog or any content that requires pagination, there are plugins like gatsby-plugin-pagination that can help you set up pagination for your content.

  7. Forms: To handle forms on your site, you can use plugins like gatsby-plugin-netlify-cms or gatsby-plugin-formik.

  8. Authentication and User Management: Plugins like gatsby-plugin-firebase or gatsby-plugin-auth0 can be used to integrate authentication and user management into your Gatsby site.

  9. Search Functionality: Implementing search functionality can be done using plugins like gatsby-plugin-elasticlunr-search or gatsby-plugin-lunr.

https://www.emgoto.com/gatsby-search/

  1. Analytics and Tracking: If you want to track user interactions and gather analytics data, plugins like gatsby-plugin-google-analytics or gatsby-plugin-segment can be helpful.

  2. Performance Optimization: Gatsby is known for its performance, and you can further optimize it with plugins like gatsby-plugin-offline for offline support and gatsby-plugin-preact to reduce bundle size.

  3. Localization and Internationalization: To make your site multilingual, you can use plugins like gatsby-plugin-i18n or gatsby-plugin-react-i18next.

  4. E-commerce Integration: If you’re building an e-commerce site, plugins like gatsby-plugin-shopify or gatsby-source-stripe can help you integrate with e-commerce platforms.

  5. Serverless Functions: Gatsby supports serverless functions through plugins like gatsby-plugin-functions. You can create serverless API endpoints for dynamic functionality.

  6. Social Sharing: To enable social sharing features, you can use plugins like gatsby-plugin-social-sharing.

  7. Customization: You can also create your own Gatsby plugins to add custom functionality tailored to your specific needs.

Gatsby’s extensive plugin ecosystem makes it a powerful tool for building modern, performant websites and web applications.

You can easily find and install plugins from the Gatsby plugin library or create your own to extend your site’s capabilities.

You can find Gatsby plugins in the official Gatsby plugin library. Here’s how you can access it:

  1. Gatsby Plugin Library Website: You can visit the official Gatsby plugin library website at https://www.gatsbyjs.com/plugins/.

This website provides a searchable and categorized list of plugins that you can use in your Gatsby projects.

  1. Gatsby GitHub Repository: Another way to discover Gatsby plugins is by visiting the Gatsby GitHub repository, specifically the “plugins” section. The repository is located at https://github.com/gatsbyjs/gatsby, and you can find plugins in the “plugins” directory.

Understanding Gatsby

Gatsby is just another SSG based on NodeJS.

Install nodejs, just like we did here

npm install
gatsby develop

If you thought that you were done understanding APIs just with REST, you were wrong.

Gatsby uses GraphQL to fetch data from APIs.

And you could pull data from dancing sites to your dancing referal page.

Deploying Gatsby: Any static hosting will do

  • Github Pages
  • Firebase
  • Cloudflare Pages

Themes for Gatsby

I Have found several cool ones here: https://statichunt.com/

Like https://statichunt.com/themes/nextjs-supastarter or https://statichunt.com/themes/gatsby-starter-flat-magazine

With source codes:

Podcasts in Gatsby

Similarly to the AstroPod project, we have this in Gatsby:

git clone https://github.com/vojtaholik/gatsby-theme-simplecast

#yarn

Portoflio Minimal

##rm -rf .git && git init

gatsby new portfolio-minimal https://github.com/konstantinmuenster/gatsby-starter-portfolio-minimal-theme
npm install
gatsby develop
gatsby develop -p 8001
gatsby build

If you want to deploy statically towards Google Firebase:

gatsby build

npm install -g firebase-tools
#firebase login
#firebase init

firebase deploy

Gatsby 💗 ghost

As we saw, its not hard to get started with Ghost.

Consider these for adding to GhostCMS:

Starter Ghost

node -v
npm -v

npm install -g gatsby-cli

gatsby --version

##rm -rf .git && git init

gatsby new my-blog https://github.com/TryGhost/gatsby-starter-ghost
#gatsby new portfolio-minimal https://github.com/konstantinmuenster/gatsby-starter-portfolio-minimal-theme

cd my-blog

gatsby develop
gatsby develop -p 8001
gatsby build

This will start a development server, and you can view your blog at http://localhost:8000.


Conclusions

Responsive Images can seem like a small thing, but it can make a big difference in the performance of your website.

See what Mozilla thinks about them.

Other Websites I’ve Built

  1. With an option to plug adsense to each of this websites

Photo centered blogs:

Business Sites:

Also, business landing pages for small creators:


FAQ

We can find broken links with Python

How to monitor my Website Status?

You can with tools like UptimeKuma

How to see if a web was changed

Free stock photo sites

If you need high‑quality, royalty‑free images, these sources offer excellent free collections (always double‑check the specific license for each image):

what it is a CDN?

A CDN (Content Delivery Network) is:

  • A distributed network of servers placed in many data centers around the world.
  • Goal: deliver web content (images, CSS/JS files, videos, HTML, APIs, etc.) to users faster and more reliably.

How a CDN works:

  • You request a file (e.g. an image on a blog).
  • Instead of always coming from your origin server, the file is cached on edge servers of the CDN.
  • The CDN serves the file from the closest edge location to the user (geographically / network‑wise).
  • If it’s not cached yet, the CDN fetches it from the origin once, then caches it for future users.

Why people use a CDN

  • Speed: lower latency, faster page load (better for UX and SEO).
  • Offload origin: fewer direct hits to your main server, saving bandwidth and CPU.
  • Scalability: easier to handle traffic spikes.
  • Resilience: many CDNs provide DDoS protection and failover.

Cloudflare started as a CDN, but today it’s more like a full edge platform: a CDN plus DNS, security (DDoS/WAF), and even compute and storage, all sitting in front of your origin server

There are F/OSS CDNs if you need one.

Apache Traffic Control is an Open Source implementation of a Content Delivery Network

Apache Traffic Control allows you to build a large scale content delivery network using open source. Built around Apache Traffic Server as the caching software, Traffic Control implements all the core functions of a modern CDN.

CDNjs

MIT | 🤖 CDN assets - The #1 free and open source CDN built to make life easier for developers.

cdnjs is a free and open-source CDN service trusted by over 12.5% of all websites, serving over 200 billion requests each month, powered by Cloudflare.

They have a F/OSS Static Website where we can find the packages to use via CDNjs - https://github.com/cdnjs/static-website

JSDelivr

A free, fast, and reliable Open Source CDN for npm, GitHub, Javascript, and ESM