Mastodon to Jekyll Sync Setup

Mastodon to Jekyll Sync Setup

This repository now includes an automated system to sync your Mastodon posts to Jekyll blog posts.

How It Works

The GitHub Actions workflow (.github/workflows/mastodon-to-jekyll.yml) runs every 2 hours and:

  1. Fetches your Mastodon RSS feed from https://aus.social/@lukesleeman.rss
  2. Creates Jekyll markdown files in the _posts/ directory for new posts
  3. Commits and pushes any new posts automatically

Go live date

The system automatically filters out posts before a “go live date”

Date Filtering

Hashtag Filtering

You can configure the sync to only import posts that include a specific hashtag. This is useful if you want to be selective about which posts get synced to your blog.

To enable hashtag filtering, edit .github/scripts/config.js:

HASHTAG_FILTER: {
  // Set to true to only sync posts with a specific hashtag
  ENABLED: true,  // Change to true to enable filtering
  // The hashtag to filter by (without the # symbol)
  // Posts will only be synced if they contain this hashtag
  TAG: 'microblog'  // Change to your preferred hashtag
}

Behavior Options:

Example:

What Gets Created

Each Mastodon post becomes a Jekyll post with:

Local Testing

You can test locally without creating files (dry run) by running

node .github/scripts/test-sync.js

Or create actual posts and download images by

node .github/scripts/sync-mastodon.js

Customisation Options

Changing Configuration

All settings are now in .github/scripts/config.js for easy modification:

module.exports = {
  // Only process posts after this date (set to go-live date)
  CUTOFF_DATE: '2025-08-29T00:00:00Z',  // Change this date

  // Mastodon RSS feed URL
  RSS_FEED_URL: 'https://aus.social/@lukesleeman.rss',

  // Jekyll post settings
  POST_SETTINGS: {
    layout: 'post',
    categories: ['mastodon', 'microblog'],  // Change categories here
    timezone: '+1000'
  },

  // Processing limits
  MAX_POSTS_PER_RUN: 10,  // How many posts to process per run
  MIN_POST_LENGTH: 10,    // Minimum post length to include

  // Hashtag filtering settings
  HASHTAG_FILTER: {
    ENABLED: false,       // Set to true to enable hashtag filtering
    TAG: 'microblog'      // The hashtag to filter by (without #)
  }
};

The cron schedule can be edited in the workflow file

Title Generation

The system uses intelligent title generation (.github/scripts/title-generator.js) that creates readable, descriptive titles from your Mastodon posts instead of simple truncation.

Title Generation Strategies

Examples

You can test title generation with: node .github/scripts/test-title-generator.js