Automation Scripts

This directory contains custom automation scripts specific to your site.

Purpose

Scripts here run independently of the build process for tasks like:

Running Scripts

Add scripts to package.json:

{
  "scripts": {
    "my-script": "node scripts/my-script.js"
  }
}

Run with: npm run my-script

Example Scripts

RSS Content Fetcher

Automatically fetch content from external RSS feeds and convert to markdown:

npm run fetch-rss -- --feedUrl "URL" --outputDir "./content/posts/"

See platform's example fetch-rss.js for reference implementation.

GitHub Actions Integration

Automate scripts with GitHub Actions. Example in .github/workflows/:

on:
  schedule:
    - cron: '0 6 * * *'  # Daily at 6am
jobs:
  fetch:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install
      - run: npm run fetch-rss
      - run: git commit && git push

When to Use Scripts

Use scripts for site-specific automation. For functionality that should be part of the platform, contribute to platform/ instead.