-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rules-page-improvements
- Loading branch information
Showing
14 changed files
with
524 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 -->'));" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/web/src/routes/docs/contributors/wordpress/+page.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# WordPress Plugin | ||
|
||
This page will describe most of what you need to know to build and develop the WordPress plugin locally. | ||
You do NOT need to have a WordPress installation on your machine (or hosted on a server, for that matter) to work on the Harper plugin. | ||
|
||
Make sure you read the [introduction to contributing](./introduction) before opening a pull request. | ||
|
||
## Notes | ||
|
||
- The plugin does not have any kind of automated testing. | ||
- You can look at the project's [`justfile`](https://github.com/Automattic/harper/blob/master/justfile) to see exactly what running the `just` recipes below do. | ||
|
||
## Prerequisites | ||
|
||
Make sure to [set up your environment](./environment). | ||
|
||
## Running the Plugin on Your Machine | ||
|
||
You should have already run `just setup` to prepare your environment. | ||
All you need to do from here is run `just dev-wp`. This will: | ||
|
||
- Download a local copy of the WordPress Playground to your machine | ||
- Build and start watching for changes to the plugin code. | ||
- Run WordPress, mounting the build directory to the Playground instance. | ||
|
||
When you make changes to the plugin code, it will be rebuild and you will be able to reload the WordPress page to see your change. | ||
|
||
:::info[Remember] | ||
The Harper WordPress plugin only works on the Gutenberg editor. | ||
You will need to draft or edit a post to see the option to open the sidebar. | ||
::: | ||
|
||
 |
31 changes: 31 additions & 0 deletions
31
packages/web/src/routes/docs/integrations/wordpress/+page.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script> | ||
import {Button} from "flowbite-svelte" | ||
</script> | ||
|
||
# Harper for WordPress | ||
|
||
Harper is now ready to be installed to the nearest WordPress site near you. | ||
It's still early days, so expect bugs. | ||
|
||
Not ready to install it just yet? | ||
Visit our online demo to try writing a blog post with Harper. | ||
|
||
<Button href='/wpdemo' target="_blank">Go to the Demo</Button> | ||
|
||
## Your Voice Means Something | ||
|
||
 | ||
|
||
Harper checks your work for grammatical errors. That's it. | ||
|
||
Other grammar checkers try to strip out everything that makes your writing unique. | ||
We believe you should have the freedom to write what's on your mind, not what an LLM thinks you want to hear. | ||
Harper is designed to be fast and **get out of the way**. | ||
|
||
<Button href='/wpdemo' target="_blank">Go to the Demo</Button> | ||
|
||
## Installation | ||
|
||
For now, can install Harper into WordPress by downloading `harper.zip` from [GitHub releases](https://github.com/Automattic/harper/releases/latest) and uploading it to your site. | ||
|
||
Harper will be coming to the WordPress.org plugin directory soon. Hang tight! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { redirect } from '@sveltejs/kit'; | ||
import blueprint from '../../../demo_wp_blueprint.json?raw'; | ||
|
||
const base64Blueprint = btoa(blueprint); | ||
const playgroundUrl = `https://playground.wordpress.net/?mode=seamless#${base64Blueprint}`; | ||
|
||
export function load() { | ||
redirect(302, playgroundUrl); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.