Skip to content

Commit 8d93aba

Browse files
feat: SEO and favicon (#10)
Co-authored-by: Tri Hargianto <trihargianto@gmail.com>
1 parent 0ae932a commit 8d93aba

File tree

17 files changed

+79
-19
lines changed

17 files changed

+79
-19
lines changed

src/app.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
6-
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
76

87
<script>
98
// On page load or when changing themes, best to add inline in `head` to avoid FOUC

src/lib/components/page-footer.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<a href="/" class="hover:underline">Home</a>
1313
<a href="/events" class="hover:underline">Events</a>
1414
<a href="/about" class="hover:underline">About us</a>
15-
<a href="/code-of-conduct" class="hover:underline">Code of Conduct</a>
1615
<a
1716
href="https://bit.ly/logo-jogjajs"
1817
target="_blank"

src/lib/components/seo.svelte

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<script lang="ts">
2+
import { page } from '$app/state'
3+
4+
interface Props {
5+
title: string
6+
description: string
7+
}
8+
9+
const { title, description }: Props = $props()
10+
const url = page.url.href
11+
</script>
12+
13+
<svelte:head>
14+
<title>{title}</title>
15+
<meta name="description" content={description} />
16+
<link rel="canonical" href={url} />
17+
<meta name="keywords" content="jogjajs, javascript, jogja, komunitas javascript di yogyakarta" />
18+
<meta name="robots" content="index,follow" />
19+
<meta name="googlebot" content="index,follow" />
20+
<meta name="twitter:card" content="summary_large_image" />
21+
<meta name="twitter:site" content="@jogjajs" />
22+
<meta name="twitter:title" content={title} />
23+
<meta name="twitter:description" content={description} />
24+
<meta property="og:title" content={title} />
25+
<meta property="og:url" content={url} />
26+
<meta property="og:type" content="website" />
27+
<meta property="og:description" content={description} />
28+
<meta property="og:image" content="/og.png" />
29+
<meta property="og:site_name" content="Official JogjaJS website" />
30+
31+
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
32+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
33+
<link rel="shortcut icon" href="/favicon.ico" />
34+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
35+
<meta name="apple-mobile-web-app-title" content="JogjaJS" />
36+
<link rel="manifest" href="/site.webmanifest" />
37+
</svelte:head>

src/routes/+layout.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
import PageFooter from '$lib/components/page-footer.svelte'
55
import PageHeader from '$lib/components/page-header.svelte'
6+
import Seo from '$lib/components/seo.svelte'
67
import type { Snippet } from 'svelte'
78
interface Props {
89
children?: Snippet
@@ -11,9 +12,8 @@
1112
let { children }: Props = $props()
1213
</script>
1314

14-
<svelte:head>
15-
<title>JogjaJS</title>
16-
</svelte:head>
15+
<!-- default SEO just in case there's 404 or else -->
16+
<Seo title="JogjaJS" description="JavaScript User Group based in Yogyakarta, Indonesia" />
1717

1818
<PageHeader />
1919
<main class="min-h-screen dark:bg-black dark:text-white flex flex-col pb-40">

src/routes/+page.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
import RecentEvents from '$lib/components/recent-events.svelte'
66
import square from '$lib/assets/square-organ.svg'
77
import type { LayoutData } from './$types'
8+
import Seo from '$lib/components/seo.svelte'
89
910
const { data }: { data: LayoutData } = $props()
1011
</script>
1112

13+
<Seo title="Home | JogjaJS" description="JavaScript User Group based in Yogyakarta, Indonesia" />
14+
1215
<Hero meetups={data.meetups} />
1316
<GroupPhotos />
1417
<div class="relative">

src/routes/about/+page.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33
import groupPhoto from '$lib/assets/group-2.jpg'
44
import type { LayoutData } from '../$types'
55
import ContactIcon from './contact-icon.svelte'
6+
import Seo from '$lib/components/seo.svelte'
67
78
const { data }: { data: LayoutData } = $props()
89
</script>
910

11+
<Seo
12+
title="About Us | JogjaJS"
13+
description="Discover the history and the passionate people behind JogjaJS, a thriving JavaScript community in Yogyakarta."
14+
/>
15+
1016
<Container>
1117
<section class="mb-28 px-4 md:px-8 lg:px-0">
1218
<h1

src/routes/code-of-conduct/+page.svelte

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/routes/events/+page.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
<script lang="ts">
22
import Container from '$lib/components/container.svelte'
33
import EventCard from '$lib/components/event-card.svelte'
4+
import Seo from '$lib/components/seo.svelte'
45
import type { LayoutData } from '../$types'
56
67
let { data }: { data: LayoutData } = $props()
78
</script>
89

10+
<Seo
11+
title="Events | JogjaJS"
12+
description="Find the nearest tech and JavaScript-related event in Yogyakarta"
13+
/>
14+
915
<div
1016
class="bg-linear-to-b from-red-500/20 to-red-500/30 dark:from-red-600/20 dark:to-red-600/30 w-full"
1117
>

static/apple-touch-icon.png

6.94 KB
Loading

static/banner.png

1.51 MB
Loading

0 commit comments

Comments
 (0)