docs.konghq.com icon indicating copy to clipboard operation
docs.konghq.com copied to clipboard

Feat: Plugin examples

Open lena-larionova opened this issue 9 months ago • 5 comments

Description

Add hub examples directory with some existing examples for openId connect, HTTP Log, and AI Proxy (three plugins that I knew had useable examples).

https://konghq.atlassian.net/browse/DOCU-3835

Notes:

  • I put them into app/assets/hub/kong-inc to mimic the pattern that KIC and KGO use for their examples. Does that work?
  • Added a "description" field to explain what the config is doing.
    • Included prereqs that are as short as possible
    • Included values that the user needs to customize

@fabianrbz For the prereqs and customizable values, is it fine to just have them manually written in the description? Or would it be better to do something like this, in case the various bits have to get pulled into a layout separately:

description: |
  Configure the plugin to do a thing.
prerequisites: |
  Do this thing first.
custom_values:
  - client_id
  - client_secret
  - redirect_uri
config:
  ...

Maybe that's a question for Carl & whoever implements the frontend eventually.

Testing instructions

Preview link:

Checklist

lena-larionova avatar May 01 '24 03:05 lena-larionova

Deploy Preview for kongdocs ready!

Name Link
Latest commit a47bbbe90ba0eb0f1eb5e629ec8bd646b6edae47
Latest deploy log https://app.netlify.com/sites/kongdocs/deploys/665a30042ab985000817d272
Deploy Preview https://deploy-preview-7327--kongdocs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
9 paths audited
Performance: 95 (🟢 up 3 from production)
Accessibility: 93 (no change from production)
Best Practices: 98 (🟢 up 8 from production)
SEO: 91 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

netlify[bot] avatar May 01 '24 03:05 netlify[bot]

Can we keep custom_values in a separate list? We can generate templated output from that and it makes the data useful for the UI e.g. a "move to next field" button to cycle through required fields

mheap avatar May 02 '24 12:05 mheap

Can we keep custom_values in a separate list? We can generate templated output from that and it makes the data useful for the UI e.g. a "move to next field" button to cycle through required fields

That makes sense to me.

What about prereqs?

lena-larionova avatar May 02 '24 15:05 lena-larionova

I would keep pre_reqs in a separate list too, it gives us more flexibility

fabianrbz avatar May 03 '24 06:05 fabianrbz

@fabianrbz done. Kept the label short as prereqs because prerequisites is prone to spelling errors 😄

lena-larionova avatar May 03 '24 17:05 lena-larionova