Skip to content

Commit 4c13198

Browse files
committed
generate dynamic links
1 parent bac8819 commit 4c13198

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ <h1>StackBlitz Zip API</h1>
1212
<ul>
1313
<script server>
1414
const links = [
15-
'https://stackblitz.zip/edit/nuxt-starter-k7spa3r4',
16-
'https://stackblitz.zip/edit/vitejs-vite-starter',
17-
]
15+
'/edit/nuxt-starter-k7spa3r4',
16+
'/edit/vitejs-vite-starter',
17+
].map(path => new URL(path, $REQUEST.url).href)
1818
</script>
1919
<? for (const link of links) { ?>
2020
<li><a href="<?= link ?>" target="_blank" rel="noopener noreferrer"><?= link ?></a></li>

0 commit comments

Comments
 (0)