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.
- Build and check astro sites in a Gradle project
- Build only if sources have changed, no extra special mode needed
- Compatible with Configuration Cache
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/distgradlew 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