Skip to content

Commit cbdc390

Browse files
committed
feat(homepage): enhance quick start with syntax highlighting and code annotations
1 parent 8a8526d commit cbdc390

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

homepage/docs/getting-started/quick-start.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
1. Create a plain old html file
44
2. Add latest PodOS script tag and stylesheet to the head
5-
3. Add a <pos-app></pos-app> to the body and use any PodOS element within it.
6-
4. Host the page on any webserver (like your Solid Pod 😉)
5+
3. Add a `<pos-app></pos-app>` to the body and use any PodOS element within it.
6+
4. Host the page on any webserver (like your [Solid](../solid/index.md) Pod 😉)
77

88
Try this 🤩:
99

10-
```html
10+
``` html linenums="1" hl_lines="5-12 15 16 17 19 22"
1111
<!DOCTYPE html>
1212
<html>
1313
<head>
@@ -19,25 +19,31 @@ Try this 🤩:
1919
<link
2020
href="https://cdn.jsdelivr.net/npm/@pod-os/elements/dist/elements/elements.css"
2121
rel="stylesheet"
22-
/>
22+
/> <!-- (1)! -->
2323
</head>
2424
<body>
25-
<pos-app> <!-- will provide a PodOS instance -->
25+
<pos-app> <!-- (2)! -->
2626
<pos-resource
27-
uri="https://solidproject.solidcommunity.net/profile/card#me"
28-
> <!-- Loads the resource and sets the context for all the child elements -->
29-
<h1> <!-- You can just combine normal HTML with PodOS elements -->
30-
<pos-label /> <!-- renders a human-readable name of the resource -->
27+
uri="https://solidproject.solidcommunity.net/profile/card#me"> <!-- (3)! -->
28+
<h1> <!-- (4)! -->
29+
<pos-label /> <!-- (5)! -->
3130
</h1>
3231
<blockquote>
33-
<pos-description /> <!-- renders a description of the resource -->
32+
<pos-description /> <!-- (6)! -->
3433
</blockquote>
3534
</pos-resource>
3635
</pos-app>
3736
</body>
3837
</html>
3938
```
4039

40+
1. PodOS can be easily included from any CDN
41+
2. `<pos-app>` will provide PodOS to child elements. All other PodOS elements must be nested inside a `<pos-app>`
42+
3. Loads the resource and sets the context for all the child elements
43+
4. You can just combine normal HTML with PodOS elements
44+
5. `<pos-label` renders a human-readable name of the resource
45+
6. `<pos-description>` renders a renders a description of the resource
46+
4147
Check out the [📖 Storybook documentation](https://pod-os.github.io/PodOS/storybook/) to learn about the available elements.
4248

4349
Also, check out the [🧑‍🏫 tutorial section](../tutorials/index.md) on practical guides.

homepage/mkdocs.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ theme:
1919
- navigation.tabs
2020
- navigation.footer
2121
- navigation.indexes
22+
- content.code.copy
23+
- content.code.select
24+
- content.code.annotate
2225
logo: assets/logo.svg
2326
custom_dir: docs/overrides
2427
palette:
@@ -48,4 +51,11 @@ markdown_extensions:
4851
- md_in_html
4952
- pymdownx.emoji:
5053
emoji_index: !!python/name:material.extensions.emoji.twemoji
51-
emoji_generator: !!python/name:material.extensions.emoji.to_svg
54+
emoji_generator: !!python/name:material.extensions.emoji.to_svg
55+
- pymdownx.highlight:
56+
anchor_linenums: true
57+
line_spans: __span
58+
pygments_lang_class: true
59+
- pymdownx.inlinehilite
60+
- pymdownx.snippets
61+
- pymdownx.superfences

0 commit comments

Comments
 (0)