Open
Conversation
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “Prompt Hub” section to the Kong Developer site, including generated prompt overview pages sourced from YAML, plus UI filtering and a “Run in KAi” action from code blocks.
Changes:
- Introduces a prompts generator that builds
/prompts/:slug/pages fromapp/_prompts/*.y{a,}mland exposes them viasite.data.prompts. - Adds the
/prompts/hub page UI (cards + product filter) and prompt overview content rendering (including markdown support). - Extends codeblock rendering to support a “Run in KAi” link and adjusts hub filtering to include product filtering.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| jekyll-dev.yml | Adds a dev skip flag for prompt generation. |
| app/prompts.html | New Prompt Hub landing page with filters, search, and cards. |
| app/_prompts/security.yaml | Adds a Security prompt category and prompts. |
| app/_prompts/debugging.yaml | Adds a Debugging prompt category and prompts. |
| app/_plugins/generators/prompts/prompt.rb | Defines the Prompt model loaded from YAML. |
| app/_plugins/generators/prompts/pages/overview.rb | Adds generated overview page type for prompts. |
| app/_plugins/generators/prompts/pages/base.rb | Base page data/URL plumbing for generated prompt pages. |
| app/_plugins/generators/prompts/generator.rb | Discovers prompt YAML files and generates pages/data entries. |
| app/_plugins/generators/prompts.rb | Registers the prompts generator and initializes site.data.prompts. |
| app/_plugins/generators/data/title/prompt.rb | Adds title handling for prompt pages. |
| app/_plugins/generators/data/title/base.rb | Routes /prompts/ URLs to the new Prompt title generator. |
| app/_plugins/generators/data/search_tags/prompt.rb | Adds search tag generator class for prompt content type. |
| app/_plugins/generators/data/search_tags/base.rb | Registers prompt as a recognized content type for search tags. |
| app/_plugins/converters/syntax_highlight.rb | Adds generation of “Run in KAi” links for eligible code blocks. |
| app/_layouts/prompts/overview.html | Adds layout for prompt overview pages. |
| app/_includes/syntax_highlighting.html | Updates codeblock header rendering to include “Run in KAi” UI. |
| app/_includes/prompts/overview.md | Adds prompt overview markdown include rendering prompts as runnable code blocks. |
| app/_includes/product_icon.html | Adds a reusable product icon include for prompt cards/filters. |
| app/_includes/checkbox.html | Adds optional icon rendering for checkbox rows. |
| app/_includes/cards/prompt.html | Adds prompt card UI for the hub page (products + description). |
| app/_data/schemas/frontmatter/base.json | Allows content_type: prompt in frontmatter schema. |
| app/_assets/stylesheets/index.css | Adjusts code wrapping behavior for ask-kai codeblocks. |
| app/_assets/entrypoints/hub.js | Adds “product” filter support to the existing hub filtering logic. |
Comments suppressed due to low confidence (1)
app/_includes/syntax_highlighting.html:40
codeblock.copyis still computed andshow_inline_actionsis set based on it, but the copy control ({{ copy }}) is no longer rendered anywhere (header or inline actions), so the “copy code” button disappears; rendercopyagain whencodeblock.copyis true (in the header and/or inline actions).
{% assign show_inline_actions = false %}
{% if codeblock.render_header == false and codeblock.copy %}{% assign show_inline_actions = true %}{% endif %}
{% if codeblock.render_header == false and codeblock.collapsible %}{% assign show_inline_actions = true %}{% endif %}
<div class="flex w-full relative bg-code-block rounded-b-lg border border-primary/5 overflow-auto p-3 {% if codeblock.render_header %}border-t-0{% else %}rounded-t-lg{% endif %} {% if show_inline_actions %}pr-11{% endif%}" data-code-snippet>
<div class="code-block h-full w-full">{{codeblock.snippet}}</div>
{% if show_inline_actions %}
<div class="flex absolute right-3 top-[10px] items-center gap-2">
{% if codeblock.collapsible %}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Based on #4667
Add prompt hub with
Run in Kaibutton + markdown support.TODO: We need to migrate the rest of the prompts
Preview Links
Checklist
descriptionentry in frontmatter.