Skip to content

Commit 01821cf

Browse files
p7novhltjzoobestikchrisparton1991Dmitry Konchalenkov
authored
feat: great JS docs update for 1.3.70 (JetBrains#1605)
* use md5 digest instead of timestamp as asset version * chore: remove package name from sample * Add ID to "Why Kotlin?" section This allows people to link to https://kotlinlang.org#why-kotlin * Fixup heading copy via #kotlin-web-site https://jetbrains.slack.com/archives/CCQSCT8F6/p1580756473020100 * chore: Native tutorials cleanup (JetBrains#1560) * Changed title for Hands-On * Converted basic example to How-To and cleaned up contents. * Split tutorials into separate HowTos * Renamed to be in sync with other HowTos * Added file for redirect. * Update to navigation * Minor correction of description * Added How To on Using Gradle. * Mentioned how to open project in IDE * Added sample for Using IntelliJ IDEA * Fixed broken links to kotlin native basic tutorial * fix: broken links * fix: broken links * Worked in suggestions from PR. * Moved Intro sample lower down in menu and renamed to proper title. * chore: minor fixes and additions * fix: broken links Co-authored-by: Pavel Semyonov <[email protected]> * chore(index): words with capital char earlier * chore(index): add anchor icon for `why kotlin` * chore (talks): February-April * fix: typo in collection write operations (JetBrains#1579) * chore(index): new kotlinconf 2020 banner * Revert "chore(index): new kotlinconf 2020 banner" This reverts commit cd1492a. * chore: clarify sentence in properties.md (JetBrains#1581) * Update properties.md Grammatical correction of the 1st sentence of "Compile-Time Constants". Proposition - "Properties the value of which is known at compile time ... " -> "Property values which are known at compile time .... " * Update pages/docs/reference/properties.md Co-Authored-By: Pavel Semyonov <[email protected]> Co-authored-by: Pavel Semyonov <[email protected]> * last news: Ktor 1.3 * feat(index): add logos for highlights * chore: NPM deps in top-level dependencies block * chore(index): remove old landing * feat(index): add techs links * JS-11959 Update kotlinlang.org home page * chore(index): replace data-science icon * chore(index): replace server-side icon * fix: Inter font loading fix * chore(index): normalize why section * fix: broken redirect from old K/N tutorial * fix: 404 on old K/N tutorials (JetBrains#1590) * fix: broken redirect from old K/N tutorial * fix: broken redirect from old K/N tutorials * fix * fix: tutorial link in native-overview.md (JetBrains#1586) * Update native-overview.md Link [A basic Kotlin/Native application](https://kotlinlang.org/docs/tutorials/native/basic-kotlin-native-app.html) is broken (404) * refactor: comments resolve * chore: update server-overview.md with Micronaut (JetBrains#1490) Micronaut is a young prospect in the league of server-side frameworks, offering modern features and outstanding performance out of the box. I think the documentation should mention it, that's why I made this PR. * last news: Ktor 1.3 replaces coroutines * feat: add kotlin heroes link * chore: K/JS custom distribution path * chore: better formatting in examples * Update links for Sydney Kotlin UG * fix: Hyderabad KUG info update * fix: typo in building-mpp-with-gradle.md (JetBrains#1593) * feat: new DCE configuration * chore: remove experimentality warning from DCE * feat: add new Kotlin/JS how-tos (JetBrains#1602) * feat: JS docs cleanup: hide outdated parts, arrange remaining * fix: outdated tutorial warnings * fix: JS docs bugfix + some extenstion * fix: broken link * fix: remove outdated instruction Co-authored-by: hltj <[email protected]> Co-authored-by: kb.chernenko <[email protected]> Co-authored-by: Chris Parton <[email protected]> Co-authored-by: Dmitry Konchalenkov <[email protected]> Co-authored-by: Hadi Hariri <[email protected]> Co-authored-by: Subhojit Som <[email protected]> Co-authored-by: Roman Korostenskyi <[email protected]> Co-authored-by: adamkobor <[email protected]> Co-authored-by: Mike <[email protected]> Co-authored-by: Joe Goodall <[email protected]> Co-authored-by: Sebastian Aigner <[email protected]>
1 parent 64323cb commit 01821cf

File tree

148 files changed

+2595
-2150
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+2595
-2150
lines changed

assets/fonts/Inter/Inter-Black.woff

167 KB
Binary file not shown.

assets/fonts/Inter/Inter-Black.woff2

126 KB
Binary file not shown.
174 KB
Binary file not shown.
132 KB
Binary file not shown.

assets/fonts/Inter/Inter-Bold.woff

170 KB
Binary file not shown.

assets/fonts/Inter/Inter-Bold.woff2

129 KB
Binary file not shown.
177 KB
Binary file not shown.
134 KB
Binary file not shown.
171 KB
Binary file not shown.
130 KB
Binary file not shown.
178 KB
Binary file not shown.
135 KB
Binary file not shown.
171 KB
Binary file not shown.
130 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

assets/fonts/Inter/Inter-Italic.woff

168 KB
Binary file not shown.

assets/fonts/Inter/Inter-Italic.woff2

127 KB
Binary file not shown.
169 KB
Binary file not shown.
128 KB
Binary file not shown.
176 KB
Binary file not shown.
Binary file not shown.

assets/fonts/Inter/Inter-Medium.woff

168 KB
Binary file not shown.

assets/fonts/Inter/Inter-Medium.woff2

127 KB
Binary file not shown.
176 KB
Binary file not shown.
133 KB
Binary file not shown.

assets/fonts/Inter/Inter-Regular.woff

159 KB
Binary file not shown.
119 KB
Binary file not shown.
169 KB
Binary file not shown.
128 KB
Binary file not shown.
177 KB
Binary file not shown.
134 KB
Binary file not shown.
169 KB
Binary file not shown.
130 KB
Binary file not shown.
177 KB
Binary file not shown.
135 KB
Binary file not shown.
Binary file not shown.

data/_nav.yml

+24-14
Original file line numberDiff line numberDiff line change
@@ -358,20 +358,26 @@ tutorials:
358358
content:
359359
- url: /docs/tutorials/javascript/kotlin-to-javascript/kotlin-to-javascript.html
360360
title: Kotlin to JavaScript
361-
- url: /docs/tutorials/javascript/getting-started-gradle/getting-started-with-gradle.html
362-
title: Getting Started with Gradle
363-
- url: /docs/tutorials/javascript/getting-started-idea/getting-started-with-intellij-idea.html
364-
title: Getting Started with IntelliJ IDEA
365-
- url: /docs/tutorials/javascript/getting-started-maven/getting-started-with-maven.html
366-
title: Getting Started with Maven
367-
- url: /docs/tutorials/javascript/getting-started-command-line/command-line-library-js.html
368-
title: Creating a Kotlin JavaScript library with the Command Line Compiler
361+
- url: /docs/tutorials/javascript/setting-up.html
362+
title: Setting up a project
363+
- url: /docs/tutorials/javascript/running-kotlin-js.html
364+
title: Running Kotlin/JS
365+
- url: /docs/tutorials/javascript/dev-server-continuous-compilation.html
366+
title: Development Server and Continuous Compilation
367+
- url: /docs/tutorials/javascript/using-packages-from-npm.html
368+
title: Using packages from npm
369+
- url: /docs/tutorials/javascript/debugging-kotlin-in-browser.html
370+
title: Debugging Kotlin in the browser
371+
- url: /docs/tutorials/javascript/running-tests.html
372+
title: Running tests
373+
- url: /docs/tutorials/javascript/browser-api-dom.html
374+
title: Browser API and the DOM
375+
- url: /docs/tutorials/javascript/typesafe-html-dsl.html
376+
title: Typesafe HTML DSL
369377
- url: /docs/tutorials/javascript/working-with-modules/working-with-modules.html
370378
title: Working with Kotlin and JavaScript Modules
371379
- url: /docs/tutorials/javascript/working-with-javascript.html
372-
title: Working with JavaScript
373-
- url: /docs/tutorials/javascript/debugging-javascript/debugging-javascript.html
374-
title: Debugging Kotlin in browser
380+
title: Working with JavaScript libraries
375381
- url: /docs/tutorials/javascript/react-and-kotlin-js.html
376382
title: Building Web Applications with React and Kotlin/JS
377383

@@ -386,10 +392,14 @@ tutorials:
386392

387393
- title: Native
388394
content:
395+
- url: /docs/tutorials/native/using-command-line-compiler.html
396+
title: Hello Kotlin/Native using Command Line Compiler
397+
- url: /docs/tutorials/native/using-gradle.html
398+
title: Hello Kotlin/Native using Gradle
399+
- url: /docs/tutorials/native/using-intellij-idea.html
400+
title: Hello Kotlin/Native using IntelliJ IDEA
389401
- url: /docs/tutorials/native/intro-to-kotlin-native.html
390-
title: Introduction to Kotlin/Native
391-
- url: /docs/tutorials/native/basic-kotlin-native-app.html
392-
title: Basic Kotlin/Native Application
402+
title: Creating an HTTP Client in Kotlin/Native
393403
- url: /docs/tutorials/native/mapping-primitive-data-types-from-c.html
394404
title: Mapping Primitive Data Types from C
395405
- url: /docs/tutorials/native/mapping-struct-union-types-from-c.html

data/events.xml

+1,048-5
Large diffs are not rendered by default.

data/last-news.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
- title: Making Kotlin Ready for Data Science
1+
- title: "Making Kotlin Ready for\xA0Data Science"
22
link: https://blog.jetbrains.com/kotlin/2019/12/making-kotlin-ready-for-data-science/
33

4-
- title: Coroutines are now stable
5-
link: /docs/reference/coroutines-overview.html
6-
tag: What’s new
4+
- title: Ktor 1.3 Release
5+
link: https://blog.jetbrains.com/kotlin/2020/01/ktor-1-3-release/
76

8-
- title: What to expect in Kotlin 1.4
7+
- title: "What to expect in Kotlin\xA01.4"
98
link: https://blog.jetbrains.com/kotlin/2019/12/what-to-expect-in-kotlin-1-4-and-beyond/
109

1110
- title: KotlinConf 2019 Talks

data/testimonials.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
- company: Pinterest
2-
text: Pinterest has successfully <a target="_blank" href="https://www.youtube.com/watch?v=mDpnc45WwlI">introduced Kotlin</a> into their application, used by 150M people every month
31
- company: Gradle
42
text: Gradle is <a target="_blank" href="https://blog.gradle.org/kotlin-meets-gradle">introducing Kotlin</a> as a language for writing build scripts
5-
- company: Evernote
6-
text: Evernote recently <a target="_blank" href="https://blog.evernote.com/tech/2017/01/26/android-state-library/">integrated Kotlin</a> into their Android client
7-
- company: Uber
8-
text: Uber team <a target="_blank" href="https://www.reddit.com/r/androiddev/comments/5sihp0/2017_whos_using_kotlin/ddfmkf7/">uses Kotlin</a> for building internal tools
93
- company: Corda
104
text: Corda is an open-source distributed ledger platform, supported by major banks, and <a target="_blank" href="https://www.corda.net/2017/01/10/kotlin/">built entirely in Kotlin</a>
5+
- company: Evernote
6+
text: Evernote recently <a target="_blank" href="https://blog.evernote.com/tech/2017/01/26/android-state-library/">integrated Kotlin</a> into their Android client
117
- company: Coursera
128
text: Coursera Android app is <a target="_blank" href="https://building.coursera.org/blog/2016/03/16/becoming-bilingual-coursera/">partially written</a> in Kotlin
139
- company: Pivotal

kotlin-features/kotlin-features.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
- title: Concise
2-
description: Drastically reduce the amount of boilerplate code.
2+
description: Drastically reduce the amount of boilerplate code
33
content_file: concise.md
44

55
- title: Safe
6-
description: Avoid entire classes of errors such as null pointer exceptions.
6+
description: Avoid entire classes of errors such as null pointer exceptions
77
content_file: safe.md
88

99
- title: Interoperable
10-
description: Leverage existing libraries for the JVM, Android, and the browser.
10+
description: Leverage existing libraries for the JVM, Android, and the browser
1111
content_file: interoperable.md
1212

1313
- title: Tool-friendly
14-
description: Choose any Java IDE or build from the command line.
14+
description: Choose any Java IDE or build from the command line
1515
content_file: tooling.md

kotlin-website.py

+10-11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from flask import Flask, render_template, Response, send_from_directory, request
1515
from flask.helpers import url_for, send_file, make_response
1616
from flask_frozen import Freezer, walk_directory
17+
from hashlib import md5
1718

1819
from src.Feature import Feature
1920
from src.github import assert_valid_git_hub_url
@@ -49,11 +50,18 @@
4950
_nav_cache = None
5051
_nav_lock = threading.RLock()
5152

53+
_cached_asset_version = {}
54+
5255
def get_asset_version(filename):
56+
if filename in _cached_asset_version:
57+
return _cached_asset_version[filename]
58+
5359
filepath = (root_folder if root_folder else ".") + filename
5460
if filename and path.exists(filepath):
55-
file_stat = os.stat(filepath)
56-
return str(file_stat.st_mtime)
61+
with open(filepath, 'rb') as file:
62+
digest = md5(file.read()).hexdigest()
63+
_cached_asset_version[filename] = digest
64+
return digest
5765
return None
5866

5967
def get_site_data():
@@ -241,15 +249,6 @@ def index_page():
241249
features=features
242250
)
243251

244-
@app.route('/index_old.html')
245-
def index_page_old():
246-
features = get_kotlin_features()
247-
return render_template('pages/index_old.html',
248-
is_index_page=True,
249-
features=features
250-
)
251-
252-
253252
def process_page(page_path):
254253
# get_nav() has side effect to copy and patch files from the `external` folder
255254
# under site folder. We need it for dev mode to make sure file is up-to-date

pages-includes/docs/tutorials/native/lets-create-gradle-build.md

+1-1

pages/docs/reference/building-mpp-with-gradle.md

+1-1

pages/docs/reference/collection-write.md

+1-1

pages/docs/reference/javascript-dce.md

+63-64

0 commit comments

Comments
 (0)