Skip to content

Commit 2a431ea

Browse files
committed
Fix broken internal links.
1 parent 8e56ee5 commit 2a431ea

File tree

9 files changed

+50
-34
lines changed

9 files changed

+50
-34
lines changed

docs/beginning-pyscript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ the [user guide](user-guide/display.md).
332332
user interfaces from Python code - build forms, tables, and interactive
333333
components without writing HTML. You can compose complex layouts using familiar
334334
Python syntax. Explore the possibilities in the
335-
[DOM interaction guide](user-guide/dom.md#pyscriptweb).
335+
[DOM interaction guide](user-guide/dom.md).
336336

337337
**Handle any browser event**: Beyond simple clicks, you can respond to
338338
keyboard input, mouse movements, form submissions, and more. PyScript makes it

docs/example-apps/overview.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ demonstrates basic PyScript concepts: writing Python in HTML, handling
3737
user input, and manipulating the DOM. This is the first example new
3838
users encounter.
3939

40-
[Run the app](../pirate-translator) |
40+
[Run the app](./pirate-translator/index.html) |
4141
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/pirate-translator) |
4242
[Beginning PyScript](../beginning-pyscript.md)
4343

@@ -49,7 +49,7 @@ for DOM manipulation. Shows how to create, modify, and remove elements
4949
using Pythonic patterns along with element access, creating
5050
elements with Python functions, event handlers, dynamic content updates.
5151

52-
[Run the app](../task-board-web) |
52+
[Run the app](./task-board-web/index.html) |
5353
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/task-board-web) |
5454
[The DOM](../user-guide/dom.md)
5555

@@ -60,7 +60,7 @@ where `pyscript.web` isn't sufficient along with direct JavaScript object
6060
access, `ffi.create_proxy` for event handlers, working with JavaScript
6161
APIs, when to use FFI vs `pyscript.web`.
6262

63-
[Run the app](../task-board-ffi) |
63+
[Run the app](./task-board-ffi/index.html) |
6464
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/task-board-ffi) |
6565
[The DOM](../user-guide/dom.md) |
6666
[The FFI](../user-guide/ffi.md)
@@ -73,7 +73,7 @@ interactions and update the interface based on input. Specific use of
7373
event handlers via `pyscript.web`, handling multiple input types (sliders,
7474
text), real-time updates, colour manipulation.
7575

76-
[Run the app](../colour-picker) |
76+
[Run the app](./colour-picker/index.html) |
7777
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/colour-picker) |
7878
[Events](../user-guide/events.md)
7979

@@ -86,7 +86,7 @@ formatted tables, creating Matplotlib plots (single and subplots),
8686
incremental UI updates with `async`, appending vs replacing content. This
8787
is how to present data and visualisations in the browser with PyScript.
8888

89-
[Run the app](../display-demo) |
89+
[Run the app](./display-demo/index.html) |
9090
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/display-demo) |
9191
[Display](../user-guide/display.md)
9292

@@ -99,7 +99,7 @@ optional NumPy comparison. Specifically, this code shows how to use web
9999
workers for background computation, MicroPython vsPyodide performance,
100100
worker-main thread communication, and responsive UI during computation.
101101

102-
[Run the app](../prime-worker) |
102+
[Run the app](./prime-worker/index.html) |
103103
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/prime-worker) |
104104
[Workers](../user-guide/workers.md)
105105

@@ -116,7 +116,7 @@ reading and writing files, virtual filesystem concepts, mounting local
116116
filesystems, permissions and user approvals, data persistence via the local
117117
filesystem mounted to locations on the virtual filesystem.
118118

119-
[Run the app](../note-taker) |
119+
[Run the app](./note-taker/index.html) |
120120
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/note-taker) |
121121
[Filesystems](../user-guide/filesystem.md)
122122

@@ -127,7 +127,7 @@ media device access. Captures photos from the user's camera using the PyScript
127127
media API. Demonstrates camera access with `pyscript.media`, requesting user
128128
permissions, capturing still frames, canvas manipulation.
129129

130-
[Run the app](../photobooth) |
130+
[Run the app](./photobooth/index.html) |
131131
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/photobooth) |
132132
[Media](../user-guide/media.md)
133133

@@ -139,7 +139,7 @@ detection running entirely in the browser. This shows idiomatic PyGame-CE
139139
integration with PyScript, game loop with `await asyncio.sleep()`, loading
140140
assets, basic game physics.
141141

142-
[Run the app](../bouncing-ball) |
142+
[Run the app](./bouncing-ball/index.html) |
143143
[View the code on GitHub](https://github.com/pyscript/docs/tree/main/docs/example-apps/bouncing-ball) |
144144
[PyGame Support](../user-guide/pygame-ce.md)
145145

@@ -173,7 +173,7 @@ good example, consider contributing it. Good example applications:
173173
## What's next
174174

175175
After exploring these examples, consult the
176-
[PyScript user guide](../user-guide/) for comprehensive documentation on
176+
[PyScript user guide](../user-guide/index.md) for comprehensive documentation on
177177
all features. The guide provides deeper explanations of concepts
178178
demonstrated in these examples.
179179

docs/example-apps/task-board-ffi/info.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ JavaScript API calls.
2222
## Features
2323

2424
This is the exact same application as the
25-
[pyscript.web version](../task-board-web/), but implemented using
25+
[pyscript.web version](../task-board-web/index.html), but implemented using
2626
JavaScript APIs directly. Key differences:
2727

2828
## Files

docs/example-apps/task-board-web/info.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ All DOM manipulation uses `pyscript.web`'s Pythonic interface:
4040

4141
## Compare with FFI version
4242

43-
See the [FFI version](../task-board-ffi/) of this same application to
43+
See the [FFI version](../task-board-ffi/index.html) of this same application to
4444
compare the Pythonic approach with direct JavaScript API calls.

docs/faq.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ element.
7979
You've explicitly created a `PyWorker` or `MPWorker` instance somewhere
8080
in your code without providing a `service_worker` fallback.
8181

82-
The [workers guide](../user-guide/workers/) documents all these cases
82+
The [workers guide](./user-guide/workers.md) documents all these cases
8383
with code examples and solutions.
8484

8585
#### Why
@@ -105,7 +105,7 @@ responsive during heavy computation.
105105

106106
Unfortunately, we cannot patch or work around these primitives - they're
107107
defined by web standards. However, various solutions exist for working
108-
within these limitations. The [workers guide](../user-guide/workers/)
108+
within these limitations. The [workers guide](./user-guide/workers.md)
109109
explains how.
110110

111111
### Borrowed proxy
@@ -160,7 +160,7 @@ it must not be garbage collected - hence the error.
160160
Two solutions exist:
161161

162162
Manually wrap functions with
163-
[`pyscript.ffi.create_proxy`](../../api/#pyscriptfficreate_proxy):
163+
[`pyscript.ffi.create_proxy`](./api/ffi.md#pyscript.ffi.create_proxy):
164164

165165
```python
166166
from pyscript import ffi, window
@@ -173,7 +173,7 @@ window.setTimeout(
173173
```
174174

175175
Or set
176-
[`experimental_create_proxy = "auto"`](../configuration/#experimental_create_proxy)
176+
[`experimental_create_proxy = "auto"`](./user-guide/configuration.md#experimental_create_proxy)
177177
in your configuration. This intercepts Python objects passed to
178178
JavaScript callbacks and manages memory automatically via JavaScript's
179179
garbage collector.
@@ -208,7 +208,7 @@ configuration automates memory management via `FinalizationRegistry`.
208208
### Python packages
209209

210210
Sometimes Python packages specified via
211-
[`packages` configuration](../user-guide/configuration/#packages) don't
211+
[`packages` configuration](./user-guide/configuration.md#packages) don't
212212
work with PyScript's interpreters.
213213

214214
!!! failure
@@ -248,7 +248,7 @@ to overcome this limitation.
248248
In MicroPython, the package hasn't been ported to the
249249
[`micropython-lib` repository](https://github.com/micropython/micropython-lib).
250250
To use pure Python packages with MicroPython, use the
251-
[files configuration](../user-guide/configuration/#files) to manually
251+
[files configuration](./user-guide/configuration.md#files) to manually
252252
copy the package onto the filesystem, or reference it via URL.
253253

254254
The [packaging pointers](#packaging-pointers) section provides hints and
@@ -280,7 +280,7 @@ versions of `numpy` or `sqlite`).
280280

281281
### JavaScript modules
282282

283-
When [using JavaScript modules](../user-guide/dom/#working-with-javascript)
283+
When [using JavaScript modules](./user-guide/dom.md#the-ffi-javascript-interoperability)
284284
you may encounter these errors:
285285

286286
!!! failure
@@ -313,7 +313,7 @@ from pyscript.js_modules import d3
313313

314314
Alternatively, ensure referenced JavaScript code uses `export` or
315315
request an `.mjs` version. The
316-
[user guide](../user-guide/dom/#working-with-javascript) covers all
316+
[user guide](./user-guide/dom.md#the-ffi-javascript-interoperability) covers all
317317
options and technical considerations for using JavaScript modules.
318318

319319
#### Why

docs/user-guide/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ _single_ `<py-config>` or `<mpy-config>` tag in your HTML document:
7878
these tags on the page per interpreter**.
7979

8080
Additionally, `<py-config>` only works for `py`/`mpy` type scripts and is not used
81-
with [`py-game`](../pygame-ce) or [`py-editor`](../editor). For these use the config
81+
with [`py-game`](./pygame-ce.md) or [`py-editor`](./editor.md). For these use the config
8282
attribute method.
8383

8484
!!! warning
@@ -146,7 +146,7 @@ The `files` option fetches arbitrary content from URLs onto the virtual
146146
filesystem available to Python, and emulated by the browser. Just map a valid
147147
URL to a destination filesystem path on the in-browser virtual filesystem. You
148148
can find out more about the in-browser virtual filesystem in the section about
149-
[PyScript and filesystems](../filesystem/).
149+
[PyScript and filesystems](./filesystem.md).
150150

151151
The following JSON and TOML are equivalent:
152152

@@ -401,7 +401,7 @@ plugins = ["custom_plugin", "!error"]
401401
It's easy to import and use JavaScript modules in your Python code. This
402402
section of the docs examines the configuration needed to make this work. How
403403
to make use of JavaScript is dealt with
404-
[elsewhere](dom.md#working-with-javascript).
404+
[elsewhere](dom.md#working-with-javascript-libraries).
405405

406406
We need to tell PyScript about the JavaScript modules you want to
407407
use. This is the purpose of the `js_modules` related configuration fields.
@@ -501,7 +501,7 @@ without the need for the worker to interact with the main thread. You're simply
501501
awaiting the result of a method exposed from a worker.
502502

503503
This has the advantage of not requiring the use of `SharedArrayBuffer` and
504-
[associated CORS related header configuration](workers.md#http-headers).
504+
[associated CORS related header configuration](workers.md#understanding-the-problem).
505505

506506
If the `sync_main_only` flag is set, then **interactions between the main thread
507507
and workers are limited to one way calls from the main thread to methods
@@ -532,7 +532,7 @@ If `sync_main_only` is set, the following caveats apply:
532532

533533
Knowing when to use the `pyscript.ffi.create_proxy` method when using Pyodide
534534
can be confusing at the best of times and full of
535-
[technical "magic"](ffi.md#create_proxy).
535+
[technical "magic"](ffi.md#creating-function-proxies).
536536

537537
This _experimental_ flag, when set to `"auto"` will cause PyScript to try to
538538
automatically handle such situations, and should "just work".

docs/user-guide/dom.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ dom_element = element._dom_element
312312

313313
For complete API documentation of `pyscript.web`, including all
314314
available element types and methods, see the
315-
[API reference](../../api/web).
315+
[API reference](../api/web.md).
316316

317317
## Example: Task board with pyscript.web
318318

@@ -409,14 +409,14 @@ PyScript signals and honours this difference.
409409
!!! info
410410

411411
For more technical details about JavaScript class instantiation,
412-
see the [FAQ](../../faq/#javascript-classnew).
412+
see the [FAQ](../faq.md#javascript-classnew).
413413

414414
### Lower-level FFI features
415415

416416
Advanced users who need lower-level access to FFI features can use
417417
functions in the `pyscript.ffi` namespace, available in both Pyodide
418418
and MicroPython. These functions are documented in the
419-
[API reference](../../api/ffi).
419+
[API reference](../api/ffi.md).
420420

421421
For deep technical details about how the FFI works, see the
422422
[FFI technical guide](ffi.md).

docs/user-guide/what.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# What is PyScript?
22

33
[PyScript](https://pyscript.net) is an
4-
[open source](../../license/) platform for running
4+
[open source](../license.md) platform for running
55
[Python](https://python.org) in modern
66
[web browsers](https://en.wikipedia.org/wiki/Web_browser).
77

@@ -94,7 +94,7 @@ Python. The FFI makes it seamless.
9494
Put simply, PyScript helps Python and JavaScript to be friends that
9595
complement and amplify each others strengths.
9696

97-
Learn more about the FFI in the high level [DOM interaction guide](dom.md#ffi)
97+
Learn more about the FFI in the high level [DOM interaction guide](dom.md#the-ffi-javascript-interoperability)
9898
or dive deep into the [FFI's technical details](ffi.md).
9999

100100
## Key capabilities
@@ -168,9 +168,9 @@ Learn more in the [workers guide](workers.md).
168168
### Device capabilities
169169

170170
PyScript gives your Python code access to modern browser capabilities:
171-
capture photos and video with the [camera](media.md#camera), record
172-
[audio](media.md#audio), read and write [files](filesystem.md), store
173-
data [locally](storage.md), and integrate with all the other available
171+
capture photos and video with the [camera](media.md), record
172+
[media](media.md#capturing-media-streams), read and write [files](filesystem.md), store
173+
data [locally](../api/storage.md), and integrate with all the other available
174174
web APIs.
175175

176176
Build applications that feel native, with access to device hardware and

docs/user-guide/workers.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ Workers solve this problem by running Python in separate threads. The main
1919
thread handles the UI. Workers handle computation. Both run simultaneously, so
2020
your application remains responsive even during heavy processing.
2121

22+
!!! warning
23+
24+
For workers to work properly, your web server must send specific HTTP
25+
headers:
26+
27+
```
28+
Access-Control-Allow-Origin: *
29+
Cross-Origin-Opener-Policy: same-origin
30+
Cross-Origin-Embedder-Policy: require-corp
31+
Cross-Origin-Resource-Policy: cross-origin
32+
```
33+
34+
If you don't have control over your web server's headers, we recommend
35+
you make use of the [mini-coi](https://github.com/WebReflection/mini-coi)
36+
project (see their README for details).
37+
2238
## Defining workers
2339

2440
Workers are defined with `<script>` tags that have a `worker` attribute:

0 commit comments

Comments
 (0)