This directory contains custom automation scripts specific to your site.
Scripts here run independently of the build process for tasks like:
Add scripts to package.json:
{
"scripts": {
"my-script": "node scripts/my-script.js"
}
}
Run with: npm run my-script
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.
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
Use scripts for site-specific automation. For functionality that should be part of the platform, contribute to platform/ instead.