Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
feat(web): tweaks for SEO (#1311)
Elijah Potterfc113ff003f2
diff --git a/packages/web/package.json b/packages/web/package.jsonindex 86838c4b5..10cccea5c 100644--- a/packages/web/package.json+++ b/packages/web/package.json@@ -36,6 +36,7 @@"chart.js": "^4.4.8","harper.js": "workspace:*","lodash-es": "^4.17.21",+ "posthog-js": "^1.245.1","reveal.js": "^5.1.0","svelte-intersection-observer": "^1.0.0","typed.js": "^2.1.0"diff --git a/packages/web/src/app.html b/packages/web/src/app.htmlindex 5e40122ca..ff5cd08d2 100644--- a/packages/web/src/app.html+++ b/packages/web/src/app.html@@ -10,12 +10,15 @@<meta name="msapplication-TileColor" content="#da532c" /><meta name="theme-color" content="#ffffff" /><meta name="viewport" content="width=device-width, initial-scale=1" />++ <title>Harper: Free, Open Source Grammar Checker</title>+ <meta name="description" content="Harper checks your writing fast, without compromising your privacy."/>+ <link rel="canonical" href="https://writewithharper.com"/>+ <meta property="og:title" content="Harper: Free, Open Source Grammar Checker"/>+ <meta property="og:description" content="Harper checks your writing fast, without compromising your privacy."/>+ <meta property="og:url" content="https://writewithharper.com"/>+%sveltekit.head%- <script- data-goatcounter="https://harper.goatcounter.com/count"- async- src="//gc.zgo.at/count.js"- ></script></head><body data-sveltekit-preload-data="false" class="m-0 p-0 w-full h-full dark:bg-gray-800">diff --git a/packages/web/src/routes/+layout.svelte b/packages/web/src/routes/+layout.svelteindex 2c1379ca2..ebc11b6a8 100644--- a/packages/web/src/routes/+layout.svelte+++ b/packages/web/src/routes/+layout.svelte@@ -3,6 +3,20 @@ import '../app.css';import AutomatticLogo from '$lib/AutomatticLogo.svelte';import GutterCenter from '$lib/GutterCenter.svelte';+import { browser } from '$app/environment';+import posthog from 'posthog-js';+import { onMount } from 'svelte';++onMount(() => {+ if (browser) {+ posthog.init('phc_ghFPi5nkwgxTGU9VEHflX8QCXlfrdxFD4skfb6lpH4y', {+ api_host: 'https://us.i.posthog.com',+ persistence: 'sessionStorage',+ person_profiles: 'always',+ });+ }+});+let names = ['Grammar Guru', 'Grammar Checker', 'Grammar Savior'];let displayName = names[Math.floor(Math.random() * names.length)];</script>diff --git a/packages/web/src/routes/+page.svelte b/packages/web/src/routes/+page.svelteindex 5f3bdffc2..60bcfa41b 100644--- a/packages/web/src/routes/+page.svelte+++ b/packages/web/src/routes/+page.svelte@@ -70,7 +70,7 @@ const headings = [<Section noChild><span slot="title"> What is it? </span><span slot="subtitle">- Harper is an English grammar checker designed to be <em>just right</em>. You can think of it as+ Harper is a free English grammar checker designed to be <em>just right</em>. You can think of it asan open-source alternative to Grammarly. I created it after years of dealing with theshortcomings of the competition.</span>diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 8d31606b6..eda8327ec 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -301,6 +301,9 @@ importers:lodash-es:specifier: ^4.17.21version: 4.17.21+ posthog-js:+ specifier: ^1.245.1+ version: 1.245.1reveal.js:specifier: ^5.1.0version: 5.1.0@@ -6063,6 +6066,9 @@ packages:picomatch:optional: true+ resolution: {integrity: sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==}+resolution: {integrity: sha512-txsf5fu3anp2ff3+gOJJzRImtrtm/oa9tYLN0iTuINZ++EyVR/nRrg2fKYwvG/pXDofcrvvb0scEbX3NyW/COw==}@@ -8956,6 +8962,17 @@ packages:resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==}engines: {node: ^10 || ^12 || >=14}+ resolution: {integrity: sha512-I2HWR4VKAfX6Y8e/VtAq1DRUMcZi/1pjlpaRqDp60AGs0JnTiJ1F7o2ke52VTIs6gBnoZIQCe3Xh8z384hLMGQ==}+ peerDependencies:+ '@rrweb/types': 2.0.0-alpha.17+ rrweb-snapshot: 2.0.0-alpha.17+ peerDependenciesMeta:+ '@rrweb/types':+ optional: true+ rrweb-snapshot:+ optional: true+resolution: {integrity: sha512-KJhO7LBFTjP71d83trW+Ilnjbo+ySsaAgCfXOXUlmGzJ4ygYPWmysm77yg4emwfmoz3b22yvH5IsVFHbhUaH5w==}@@ -19215,6 +19232,8 @@ snapshots:optionalDependencies:picomatch: 4.0.2+ [email protected]: {}+dependencies:flat-cache: 6.1.7@@ -22606,6 +22625,13 @@ snapshots:picocolors: 1.1.1source-map-js: 1.2.1+ dependencies:+ core-js: 3.41.0+ fflate: 0.4.8+ preact: 10.26.4+ web-vitals: 4.2.4+