Tech

Corporate site with Astro and Ghost

Corporate site with Astro and Ghost

At Artabric, we recently launched our corporate website using a modern and efficient technology stack. For this project, we selected Astro as the website framework and Ghost as a headless CMS. This combination allowed us to achieve a streamlined, secure, and high-performing site tailored to our needs.

Why Astro?

Astro is an emerging framework designed with performance and simplicity in mind, making it an excellent choice for content-heavy websites. It optimizes for speed by shipping minimal JavaScript to the browser, enabling faster load times and enhanced user experiences. Its static site generation (SSG) capability aligns perfectly with corporate needs for scalable, secure, and low-maintenance websites.

For Artabric, Astro provided the ideal foundation for delivering a clean, responsive website that emphasizes content without unnecessary bloat.

Ghost as a headless CMS

Ghost is an open-source self-hosted publishing platform that is sometimes mentioned as a headless CMS. This is the use we wanted to give it, to serve the content while Astro would handle the frontend presentation. However, the reality is that Ghost, despite serving its content via API, is not purely a headless CMS as it has its own frontend. In our case, we wanted to turn it into a truly headless CMS, so we modified the Nginx configuration to achieve this:

  • Denied public access to the root route /, effectively disabling the built-in front end.
  • Allowed restricted access to:
    • /ghost/ for Ghost’s back office interface
    • /content/ for API-delivered assets

Building a static site with Ghost and Astro

We took advantage of Astro’s static site generation to ensure that our corporate website is fully static. Whenever new content is created or updated in Ghost, a static build of the site is triggered using GitHub Actions. This process brings several key advantages:

  • Cost efficiency: Static sites can be hosted on affordable, serverless platforms with minimal infrastructure requirements.
  • Enhanced security: Without a live server handling requests, the attack surface is drastically reduced.
  • Superior performance: Static sites are inherently fast, as they deliver pre-rendered HTML to users.

This integration of Ghost and Astro via GitHub Actions creates a smooth workflow for content updates, ensuring the site remains fresh and up-to-date with minimal manual effort.

BetterStack Uptime for real-time monitoring

To maintain the reliability of both our static website and the Ghost API, we integrated BetterStack Uptime for real-time monitoring. This tool allows us to continuously check the status of our site and API endpoints, ensuring that any downtime or issues are identified and addressed immediately. BetterStack Uptime provides several advantages such as instant alerts, detailed insights and a status page with a fairly good appearance.

The combination of Astro and Ghost, along with supporting tools like BetterStack Uptime, has proven to be a powerful setup for Artabric’s corporate website. By leveraging Astro’s performance-first approach, Ghost’s robust content management capabilities, and proactive monitoring from BetterStack Uptime, we’ve built a website that aligns with our goals for scalability, security, and usability.