The Kotlin programming language website
1,623
stars
9,788
commits
TypeScript
primary language
Sep 10, 2026
updated
This repository is the source for https://kotlinlang.org.
Source files for the language specification and the docs for Kotlin Multiplatform, coroutines, serialization, lincheck, Dokka, and Library creators' guidelines are stored in separate repositories
API reference documentation is generated based on comments in the Kotlin code. Learn more about documenting the Kotlin code.
The Kotlin grammar reference is generated by the Kotlin grammar generator from the Kotlin grammar definition.
| Configuration | File |
|---|---|
| Navigation and structure | kr.tree for docs |
| Variables, such as release version | v.list for docs and releases.yml for other pages |
| Community events on the map | events.xml |
You can contribute to the Kotlin website by sending us a pull request. You can also create a YouTrack issue to discuss your suggestion with the Kotlin team.
For the Kotlin documentation, follow these guidelines on style and formatting.
For other pages, follow the complete syntax reference at the kramdown site. You can also include metadata fields. Learn more about it in the Jekyll docs.
To add a Kotlin User Group (KUG), proceed the following way:
Open the configuration file user-groups.yml.
Find a suitable section among existing ones.
Add into the selected section a new group with the following keys:
name, the name of the group.country, the name of the country where the group is located. In the case of a virtual group, please use "International" for that.url, the link to the group's web page.isVirtual, set this key with true value if the group is online only.position, the geo-position of the group, defined by pair of keys: lat and lng. It better to run scripts/user_group.If the group is not virtual, you also need to specify a group's position.
Add manually position key with the lat and lng values, as next:
position:
lat: 1.1111111
lng: 1.1111111
You can see the structure and types of the expected configuration in the JSON schema. Once you publish a pull request, the changes will be validated by GitHub Actions Workflow to prevent misconfiguration.
To add a case study, do the following:
Fill the case study info in the case-studies.yml with the next:
id, a unique identifier for the case study.type, the case study category: either multiplatform or backend.description, a markdown-enabled text description of the case study (supports # header bold and links, paragraphs are made with two new lines).logo (optional), an array of 0-2 image paths relative to the /public/ directory.signature (optional), an object with name and position fields for the quote author.isExternal (optional), a boolean indicating if the case story is from an external source (default: false).link (optional), a URL to the full case story.linkText (optional), custom text for the link (default: "Read the full story").linkStyle (optional), either button or text for the link style.platforms (optional), an array of platform tags such as android, ios, desktop, frontend, backend, or compose-multiplatform.media (optional), a media object with type set to either youtube (with videoId) or image (with path relative to /public/).featuredOnMainPage (optional), a boolean to mark the case as featured on the main page.You can see the structure and types of the expected configuration in the JSON schema and in the example file.
The order of case studies in the file defines the order of their appearance on the website. Place new case studies accordingly.
Publish the changes by creating a pull request. The changes will be validated by GitHub Actions Workflow to prevent misconfiguration.
Currently, there is no way to deploy the full Kotlin website locally. This ticket tracks the effort of adding support for local testing: KT-47049. See Local development below for running the website locally.
You can contribute to the Kotlin website by sending us a pull request.
Before you begin, make sure your local environment is connected to the WebTeam registry. Learn more about it in the section below.
To generate a PDF version of the Kotlin documentation:
pages.zip artifacts from the Build site pages CI build into the project root. This will provide the dist/docs directory.yarn install
cd scripts/dist && yarn install && cd ../../
yarn generate-pdf
The PDF will be created at assets/kotlin-reference.pdf. Generation may take several minutes.
For more details, see scripts/pdf/README.md.
You can:
For the frontend development, you need to connect to the WebTeam registry. Visit the registry page in Space:
Add your token to the ~/.zshenv file:
nano ~/.zshenv;export WEBTEAM_UI_NPM_TOKEN=yourtoken.
Then install frontend dependencies npm install.# install frontend dependencies
yarn install
# at first start you need to build the static
yarn run next-build-static
# run development server
yarn start
Now you can open the website at http://localhost:3000.
You can find all pages in the pages directory.
Use next/image for raster images (PNG, JPG, WebP). Static imports provide automatic width/height:
import Image from 'next/image';
import myImage from './my-image.png';
<Image src={myImage} alt="..." />
For SVGs displayed as images, use a plain <img> tag with the public path:
<img src="/images/path/to/icon.svg" alt="" />
We use Playwright for writing e2e and Screenshot tests. See https://playwright.dev/ for more details.
To run tests locally:
Install supported browsers:
npx playwright install
Start Dev Server.
yarn test to run all tests in headless mode locally.yarn test:e2e to run e2e tests locally, visual tests are also included.yarn test:e2e:skip-visual to run e2e tests without visual tests locally.yarn test:production to run the subset of e2e tests that are meant to check the production locally.There are also additional options to run tests:
yarn run test:e2e:ci or yarn test:production:ci to run tests in CI environments.yarn test:e2e:headed or yarn test:production:headed to run tests in headed mode locally.yarn test:e2e:debug or yarn test:production:debug to run e2e tests in headed mode with debug locally.To ease the process of adding and maintaining e2e tests:
yarn test:e2e:new to generate the test for the user interactions.yarn test:e2e:update to update screenshots when something on page has changed intentionally.yarn test:e2e:screenshots to run e2e tests with screenshots across different breakpoints (breakpoints-v2).To write e2e test, create spec file /test/e2e/*your-page*.spec.js.
Some e2e tests focus on preventing regressions in the WebHelp components used to build documentation in the /docs section of kotlinlang.org. To run these tests locally, follow the next steps:
dist folder in the project.dist folder.yarn run test:e2edocker compose -f docker-compose-e2e.yml up --build --exit-code-from playwrightSome tests focus on protecting the HTML markup of API references from being corrupted by the KTL components in the Dokka template's extension. To run these tests locally, follow the next steps:
libs folder in the project.libs folder by their name, for example, kotlinx.coroutines../scripts/dokka/up.sh../scripts/dokka/run.sh or on the host with one of the scripts below.(top 30 of 397)
TypeScript
70.7%
CSS
15.1%
JavaScript
7.0%
SCSS
5.3%
FreeMarker
1.7%
The Kotlin programming language website
1,623
stars
9,788
commits
TypeScript
primary language
Sep 10, 2026
updated
This repository is the source for https://kotlinlang.org.
Source files for the language specification and the docs for Kotlin Multiplatform, coroutines, serialization, lincheck, Dokka, and Library creators' guidelines are stored in separate repositories
API reference documentation is generated based on comments in the Kotlin code. Learn more about documenting the Kotlin code.
The Kotlin grammar reference is generated by the Kotlin grammar generator from the Kotlin grammar definition.
| Configuration | File |
|---|---|
| Navigation and structure | kr.tree for docs |
| Variables, such as release version | v.list for docs and releases.yml for other pages |
| Community events on the map | events.xml |
You can contribute to the Kotlin website by sending us a pull request. You can also create a YouTrack issue to discuss your suggestion with the Kotlin team.
For the Kotlin documentation, follow these guidelines on style and formatting.
For other pages, follow the complete syntax reference at the kramdown site. You can also include metadata fields. Learn more about it in the Jekyll docs.
To add a Kotlin User Group (KUG), proceed the following way:
Open the configuration file user-groups.yml.
Find a suitable section among existing ones.
Add into the selected section a new group with the following keys:
name, the name of the group.country, the name of the country where the group is located. In the case of a virtual group, please use "International" for that.url, the link to the group's web page.isVirtual, set this key with true value if the group is online only.position, the geo-position of the group, defined by pair of keys: lat and lng. It better to run scripts/user_group.If the group is not virtual, you also need to specify a group's position.
Add manually position key with the lat and lng values, as next:
position:
lat: 1.1111111
lng: 1.1111111
You can see the structure and types of the expected configuration in the JSON schema. Once you publish a pull request, the changes will be validated by GitHub Actions Workflow to prevent misconfiguration.
To add a case study, do the following:
Fill the case study info in the case-studies.yml with the next:
id, a unique identifier for the case study.type, the case study category: either multiplatform or backend.description, a markdown-enabled text description of the case study (supports # header bold and links, paragraphs are made with two new lines).logo (optional), an array of 0-2 image paths relative to the /public/ directory.signature (optional), an object with name and position fields for the quote author.isExternal (optional), a boolean indicating if the case story is from an external source (default: false).link (optional), a URL to the full case story.linkText (optional), custom text for the link (default: "Read the full story").linkStyle (optional), either button or text for the link style.platforms (optional), an array of platform tags such as android, ios, desktop, frontend, backend, or compose-multiplatform.media (optional), a media object with type set to either youtube (with videoId) or image (with path relative to /public/).featuredOnMainPage (optional), a boolean to mark the case as featured on the main page.You can see the structure and types of the expected configuration in the JSON schema and in the example file.
The order of case studies in the file defines the order of their appearance on the website. Place new case studies accordingly.
Publish the changes by creating a pull request. The changes will be validated by GitHub Actions Workflow to prevent misconfiguration.
Currently, there is no way to deploy the full Kotlin website locally. This ticket tracks the effort of adding support for local testing: KT-47049. See Local development below for running the website locally.
You can contribute to the Kotlin website by sending us a pull request.
Before you begin, make sure your local environment is connected to the WebTeam registry. Learn more about it in the section below.
To generate a PDF version of the Kotlin documentation:
pages.zip artifacts from the Build site pages CI build into the project root. This will provide the dist/docs directory.yarn install
cd scripts/dist && yarn install && cd ../../
yarn generate-pdf
The PDF will be created at assets/kotlin-reference.pdf. Generation may take several minutes.
For more details, see scripts/pdf/README.md.
You can:
For the frontend development, you need to connect to the WebTeam registry. Visit the registry page in Space:
Add your token to the ~/.zshenv file:
nano ~/.zshenv;export WEBTEAM_UI_NPM_TOKEN=yourtoken.
Then install frontend dependencies npm install.# install frontend dependencies
yarn install
# at first start you need to build the static
yarn run next-build-static
# run development server
yarn start
Now you can open the website at http://localhost:3000.
You can find all pages in the pages directory.
Use next/image for raster images (PNG, JPG, WebP). Static imports provide automatic width/height:
import Image from 'next/image';
import myImage from './my-image.png';
<Image src={myImage} alt="..." />
For SVGs displayed as images, use a plain <img> tag with the public path:
<img src="/images/path/to/icon.svg" alt="" />
We use Playwright for writing e2e and Screenshot tests. See https://playwright.dev/ for more details.
To run tests locally:
Install supported browsers:
npx playwright install
Start Dev Server.
yarn test to run all tests in headless mode locally.yarn test:e2e to run e2e tests locally, visual tests are also included.yarn test:e2e:skip-visual to run e2e tests without visual tests locally.yarn test:production to run the subset of e2e tests that are meant to check the production locally.There are also additional options to run tests:
yarn run test:e2e:ci or yarn test:production:ci to run tests in CI environments.yarn test:e2e:headed or yarn test:production:headed to run tests in headed mode locally.yarn test:e2e:debug or yarn test:production:debug to run e2e tests in headed mode with debug locally.To ease the process of adding and maintaining e2e tests:
yarn test:e2e:new to generate the test for the user interactions.yarn test:e2e:update to update screenshots when something on page has changed intentionally.yarn test:e2e:screenshots to run e2e tests with screenshots across different breakpoints (breakpoints-v2).To write e2e test, create spec file /test/e2e/*your-page*.spec.js.
Some e2e tests focus on preventing regressions in the WebHelp components used to build documentation in the /docs section of kotlinlang.org. To run these tests locally, follow the next steps:
dist folder in the project.dist folder.yarn run test:e2edocker compose -f docker-compose-e2e.yml up --build --exit-code-from playwrightSome tests focus on protecting the HTML markup of API references from being corrupted by the KTL components in the Dokka template's extension. To run these tests locally, follow the next steps:
libs folder in the project.libs folder by their name, for example, kotlinx.coroutines../scripts/dokka/up.sh../scripts/dokka/run.sh or on the host with one of the scripts below.(top 30 of 397)
TypeScript
70.7%
CSS
15.1%
JavaScript
7.0%
SCSS
5.3%
FreeMarker
1.7%