feat: added blank target to all external links
This commit is contained in:
7
src/routes/blogs/a.svelte
Normal file
7
src/routes/blogs/a.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<script lang="ts">
|
||||
export let href;
|
||||
|
||||
let target = href.includes('https://') || href.includes('http://') ? '_blank' : '';
|
||||
</script>
|
||||
|
||||
<a {href} {target}><slot /></a>
|
||||
Reference in New Issue
Block a user