diff --git a/src/lib/components/index_profile.svelte b/src/lib/components/index_profile.svelte index 03b2b435..7aff0fc5 100644 --- a/src/lib/components/index_profile.svelte +++ b/src/lib/components/index_profile.svelte @@ -28,9 +28,18 @@ rel="noopener noreferrer" data-tip="RSS" aria-label="RSS" - href="https://seviche.cc/atom.xml"> + href="/atom.xml"> + + + {#if site.author.email} {/if} {#if post.image && preview} -
+
{ + copyCode() + }) diff --git a/src/lib/config/site.ts b/src/lib/config/site.ts index 9c36dbb3..eb9fbc8f 100644 --- a/src/lib/config/site.ts +++ b/src/lib/config/site.ts @@ -13,5 +13,6 @@ export const site: SiteConfig = { status: '🖤', bio: ' Code / Tech
Living a Random Life ' }, + keywords: ['Tech', 'Code', 'Frontend Developer'], themeColor: '#3D4451' } diff --git a/src/lib/utils/copyCode.ts b/src/lib/utils/copyCode.ts index dbc6354e..c96509e9 100644 --- a/src/lib/utils/copyCode.ts +++ b/src/lib/utils/copyCode.ts @@ -16,11 +16,12 @@ export const copyCode = () => { range.setStart(el, 2) range.setEnd(el, end) const selection = window.getSelection() + if (!selection) return selection.removeAllRanges() selection.addRange(range) // copy to clipboard - document.execCommand('copy', false, null) + document.execCommand('copy', false) const clip = async () => navigator.clipboard.writeText(selection.toString()) if (!clip) return