This folder is the source code for Kong's website. It is a Jekyll website hosted on GitHub pages.
gem install bundler
npm install
npm start
- Have a local clone of Kong.
- Checkout the desired branch/tag/release.
- Set an env variable
KONG_PATH
to point to your local clone. - Run:
gulp docs
- Module docs are generated into
./lua-reference
. - Manually move to the desired location (appropriate version folder).
This will deploy to GitHub pages:
npm run deploy
We are using Algolia docsearch for our CE documentation search. The algolia index is maintained by Algolia through their docsearch service. Their scraper runs every 24 hours. The config used by the scraper is open source for getkong.org and can be found here. To update the scraper config, you can submit a pull request to the config. To test a config change locally, you will need to run their open source scraper against your own scraper to test out config changes.
Plugins are documented under app/plugins
. They use a YAML-based system to
generate many of the sections on each plugin page. Please look at the existing
plugins for examples. Fields are:
description
- text to be added in the Description section. Use YAML's pipe notation to write multi-paragraph text. Note that due to the order that data is generated, you may not use forward-references in links (e.g. use[example](http://example.com)
and not[example][example]
pointing to an index at the end).params
name
- name of the plugin in Kong (not always the same spelling as the page name)api_id
- boolean - whether this plugin can be applied to an API. Affects generation of examples and config table.route_id
- boolean - whether this plugin can be applied to a Route. Affects generation of examples and config table.service_id
- boolean - whether this plugin can be applied to a Service. Affects generation of examples and config table.consumer_id
- boolean - whether this plugin can be applied to a Consumer. Affects generation of examples and config table.config
- the configuration table. Each entry is a configuration item with the following fields:name
- the field name as read by Kongrequired
-true
if required,false
if optional,semi
if semi-required (required depending on other fields)default
- the default value. If using Markdown (e.g. to make values appear type-written), wrap it in double-quotesvalue_in_examples
- if the field is to appear in examples, this is the value to use. A required field with novalue_in_examples
entry will resort to the one indefault
.description
- description of the field. Use YAML's pipe notation if writing longer Markdown text.