Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat(wp): create demo using WordPress playground

Elijah Potterf31825058948
diff --git a/harper-core/dictionary.dict b/harper-core/dictionary.dict
index 7ee3595ed..1fe249289 100644
--- a/harper-core/dictionary.dict
+++ b/harper-core/dictionary.dict
@@ -34332,9 +34332,7 @@ nympho/1S
nymphomania/1M
nymphomaniac/15SM
nymphs/14
-o/15+
o'clock/
-o'er/+
oaf/1SM
oafish/5PY
oafishness/1M
diff --git a/packages/web/demo_wp_blueprint.json b/packages/web/demo_wp_blueprint.json
new file mode 100644
index 000000000..32116285c
--- /dev/null
+++ b/packages/web/demo_wp_blueprint.json
@@ -0,0 +1,42 @@
+{
+ "$schema": "https://playground.wordpress.net/blueprint-schema.json",
+ "preferredVersions": {
+ "php": "8.0",
+ "wp": "6.7"
+ },
+ "meta": {
+ "title": "Demo of Harper for WordPress",
+ "description": "Harper is a grammar checker for people who want to write, without any fuss.",
+ "author": "elijah-potter",
+ "categories": []
+ },
+ "landingPage": "/wp-admin/post.php?post=4&action=edit",
+ "steps": [
+ {
+ "step": "login",
+ "username": "admin",
+ "password": "password"
+ },
+ {
+ "step": "installPlugin",
+ "pluginData": {
+ "resource": "url",
+ "url": "https://github.com/Automattic/harper/releases/download/v0.24.0/harper.zip"
+ },
+ "options": {
+ "activate": true
+ }
+ },
+ {
+ "step": "installTheme",
+ "themeData": {
+ "resource": "wordpress.org/themes",
+ "slug": "twentytwentyfour"
+ }
+ },
+ {
+ "step": "runPHP",
+ "code": "<?php require_once 'wordpress/wp-load.php'; wp_insert_post(array('post_title' => 'Harper, in WordPress', 'post_content' => '<!-- wp:paragraph --><p><strong>Click on the Harper button on the top right of this page to get started.</strong></p><!-- /wp:paragraph --><!-- wp:paragraph --><p>Writing on the web can be scary. Theres a lot of competition for traffic and even a small grammatical mstake can be costly to your reputation and search rankings.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>That\\'s why we created Harper: an plugin to save you the embarassment. it can fix typos, serial commas and overall just make your life better.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>All that while respecting your privacy. You data should never leave Wordpress until you hit \"Publish\".</p><!-- /wp:paragraph -->'));"
+ }
+ ]
+}
diff --git a/packages/web/src/routes/docs/integrations/wordpress/+page.md b/packages/web/src/routes/docs/integrations/wordpress/+page.md
new file mode 100644
index 000000000..cc16e9808
--- /dev/null
+++ b/packages/web/src/routes/docs/integrations/wordpress/+page.md
@@ -0,0 +1,13 @@
+<script>
+ import {Button} from "flowbite-svelte"
+ import blueprint from "../../../../../demo_wp_blueprint.json?raw"
+
+ let base64Blueprint = btoa(blueprint)
+ let playgroundUrl = `https://playground.wordpress.net/?mode=seamless#${base64Blueprint}`
+</script>
+
+# Harper for WordPress
+
+Unlike other grammar checkers for WordPress, Harper is designed to be fast and __get out of the way__.
+
+<Button href={playgroundUrl} target="_blank">Demo Inside Gutenberg Playground</Button>
diff --git a/packages/web/vite.config.ts b/packages/web/vite.config.ts
index 8e5601bb2..7c732e963 100644
--- a/packages/web/vite.config.ts
+++ b/packages/web/vite.config.ts
@@ -44,6 +44,10 @@ export default defineConfig({
title: 'Obsidian',
to: '/docs/integrations/obsidian'
},
+ {
+ title: 'WordPress',
+ to: '/docs/integrations/wordpress'
+ },
{
title: 'Visual Studio Code',
to: '/docs/integrations/visual-studio-code'