• Stars
    star
    186
  • Rank 200,313 (Top 5 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 9 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿฆ Source code for docs.konghq.com website.

Netlify Status

Kong's Documentation Website

This repository contains the source content and code for Kong's documentation website. It's built using Jekyll and deployed with Netlify.

Here are some things to know before you get started:

  • We're beginner-friendly. Whether you're a Technical Writer learning about docs-as-code or an engineer practicing your documentation skills, we welcome your involvement. If you'd like to contribute and don't have something in mind already, head on over to Issues. We've added good first issue labels on beginner-friendly issues.

  • We need more help in some areas. We'd especially love some help with plugin documentation.

  • Some of our docs are generated.

All pull requests for these docs should be opened in the Kong/kong repository. Fork the repository and submit PRs from your fork.

For Gateway Enterprise configuration reference, open an issue on this repo and we'll update the docs.

  • Community is a priority for us. Before submitting an issue or pull request, make sure to review our Contributing Guide and our documentation templates.

  • We are currently accepting plugin submissions to our plugin hub from trusted technical partners, on a limited basis. For more information, see the Kong Partners page.

Run Locally

For anything other than minor changes, clone the repository onto your local machine and build locally. Once you've installed all of the tools required, you can use our Makefile to build the docs:

# Install dependencies
make install

# Make sure to update submodules
git submodule update --init --recursive

# Build the site and watch for changes 
make run

Plugin contributors

If you have contributed a plugin, you can add a Kong badge to your plugin README.

Use the following, where you replace test with your plugin name and link-to-docs with a link to the Kong docs for your plugin.

[![](https://img.shields.io/badge/Kong-test-blue.svg?colorA=042943&colorB=00C4BB&style=flat&longCache=true&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAIAAAAC64paAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAAAIcSURBVDhPY2DRdCYb0Vgzh46btlcCmiAEEdDMb+w9a+Xmr99/FHdM49R1R5PFp5nPyHvfifP/weDvv39LNu4SMfdHVoBPs2VY9q4jpx8+ewnRDwRHz13h1veAK8CpmdfQq6xrRt2EeS7xxc9evYVovvf4mbhlIFwNTs1JlV1///4Fajh96UZIbt2nL1+B7B8/fznGFsDVYNcsYRX04jXUtn///m3ae7SgZcrnr9/aZixBDjYsmnn0Pe2j85++fAPRDAR///6btGitWXAGu7Yrskp0zaLmAWt2HLxy+35UUcvHzyCnQsCv37/zWiaxabkgK0ZoFrMIMA3OOH/t9j+w6j3HzmbW9wE9CeaBwJdv30PyGuDqgQiqWdDU9/TlG99//IQqBHt1wbodjZMX/PnzByr0///rdx+sI3JQNAMT4ML1O6HySOD3nz+FbVOBUsAUAhUCx5aqawxCc2HbFKA9UEmwHqATgOjdx092UXmCJr57j5+DyoHBqUs3RC0CoJqRXfv795/sxol+GVVA5JJQzK3vCVQgZx92+eY9qApI5O07BtUMFQODGcs3RRY1v3zzHug9IJq4cA3QU0A1+r7JT168hir6/x/IZtVyQdF85spNYGYAOunh0xcQEWAM5TRNBKoBIo/ksi9fv0PEgdEJFAFpvnbnARBduH4Hnm+BKQkiCETAMGfTBkWviJn/3mNnIYKp1d1QzWQiTWcA1wsS5+E9q+MAAAAASUVORK5CYII=)](link-to-docs)

Here's how the badge looks:

See Issue #908 for more information. Note that we're not currently hosting assets for badges.

Generate the PDK, Admin API, CLI, and Configuration documentation

This section is for Kong source code maintainers. You don't need to do anything here if you're contributing to this repo!

The PDK docs, Admin API docs, cli.md and configuration.md for each release are generated from the Kong source code.

To generate them, go to the Kong/kong repo and run:

scripts/autodoc <docs-folder> <kong-version>

For example:

cd /path/to/kong
scripts/autodoc ../docs.konghq.com 2.4.x

This example assumes that the Kong/docs.konghq.com repo is cloned into the same directory as the Kong/kong repo, and that you want to generate the docs for version 2.4.x. Adjust the paths and version as needed.

After everything is generated, review, open a branch with the changes, send a pull request, and review the changes.

You usually want to open a PR against a release/* branch. For example, in the example above, the branch was release/2.4.

cd docs.konghq.com
git fetch --all
git checkout release/2.4
git checkout -b release/2.4-autodocos
git add -A .
git commit -m "docs(2.4.x) add autodocs"
git push

Then open a pull request against release/2.4.

Testing

Tests for this site are written using fetch, cheerio and jest

To run the tests, you must first build the site by running make build before running make smoke.

Many of the tests are smoke tests to check for issues that occurred while adding caching to the site, such as ensuring that the side navigation isn't cached.

To add your own tests, look in the tests directory and use home.test.js as a sample. You specify which URL to visit and then a CSS selector to search for, before asserting that the contents match what you expect.

test("has the 'Welcome to Kong' header", async () => {
  const $ = await fetchPage("/")
  expect($("#main")).toHaveText("Welcome to Kong Docs");
});

Continuous Integration

We run various quality checks at build time to ensure that the documentation is maintainable.

Some of the checks can be manually marked as approved using labels:

  • ci:manual-approve:link-validation - mark link checking as successful. Useful when Netlify returns an HTTP 400 error and the links are validated manually.

include-check

The include-check.sh script checks for any files in the app/_includes folder that depend on a page.* variable (e.g. page.url). This is not compatible with the include_cached gem that we use, and so using page.* in an include will fail the build.

To run the script locally, open a terminal, navigate to the documentation folder, and run ./include-check.sh. If there is no output, everything is successful.

In the following example, we can see that deployment-options-k8s.md uses a page.* variable, and that the include is used in the kong-for-kubernetes.md file:

โฏ ./include-check.sh
Page variables must not be used in includes.
Pass them in via include_cached instead

Files that currently use page.*:
File: app/_includes/md/2.5.x/deployment-options-k8s.md
via:
app/enterprise/2.5.x/deployment/installation/kong-for-kubernetes.md

Here are sample contents for those files:

In kong-for-kubernetes.md:

{% include_cached app/_includes/md/2.5.x/deployment-options-k8s.md %}

In deployment-options-k8s:

This is an include that uses {{ page.url }}

To resolve this, the two files should be updated to pass in the URL when include_cached is called:

In kong-for-kubernetes.md:

{% include_cached app/_includes/md/2.5.x/deployment-options-k8s.md url=page.url %}

In deployment-options-k8s:

This is an include that uses {{ include.url }}

The include_cached gem uses all passed parameters as the cache lookup key, and this ensures that all required permutations of an include file will be generated.

For guidelines on how to write includes and call them in target topics, see the Kong Docs contributing guidelines.

Review Labels

When raising a pull request, it's useful to indicate what type of review you're looking for from the team. To help with this, we've added three labels that can be applied:

  • review:copyedit: Request for writer review.
  • review:general: Review for general accuracy and presentation. Does the doc work? Does it output correctly?
  • review:tech: Request for technical review from an SME.

At least one of these labels must be applied to a PR or the build will fail.

More Repositories

1

kong

๐Ÿฆ The Cloud-Native API Gateway and AI Gateway.
Lua
37,159
star
2

insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets and gRPC.
JavaScript
30,407
star
3

unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
Java
2,560
star
4

kubernetes-ingress-controller

๐Ÿฆ Kong for Kubernetes: The official Ingress Controller for Kubernetes.
Go
2,127
star
5

swrv

Stale-while-revalidate data fetching for Vue
TypeScript
2,048
star
6

mockbin

Mock, Test & Track HTTP Requests and Response for Microservices
JavaScript
1,988
star
7

mashape-oauth

OAuth Modules for Node.js - Supporting RSA, HMAC, PLAINTEXT, 2,3-Legged, 1.0a, Echo, XAuth, and 2.0
JavaScript
1,781
star
8

docker-kong

๐Ÿ’ Docker distribution for Kong
Shell
1,351
star
9

unirest-php

Unirest in PHP: Simplified, lightweight HTTP client library.
PHP
1,282
star
10

httpsnippet

HTTP Request snippet generator for many languages & libraries
TypeScript
1,061
star
11

unirest-nodejs

Unirest in Node.js: Simplified, lightweight HTTP client library.
JavaScript
954
star
12

guardian

Remove the OAuth dance with one request.
JavaScript
640
star
13

unirest-python

Unirest in Python: Simplified, lightweight HTTP client library.
Python
432
star
14

deck

decK: Configuration management and drift detection for Kong
Go
419
star
15

apiembed

Embeddable API code snippets for your website, blog or API documentation
Pug
402
star
16

unirest-ruby

Unirest in Ruby: Simplified, lightweight HTTP client library.
Ruby
365
star
17

unirest-obj-c

Unirest in Objective-C: Simplified, lightweight HTTP client library.
Objective-C
276
star
18

kong-dist-kubernetes

Kubernetes managed Kong cluster
Shell
255
star
19

kong-plugin

Simple template to get started with custom Kong plugins
Lua
230
star
20

charts

Helm chart for Kong
Mustache
224
star
21

unirest-net

Unirest in .NET: Simplified, lightweight HTTP client library.
C#
190
star
22

lua-resty-worker-events

Cross Worker Events for Nginx in Pure Lua
Lua
186
star
23

kong-oauth2-hello-world

This is a simple node.js + express.js application that shows an authorization page for the OAuth 2.0 plugin on Kong.
JavaScript
173
star
24

kong-manager

Admin GUI for Kong Gateway (Official)
TypeScript
170
star
25

lua-resty-dns-client

Lua DNS client, load balancer, and utility library
Lua
151
star
26

kong-pongo

Tooling to run plugin tests with Kong and Kong Enterprise
Lua
139
star
27

go-pdk

Kong Go Plugin Development Kit
Go
126
star
28

kong-vagrant

๐Ÿ’ Vagrantfile for Kong testing and development
Shell
125
star
29

kongponents

๐Ÿฆ Kong Vue Component Library
Vue
119
star
30

lua-resty-healthcheck

Healthcheck library for OpenResty to validate upstream service status
Lua
119
star
31

kong-plugin-prometheus

Prometheus plugin for Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
119
star
32

apiglossary

Open source glossary of API terms, acronyms and industry buzzwords.
95
star
33

go-plugins

A collection of Kong plugins written in Go
Go
86
star
34

go-kong

Go binding for Kong's admin API
Go
81
star
35

kong-terraform-aws

Kong Terraform Module for AWS
HCL
77
star
36

kong-build-tools

Build tools to package and release Kong
Shell
77
star
37

homebrew-kong

๐Ÿ’ Homebrew tap for Kong
Ruby
69
star
38

kong-dist-cloudformation

๐Ÿ’ Kong CloudFormation Stack
66
star
39

go-pluginserver

Kong Go Plugin Server
Go
66
star
40

ngx_wasm_module

Nginx + WebAssembly
C
64
star
41

kong-plugin-zipkin

A Kong plugin for propogating zipkin spans and reporting spans to a zipkin server - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
60
star
42

kong-operator

Kong Operator for Kubernetes and OpenShift
Mustache
58
star
43

lua-multipart

Multipart Parser for Lua
Lua
55
star
44

mashape-php-library

Mashape PHP Server Library - Easily create an API in PHP. You can use it for existing services or brand new cloud components.
PHP
50
star
45

gojira

Multi-purpose tool to ease development and testing of Kong by using Docker containers
Shell
45
star
46

HARchiver

[Deprecated] Universal Lightweight Proxy for Galileo
OCaml
41
star
47

koko

koko - Control Plane for Kong Gateway [open-source]
Go
41
star
48

unirest-website

Simplified, lightweight HTTP libraries in multiple languages
HTML
39
star
49

kong-python-pdk

Write Kong plugins in Python
Python
39
star
50

go-srp

Secure Remote Password library for Go
Go
38
star
51

tcpbin

TCP Request & Response Service, written in node.js
HTML
37
star
52

kong-portal-templates

Themes, components, and utilities to help you get started with the Kong Dev Portal.
CSS
35
star
53

kong-plugin-acme

Let's Encrypt and ACMEv2 integration with Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
34
star
54

kong-mesh-dist-kubernetes

Start Kong 1.0 as a K8s sidecar
Makefile
33
star
55

kubernetes-testing-framework

Golang Integration Testing Framework For Kubernetes APIs and Controllers.
Go
32
star
56

gateway-operator

Go
32
star
57

demo-scene

๐Ÿฆ a collection of demos and examples around Kong tools and technologies
JavaScript
30
star
58

docker-java8

A Dockerfile for starting a container with Java 8 installed
30
star
59

lua-kong-nginx-module

Nginx C module to allow deeper control of Nginx behaviors by Kong Lua code
Perl
30
star
60

Astronode-Broadcaster

A TCP replication server, or broadcaster, that replicates TCP commands to other TCP servers
Java
29
star
61

opentracing-lua

Opentracing Library for Lua
Lua
28
star
62

konnect-portal

Konnect OSS Dev Portal
TypeScript
28
star
63

atc-router

Expression based matching library for Kong
Rust
28
star
64

kong-js-pdk

Kong PDK for Javascript and plugin server
JavaScript
28
star
65

boss.js

Automatically load balance asyncronous jobs across multiple processes in a round-robin fashion.
JavaScript
27
star
66

kong-portal-cli

Kong Developer Portal CLI
TypeScript
25
star
67

lua-uuid

Lua library to generate UUIDs leveraging libuuid
Lua
25
star
68

insomnia-docs

This repository houses all Insomnia documentation.
JavaScript
25
star
69

lua-resty-lmdb

Safe API for manipulating LMDB databases using OpenResty/Lua.
C
24
star
70

lua-resty-aws

AWS SDK for OpenResty
Lua
22
star
71

lua-resty-timer

Extended timers for OpenResty
Perl
22
star
72

lua-resty-events

Inter process Pub/Sub pattern for Nginx worker processes
Perl
22
star
73

kong-plugin-request-transformer

Kong request transformer plugin - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
21
star
74

lua-resty-counter

Lock-free counter for OpenResty
Perl
21
star
75

kong-plugin-session

๐Ÿช Session plugin for Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
20
star
76

lua-pack

A library for packing and unpacking binary data.
C
20
star
77

go-apiops

Kong's Go based APIOps library
Go
18
star
78

swagger-ui-kong-theme

Plugin theme for Swagger-UI that adds snippets
JavaScript
18
star
79

api-log-format

Specification and examples of the new API logging format ALF
17
star
80

kong-plugin-serverless-functions

Kong Serverless Plugins - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
17
star
81

apistatus

API status is a simple tool that checks if an API is online. http://apistatus.org
JavaScript
15
star
82

openresty-patches

Moved to https://github.com/Kong/kong-build-tools
Perl
14
star
83

kong-plugin-grpc-gateway

Kong Plugin to transcode REST request to gRPC - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
14
star
84

lua-resty-consul-event

Consul Events HTTP API Wrapper
Perl
14
star
85

srp-js

Fork of node-srp modified to work in the browser
TypeScript
14
star
86

harplayer

Replay HAR logs
JavaScript
13
star
87

kong-plugin-aws-lambda

AWS Lambda plugin - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
13
star
88

openresty-build-tools

Moved to https://github.com/Kong/kong-build-tools
Shell
13
star
89

jenkins-infrastructure

Cloudformation to create and update an ECS cluster that runs jenkins
Shell
12
star
90

kong-plugin-proxy-cache

HTTP Proxy Caching for Kong - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Lua
12
star
91

openapi2kong

Lib to convert OpenAPI specs into Kong specs
Lua
12
star
92

version.lua

Simple version comparison library
Lua
11
star
93

httpbin

Python
11
star
94

changelog-generator

a changelog generator focused on flexibility and ease of use
TypeScript
11
star
95

vault-kong-secrets

A Kong secrets backend for Vault
Go
11
star
96

py-postgrest

A library to work with PostgREST based APIs from Python
Python
11
star
97

priority-updater

Tool to quickly create a plugin with an updated priority
Lua
11
star
98

galileo-agent-java

Java Agent for Mashape Galileo
Java
10
star
99

kong-plugin-openwhisk

A kong plugin to invoke OpenWhisk action (serverless functions as service).
Lua
10
star
100

kong-upgrade-tests

Tests for upgrading from one Kong version to the next
Shell
10
star