Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 0b31a11

Browse files
committed
Update examples
1 parent ccc8fd9 commit 0b31a11

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
import markdown from 'aleph/plugins/markdown.ts'
1+
import markdown from '../../plugins/markdown.ts'
22
import type { Config } from 'aleph/types'
33

44
export default (): Config => ({
55
plugins: [
6-
markdown(),
6+
markdown({
7+
highlight: {
8+
provider: 'highlight.js',
9+
theme: 'github'
10+
}
11+
}),
712
]
813
})

examples/markdown-pages/pages/index.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Welcome to use Aleph.js!
33
className: markdown-page
44
style:
5-
padding: '45px 90px'
5+
padding: '45px 60px'
66
border: '1px solid #eee'
77
border-radius: '12px'
88
---
@@ -20,3 +20,17 @@ style:
2020
<span> · </span>
2121
<a href="https://github.com/alephjs/aleph.js" target="_blank">Github</a>
2222
</p>
23+
24+
```jsx
25+
import React from 'https://esm.sh/react'
26+
import Logo from '../components/logo.tsx'
27+
28+
export default function Home() {
29+
return (
30+
<div>
31+
<Logo />
32+
<h1>Hello World!</h1>
33+
</div>
34+
)
35+
}
36+
```

examples/markdown-pages/style/index.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ h1 {
2525
margin: 0;
2626
line-height: 1.5;
2727
font-size: 18px;
28-
font-weight: 400;
28+
font-weight: 500;
2929
text-align: center;
3030
color: #000;
3131
}
@@ -65,3 +65,12 @@ p a {
6565
p a:hover {
6666
color: #000;
6767
}
68+
69+
pre {
70+
margin-top: 1em;
71+
}
72+
73+
pre code[class^=language-] {
74+
display: block;
75+
padding: 0.5em;
76+
}

0 commit comments

Comments
 (0)