Skip to content

Commit 0bd9bb3

Browse files
committed
Improve README
1 parent 51f97a3 commit 0bd9bb3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
_kotlin-html_ is an experimental library to generate HTML in Kotlin.
88

9-
This library is heavily inspired by [kotlinx.html](https://github.com/Kotlin/kotlinx.html), but with a strong emphasis on composability.
9+
This library is heavily inspired by [kotlinx.html](https://github.com/Kotlin/kotlinx.html), but with a strong emphasis on context-independent composability.
1010

1111
## Getting started
1212

@@ -21,6 +21,7 @@ will render the following HTML when `.render()` is called:
2121
```html
2222
<p>A paragraph</p>
2323
```
24+
_Note: all HTML examples in this README are generated after calling `.render()` on the expression presented in Kotlin. It's encouraged that you keep the number `.render()` calls to the minimum and instead combine elements to increase your code's expressiveness._
2425

2526
### Composability
2627

@@ -163,7 +164,8 @@ fun main(args : Array<String>) {
163164
head {
164165
title("Document title") +
165166
meta(charset = "utf-8") +
166-
link(href = "css/style.css", rel = "stylesheet")
167+
link(href = "css/style.css", rel = "stylesheet") +
168+
script(type = "text/javascript", src = "js/script.js")
167169
} +
168170
body {
169171
div(classes = "container") {
@@ -192,6 +194,7 @@ HTML:
192194
<title>Document title</title>
193195
<meta charset="utf-8">
194196
<link href="css/style.css" rel="stylesheet">
197+
<script type="text/javascript" src="js/script.js"></script>
195198
</head>
196199
<body>
197200
<div class="container">

0 commit comments

Comments
 (0)