1.0.7 • Published 4 months ago

astro-itchio-publisher v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Astro Itchio Publisher

An AstroJS integration that automates deployment to Itch.io by fixing paths, zipping your dist folder, and optionally uploading it via the Itch.io API or Butler. Perfect for manual uploads too—just fix paths and zip!

Installation

npm install astro-itchio-publisher

Usage

Install the package:

npm install astro-itchio-publisher

Configure in astro.config.mjs:

API Method (Automated Upload):

import { defineConfig } from 'astro/config';
import astroItchioPublisher from 'astro-itchio-publisher';

export default defineConfig({
  integrations: [
    astroItchioPublisher({
      itchProject: 'your-username/your-game:html5',
      apiKey: 'your-itchio-api-key' // From https://itch.io/user/settings/api-keys
    })
  ]
});

Butler Method (Automated Upload):

Install Butler: Download and run butler login.

import { defineConfig } from 'astro/config';
import astroItchioPublisher from 'astro-itchio-publisher';

export default defineConfig({
  integrations: [
    astroItchioPublisher({
      itchProject: 'your-username/your-game:html5',
      useButler: true
    })
  ]
});

Manual Upload Method (Path Fixing + Zip Only):

No upload config needed—just add the integration.

import { defineConfig } from 'astro/config';
import astroItchioPublisher from 'astro-itchio-publisher';

export default defineConfig({
  integrations: [
    astroItchioPublisher()
  ]
});

Build your project:

npm run build

This fixes paths and zips dist into astro-itchio-publisher-dist.zip.

  • For API/Butler, it uploads automatically.
  • For manual, upload the zip to Itch.io yourself.

Options

  • itchProject: Your Itch.io project (e.g., username/project:channel).
  • apiKey: Required for API method, from Itch.io settings.
  • useButler: Set to true for Butler, false for API (default: false).

Links

Contributing

Built with ❤️ by Neill Hewitt. Open issues or PRs on GitHub!