How to Add a Newsletter to Your Grav Blog

This guide explains how to integrate BlogTally Broadcast with your Grav-powered blog to automatically send newsletters based on your RSS feed.

Prerequisites

  • A Grav blog
  • A BlogTally account
  • Grav Admin Panel installed (recommended)
  • Basic knowledge of Grav configuration

Setting up RSS Feed in Grav

Grav requires the Feed plugin to generate RSS feeds. Here's how to set it up:

1. Install the Feed Plugin

Using the Admin Panel:

  1. Go to 'Plugins'
  2. Click 'Add'
  3. Search for 'Feed'
  4. Click 'Install'

Or via command line:

bin/gpm install feed

2. Configure the Plugin

In your Admin Panel, go to 'Plugins' > 'Feed' and ensure these settings:

enabled: true
limit: 10
description: 'My Blog Feed'
lang: en
length: 500
enable_json_feed: false

You can also configure it manually in user/plugins/feed.yaml.

Add these links to your theme's <head> section (usually in templates/partials/base.html.twig):

{% if config.plugins.feed.enabled %}
    <link rel="alternate" type="application/atom+xml" title="Atom Feed" href="{{ base_url }}/atom.xml" />
    <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="{{ base_url }}/rss.xml" />
{% endif %}

Your RSS feed will be available at /rss.xml.

For additional feed configuration options, refer to the Grav Feed Plugin documentation.

Integrating with BlogTally Broadcast

Once your RSS feed is set up, you can integrate it with BlogTally Broadcast in two steps:

1. Create a Campaign

  1. Navigate to the Campaigns section in your BlogTally dashboard
  2. Create a new RSS-based campaign
  3. Enter your Grav blog's RSS feed URL (typically https://yourblog.com/rss.xml)
  4. Configure your campaign settings

For detailed instructions on campaign creation and management, see our Campaign Management Guide.

2. Add a Subscription Form

To collect subscribers, you'll need to add a subscription form to your blog. BlogTally provides several options:

  • Use our pre-built forms
  • Create a custom form
  • Integrate with your existing forms

For form creation and customization instructions, check our Forms Documentation.

Next Steps

Need Help?

If you encounter any issues or need assistance, feel free to contact our support team.