Skip to content

infolektuell/gradle-astro

Repository files navigation

Gradle Astro Plugin

Astro is a static site generator running in JavaScript environments like Node.js. This Gradle plugin can be used to build and check Astro sites instead of running Astro in npm scripts.

Features

  • Build and check astro sites in a Gradle project
  • Build only if sources have changed, no extra special mode needed
  • Compatible with Configuration Cache

Usage

In build.gradle.kts next to src, the plugin must be configured:

plugins {
    // Good to have some standard tasks like clean
    id("base")
    // Apply the Astro plugin
    id("de.infolektuell.astro") version "0.1.0"
}

The plugin attaches its tasks to the base plugin's assemble and check tasks.

  • gradlew build generates the website under build/dist
  • gradlew check checks for errors in the source code
  • Both don't write the command output to stdout, but the logs are written to build/reports/astro

License

MIT License

About

Gradle plugin to build and check Astro sites

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages