<commit_before># Kotlin website
[![Official project][project-badge]][project-url]

This is the source for the [http://kotlinlang.org](http://kotlinlang.org).
     
<a id="project-structure"></a>
## Project structure 

### Docs

|Source files|Location|Navigation|Variables|
|------------|--------|---------------|-----|
|Kotlin docs |[docs/topics](docs/topics)| [kr.tree](docs/kr.tree)| [v.list](docs/v.list)|
|Community | [docs/pages/community](docs/pages/community) | [_nav.yml](data/_nav.yml) | [releases.yml](data/releases.yml)|
|Education | [docs/pages/education](docs/pages/education)| [_nav.yml](data/_nav.yml)| [releases.yml](data/releases.yml)|

Note that source files for KMM docs and coroutine docs are stored in separate repositories:

* [kotlin-mobile-docs](https://github.com/JetBrains/kotlin-mobile-docs)
* [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines/docs)

### Events data

The [events.xml](data/events.xml) file stores data about community events.

### Templates

The Kotlin website uses [Jinja2](http://jinja.pocoo.org/docs/dev/) templates from the `templates` folder.
Note that all Markdown files, except for [docs](docs), are processed as Jinja templates before HTML conversion. 
This allows using all Jinja benefits for Markdown (for example, build URLs with the `url_for` function).

### Page metadata

Every page, except for [docs](docs), can have an unlimited number of metadata fields. Learn more in the [Jekyll docs](http://jekyllrb.com/docs/frontmatter/).

### Kotlin grammar reference

The Kotlin grammar reference (grammar.xml) is generated by the [Kotlin grammar generator](https://github.com/JetBrains/kotlin-grammar-generator) from the 
[Kotlin grammar definition](https://github.com/JetBrains/kotlin/tree/master/grammar).

## Guidelines and markup

Follow [these Kotlin documentation guidelines on style and formatting](https://docs.google.com/document/d/1mUuxK4xwzs3jtDGoJ5_zwYLaSEl13g_SuhODdFuh2Dc/edit?usp=sharing).

For other pages, follow the complete syntax reference at the [kramdown site](http://kramdown.gettalong.org/syntax.html).

## Configure an environment for local deployment

Configure an environment to build the Kotlin website locally. Currently, the local deployment doesn't include Kotlin documentation. It will be available soon.

1. [Install Docker on macOS](https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac) or
   [Windows](https://docs.docker.com/docker-for-windows/install/#download-docker-for-windows).
2. [Install the Yarn package manager](https://yarnpkg.com/lang/en/docs/install/).
3. Install frontend dependencies by running `yarn install`.
3. Copy a sample file `.env.sample` with application parameters, rename it to `.env`, and change variable values if necessary.

## Deploy locally

You as a content author or contributor can run `docker-compose up`. It will build the website without docs on [localhost:5000](http://localhost:5000).

You as a developer can deploy in two steps:

1. Run `docker-compose up website` to deploy only the website at [localhost:5000](http://localhost:5000).
2. Run `yarn start` to run `webpack-dev-server` on [localhost:9000](http://localhost:9000).
   Use this address for development. All pages from the origin server will be proxied.

## Report issues

If you face an issue, report it to our issue tracker, [YouTrack](http://youtrack.jetbrains.com/issues/KT).

You can provide feedback on the revamped Kotlin documentation in this [YouTrack ticket](https://youtrack.jetbrains.com/issue/KT-44338).

[project-url]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub<commit_msg>update: updated README based on the discussion with Kostya<commit_after># Kotlin website
[![Official project][project-badge]][project-url]

This is the source for the [http://kotlinlang.org](http://kotlinlang.org).
     
<a id="project-structure"></a>
## Website structure 

### Content

|Source files|Location|Navigation|
|------------|--------|---------------|
|Kotlin docs |[docs/topics](docs/topics)| [kr.tree](docs/kr.tree)| 
|Community | [docs/pages/community](docs/pages/community) | [_nav.yml](data/_nav.yml) | 
|Education | [docs/pages/education](docs/pages/education)| [_nav.yml](data/_nav.yml)| 

Note that source files for KMM docs, coroutine docs, and language specification are stored in separate repositories:

* [kotlin-mobile-docs](https://github.com/JetBrains/kotlin-mobile-docs)
* [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines/docs)
* [kotlin-spec](https://github.com/Kotlin/kotlin-spec)

The Kotlin grammar reference (grammar.xml) is generated by the [Kotlin grammar generator](https://github.com/JetBrains/kotlin-grammar-generator) from the
[Kotlin grammar definition](https://github.com/JetBrains/kotlin/tree/master/grammar).

### Configuration files

|Configuration| File|
|-----|----|
|Navigation and structure| [kr.tree](docs/kr.tree) for docs and [_nav.yml](data/_nav.yml) for other pages |
|Variables, such as release version | [v.list](docs/v.list) for docs and [releases.yml](data/releases.yml) for other pages |
|Community events on the map | [events.xml](data/events.xml) |
|Video list (outdated) | [videos.yml](data/videos.yml) |

### Templates

The Kotlin website uses [Jinja2](http://jinja.pocoo.org/docs/dev/) templates from the `templates` folder.
Note that all Markdown files, except for [docs](docs), are processed as Jinja templates before HTML conversion. 
This allows using all Jinja benefits for Markdown (for example, build URLs with the `url_for` function).


## Guidelines and markup

Follow [these Kotlin documentation guidelines on style and formatting](https://docs.google.com/document/d/1mUuxK4xwzs3jtDGoJ5_zwYLaSEl13g_SuhODdFuh2Dc/edit?usp=sharing).

For other pages, follow the complete syntax reference at the [kramdown site](http://kramdown.gettalong.org/syntax.html).
You can also include metadata fields. Learn more in the [Jekyll docs](http://jekyllrb.com/docs/frontmatter/).

## Local deployment

Currently, there is no way to deploy the Kotlin website locally. You can contribute to docs by sending us a pull request.

## Report issues

If you face an issue, report it to our issue tracker, [YouTrack](http://youtrack.jetbrains.com/issues/KT).

You can provide feedback on the revamped Kotlin documentation in this [YouTrack ticket](https://youtrack.jetbrains.com/issue/KT-44338).

[project-url]: https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub
{'fraction_non_alphanumeric': 0.1404728789986092, 'fraction_numerical': 0.008653994745788905, 'mean_word_length': 4.799283154121864, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 18, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1387921', 'n_tokens_mistral': 2135, 'n_tokens_neox': 1948, 'n_words': 573}