Skip to content

Feat/prompt hub v2#4837

Open
fabianrbz wants to merge 3 commits intomainfrom
feat/prompt-hub-v2
Open

Feat/prompt hub v2#4837
fabianrbz wants to merge 3 commits intomainfrom
feat/prompt-hub-v2

Conversation

@fabianrbz
Copy link
Copy Markdown
Contributor

Description

Based on #4667
Add prompt hub with Run in Kai button + markdown support.
TODO: We need to migrate the rest of the prompts

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@fabianrbz fabianrbz requested a review from a team as a code owner April 13, 2026 10:58
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 13, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 1db0684
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/69dd31fcb10b600008303e2e
😎 Deploy Preview https://deploy-preview-4837--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 from app/_prompts/*.y{a,}ml and exposes them via site.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.copy is still computed and show_inline_actions is set based on it, but the copy control ({{ copy }}) is no longer rendered anywhere (header or inline actions), so the “copy code” button disappears; render copy again when codeblock.copy is 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 %}

Comment thread app/_includes/syntax_highlighting.html Outdated
Comment thread app/_plugins/converters/syntax_highlight.rb
Comment thread app/prompts.html Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants