Skip to content

Commit 8e56ee5

Browse files
committed
Revise front page with a TL:DR.
1 parent 53f4587 commit 8e56ee5

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

docs/index.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,38 @@
33

44
<h1 style="text-align: center; font-weight: bold;">PyScript is an <u>open source</u> platform for Python in the browser.</h1>
55

6+
**Step 1:** Add these two lines to the `<head>` of your HTML document:
7+
8+
```html
9+
<link rel="stylesheet" href="https://pyscript.net/releases/2025.11.2/core.css" />
10+
<script type="module" src="https://pyscript.net/releases/2025.11.2/core.js"></script>
11+
```
12+
13+
**Step 2:** Start PyScript with a `<script>` tag:
14+
15+
```html
16+
<script type="py" config="./conf.json" src="./main.py"></script>
17+
```
18+
19+
**Step 3:** Write Python (use the `pyscript` namespace):
20+
21+
```python
22+
from pyscript import when, display
23+
24+
25+
@when("click", "#my-button")
26+
def handler():
27+
display("Button clicked!")
28+
```
29+
30+
That's just the start of it!
31+
32+
What's next?
33+
634
<dl>
735
<dt><strong>I'm a beginner...</strong></dt>
836
<dd>Welcome! PyScript is designed to be friendly for beginner coders. Start
937
with our <a href="./beginning-pyscript">beginning PyScript guide</a>
10-
and use
11-
<a href="https://pyscript.com/" target="_blank">pyscript.com</a>
1238
to create your first apps. Graduate to the
1339
<a href="./user-guide">user guide</a> to grow your understanding.</dd>
1440
<dt><strong>I'm already technical...</strong></dt>

0 commit comments

Comments
 (0)