Skip to content

Conversation

@jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented Oct 12, 2025

The templates are not DRY.

Integrated the kapa.ai AI assistant widget into guideItem.html, layout.html, menu.html, and referenceItem.html templates. This provides users with an AI-powered assistant for Apache Grails documentation, including example questions, branding, and consent requirements.

Modeled after https://hudi.apache.org/ integration

Preview Widget: https://demo.kapa.ai/widget/apache-grails

Integrated the kapa.ai AI assistant widget into guideItem.html, layout.html, menu.html, and referenceItem.html templates. This provides users with an AI-powered assistant for Apache Grails documentation, including example questions, branding, and consent requirements.
@jamesfredley jamesfredley self-assigned this Oct 12, 2025
@jamesfredley jamesfredley moved this to In Progress in Apache Grails Oct 12, 2025
@jamesfredley jamesfredley added this to the grails:7.0.0 milestone Oct 12, 2025
@jamesfredley
Copy link
Contributor Author

image

@fernando88to
Copy link
Contributor

This is a really cool initiative. One suggestion is to leave this link in the project's README.MD or in the documentation itself.

Copy link
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is changing the default templates to be very ASF specific- shouldn't we instead put the templates in the grails doc project and not publish them?

@matrei
Copy link
Contributor

matrei commented Oct 13, 2025

this is changing the default templates to be very ASF specific- shouldn't we instead put the templates in the grails doc project and not publish them?

Isn't the page tracker already making the templates project specific?

@jamesfredley
Copy link
Contributor Author

@fernando88to Do you think it would be OK to add an Ask AI section which links to the current version of docs, which will have the current version of AI Widget?

@jdaugherty @matrei These 4 templates historically had the Grails Google Analytics tracker, which was transitioned to Apache/Matomo with the move to ASF. I'd like to move forward with these Kapa.ai changes, so they are included on latest and 7.0.x, with the release. I'm onboard with a follow-up PR which moves these changes, but would still want the templates centralized for guide generation on the projects which live at Apache.

@jdaugherty
Copy link
Contributor

@matrei I pushed back when we changed the tracker too and was told we would address later - now we're making it even worse.

Several plugins I've converted have used these tasks. If we're going to continue to customize them, we should just stop publishing the doc helper so we can do our own thing.

Otherwise, the task takes a template directory (set styleDir). To make this work, we just have to add folder under grails-docs & then set the styleDir on the doc task to that directory.

I don't think we should move forward unless we do one of these items - stop publishing the docs task or use external templates. Both of these items are trivial to accomplish. I'm happy to adjust the PR if we're worried about timing.

@jdaugherty
Copy link
Contributor

@jamesfredley as for the analytics, I think we were intentionally trying to track third parties in the past. Now we're not due to ASF policy, so that's why analytics were there previously.

@matrei
Copy link
Contributor

matrei commented Oct 13, 2025

@matrei I pushed back when we changed the tracker too and was told we would address later - now we're making it even worse.

Several plugins I've converted have used these tasks. If we're going to continue to customize them, we should just stop publishing the doc helper so we can do our own thing.

Otherwise, the task takes a template directory (set styleDir). To make this work, we just have to add folder under grails-docs & then set the styleDir on the doc task to that directory.

I don't think we should move forward unless we do one of these items - stop publishing the docs task or use external templates. Both of these items are trivial to accomplish. I'm happy to adjust the PR if we're worried about timing.

I understand and I think you are right that it would be nice to have the styleDir configurable. My point was, that the tracker already being in the templates, makes them unusable anyway for other projects so this should not necessarily hold up this PR.

@jdaugherty
Copy link
Contributor

We originally agreed we would clean this up after the tracker was added, and we're now making the situation even worse.

I'll push an update to this PR to make it private then.

Copy link
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed grails-doc-core from publishing. If we really want to publish this, we should be setting the styleDir to specify a different template directory.

@jdaugherty jdaugherty merged commit cebdaf0 into 7.0.x Oct 13, 2025
1 of 28 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache Grails Oct 13, 2025
@jdaugherty jdaugherty deleted the kapa-ai-widget branch October 13, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants