diff --git a/.gitignore b/.gitignore index da89ab4f2e18..04a085a770c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.env .che .vagrant .buildpath diff --git a/.travis.yml b/.travis.yml index 461ca64dfe08..7ae3ab5f7fe7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,12 @@ -language: node_js -node_js: - - "8" - +dist: xenial sudo: false + +language: generic notifications: email: false -cache: - bundler: true - yarn: true - before_install: - - rvm install 2.3.3 - - npm install -g yarn -install: - - bundle install - - yarn -before_script: - - npm test -script: - - gulp build + - docker-compose build + - touch Gemfile.lock + - mkdir node_modules + - chmod -R 777 . diff --git a/Dockerfile b/Dockerfile index 22335c9b2bbc..03a1cde620cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,13 @@ # This should mirror the jekyll version in the Gemfile -FROM jekyll/jekyll:3.8.5 - -WORKDIR /srv/jekyll +FROM jekyll/jekyll:3.8.6 RUN apk add --update autoconf automake file build-base nasm musl libpng-dev zlib-dev -COPY entrypoint.sh /entrypoint.sh - -RUN npm install -g yarn && npm install -g gulp +WORKDIR /srv/jekyll +COPY Makefile /srv/jekyll +RUN make install-prerequisites RUN chmod -R 777 /usr/lib/node_modules \ - && chmod 777 /entrypoint.sh \ && usermod -a -G root jekyll -ENTRYPOINT ["/entrypoint.sh"] - EXPOSE 3000 3001 diff --git a/Gemfile b/Gemfile index c493bddede24..f750b48692d8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -gem 'jekyll', '~> 3.8.5' +gem 'jekyll', '~> 3.8.6' gem 'jekyll-redirect-from' -gem 'redcarpet', '3.4.0' -gem 'rouge', '3.4.1' +gem 'redcarpet', '3.5.0' +gem 'rouge', '3.10.0' diff --git a/Makefile b/Makefile index c26d3f99b1ff..acebd16d0ba0 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,26 @@ +install-prerequisites: + npm install -g yarn + npm install -g gulp + +install: + npm install + bundle install + yarn --ignore-engines + yarn upgrade + +run: install + gulp + develop: - docker-compose up --build + docker-compose up + +test: install + npm test + +docker-test: + COMMAND="make test" docker-compose up + +check-links: + docker-compose up -d + while [ `curl -s -o /dev/null -w ''%{http_code}'' localhost:3000` != 200 ]; do echo "waiting"; docker-compose logs --tail=2 jekyll; sleep 20; done + docker-compose exec jekyll yarn blc http://localhost:3000 -efr --exclude careers --exclude hub diff --git a/README.md b/README.md index e71cb0e354be..8b2f5162fc30 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,19 @@ This repository is the source code for [Kong](https://github.com/Kong/kong)'s do make develop ``` +### Testing Links With Docker + +> +``` +make check-links +``` + ## Develop Locally Without Docker ### Prerequisites - [npm](https://www.npmjs.com/) -- [Bundler](https://bundler.io/) +- [Bundler](https://bundler.io/) (< 2.0.0) - [Ruby](https://www.ruby-lang.org) (>= 2.0, < 2.3) - [Python](https://www.python.org) (>= 2.7.X, < 3) @@ -35,7 +42,7 @@ npm start ## Deploying -The repository must be manually deploy to GitHub pages: +The repository must be manually deployed to GitHub pages: > ```bash @@ -46,8 +53,8 @@ npm run deploy ## Search -We are using Algolia [docsearch](https://www.algolia.com/docsearch) for our CE -documentation search. The algolia index is maintained by Algolia through their +We are using Algolia [docsearch](https://www.algolia.com/docsearch) for our +documentation search. The algolia index for Kong is maintained by Algolia through their docsearch service. Their [scraper](https://github.com/algolia/docsearch-scraper) runs every 24 hours. The config used by the scraper is open source for docs.konghq.com and can be found [here](https://github.com/algolia/docsearch-configs/blob/master/configs/getkong.json). diff --git a/algolia/config.json b/algolia/config.json new file mode 100644 index 000000000000..fc3ae28bce78 --- /dev/null +++ b/algolia/config.json @@ -0,0 +1,41 @@ +{ + "index_name": "prod_EE", + "start_urls": [ + { + "url": "https://docs.konghq.com/enterprise/(?P.*?)/", + "variables": { + "version": { + "url": "https://docs.konghq.com/enterprise/", + "js": "var versions = $('ul[aria-labelledby=version-dropdown] a, button#version-dropdown').map(function(i, e) { return $(e).text().replace(/\\s+/g, '').replace(/Version/g, '').replace(/\\(latest\\)/g, ''); }).toArray(); return JSON.stringify(versions);" + } + } + } + ], + "sitemap_urls": [ + "https://docs.konghq.com/sitemap.xml" + ], + "stop_urls": [ + + ], + "selectors": { + "lvl0": { + "selector": ".docs-navigation > a.active", + "global": true, + "default_value": "Kong" + }, + "lvl1": ".content h1", + "lvl2": ".content h2", + "lvl3": ".content h3", + "lvl4": ".content h4", + "text": ".content p, .content li" + }, + "selectors_exclude": [ + "#next-steps", + "#next-steps ~ p" + ], + "only_content_level": true, + "conversation_id": [ + "534091583" + ], + "nb_hits": 18645 +} diff --git a/app/.jekyll-metadata b/app/.jekyll-metadata new file mode 100644 index 000000000000..831baf1b581a Binary files /dev/null and b/app/.jekyll-metadata differ diff --git a/app/0.10.x/configuration-reference.md b/app/0.10.x/configuration-reference.md new file mode 100644 index 000000000000..0d9cd75e8026 --- /dev/null +++ b/app/0.10.x/configuration-reference.md @@ -0,0 +1,3 @@ +--- +redirect_to: ../0.10.x/configuration/ +--- diff --git a/app/0.10.x/lua-reference/modules/kong.tools.responses/send.md b/app/0.10.x/lua-reference/modules/kong.tools.responses/send.md new file mode 100644 index 000000000000..97be5ba41546 --- /dev/null +++ b/app/0.10.x/lua-reference/modules/kong.tools.responses/send.md @@ -0,0 +1,3 @@ +--- +redirect_to: https://docs.konghq.com/0.10.x/lua-reference/modules/kong.tools.responses/#send +--- diff --git a/app/0.10.x/lua-reference/modules/modules/kong.tools.utils.html.md b/app/0.10.x/lua-reference/modules/modules/kong.tools.utils.html.md new file mode 100644 index 000000000000..1dcc02748d0d --- /dev/null +++ b/app/0.10.x/lua-reference/modules/modules/kong.tools.utils.html.md @@ -0,0 +1,3 @@ +--- +redirect_to: ../0.10.x/lua-reference/modules/kong.tools.utils/ +--- diff --git a/app/0.10.x/lua-reference/modules/modules/spec.helpers.html.md b/app/0.10.x/lua-reference/modules/modules/spec.helpers.html.md new file mode 100644 index 000000000000..03df5f095cbc --- /dev/null +++ b/app/0.10.x/lua-reference/modules/modules/spec.helpers.html.md @@ -0,0 +1,3 @@ +--- +redirect_to: ../0.10.x/lua-reference/modules/spec.helpers/ +--- diff --git a/app/0.11.x/configuration.md b/app/0.11.x/configuration.md index 63879e836496..6080729cb1fe 100644 --- a/app/0.11.x/configuration.md +++ b/app/0.11.x/configuration.md @@ -1,5 +1,6 @@ --- title: Configuration Reference +redirect_from: "/0.11.x/configuration-reference" --- ## Configuration loading diff --git a/app/0.11.x/lua-reference/modules/kong.tools.responses.html b/app/0.11.x/lua-reference/modules/kong.tools.responses.html index 27fbf15e7afc..c68ca7c086cd 100644 --- a/app/0.11.x/lua-reference/modules/kong.tools.responses.html +++ b/app/0.11.x/lua-reference/modules/kong.tools.responses.html @@ -3,22 +3,20 @@ layout: default --- - @@ -27,22 +25,44 @@

Public Lua API Reference