Adding Kobweb to an Existing Project
Currently, Kobweb is still under active development, and due to our limited resources, we are focusing on improving the path to creating a new project from scratch. However, some users have shown interest in Kobweb but already have an existing project and aren't sure how to add Kobweb into it.
As long as you understand that this path isn't officially supported yet, we'll provide steps below to take which may help people accomplish this manually for now. Honestly, the hardest part is creating a correct .kobweb/conf.yaml
, which the following steps help you work around:
- Be sure to check the Kobweb compatibility matrix (COMPATIBILITY.md) to make sure you can match the versions it expects.
- Create a dummy app project somewhere on your system. Pay attention to the questions it asks you, as you may want to choose a package name that matches your project.
- When finished, copy the
site
subfolder out into your own project. (Once done, you can delete the dummy project, as it has served its usefulness.) - Ensure your Gradle project is configured to include Maven Central and Gradle Plugin Portal repositories, as described in Kobweb artifact repositories.
- Kobweb uses Gradle version catalogs for its dependencies. Add or update your version catalog under
gradle/libs.versions.toml
to include these:
If everything is working as expected, you should be able to run Kobweb within your project now: