Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffmatson/really-rich-results
RRR makes structured data for WordPress really rich, and really easy.
https://github.com/jeffmatson/really-rich-results
json plugin rich-results schema schema-org seo wordpress
Last synced: 2 months ago
JSON representation
RRR makes structured data for WordPress really rich, and really easy.
- Host: GitHub
- URL: https://github.com/jeffmatson/really-rich-results
- Owner: JeffMatson
- Created: 2021-05-07T16:17:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-07T21:27:40.000Z (almost 3 years ago)
- Last Synced: 2024-10-04T13:05:52.773Z (3 months ago)
- Topics: json, plugin, rich-results, schema, schema-org, seo, wordpress
- Language: PHP
- Homepage:
- Size: 2.06 MB
- Stars: 24
- Watchers: 6
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Really Rich Results - JSON-LD Structured Data (Google Rich Results) for WordPress
![Really Rich Results Banner](assets/src/images/banner-1544x500.png)
Search engines are putting more weight on structured data than ever before. By leveraging JSON-LD schema markup as part of your SEO strategy, a whole world of opportunities arise within Google's Rich Results.
Really Rich Results works with your WordPress site's existing content to quickly and accurately generate JSON-LD schema markup with minimal effort required. In addition to generating markup for the primary content on the page, Really Rich Results also detects any additional child elements that are being displayed, such as related content, products, page context, and more.
In addition to a large library of standard patterns that are automatically recognized, Really Rich Results offers limitless customization to fit your unique needs. Whether you're customizing your structured data from within the GUI or by providing your own custom code, Really Rich Results has you covered.
RRR makes structured data for WordPress really rich, and really easy.
## Installing
Just jump over to the [Releases page](https://github.com/pagely/really-rich-results/releases), download the plugin zip, and install it on your WordPress site.
## Building
The instructions below are for building from the GitHub repository. If you'd like to try out a pre-packaged version, see the [releases](https://github.com/pagely/really-rich-results/releases).
### Requirements
- Yarn
- Composer### Compiling for Development
1. Clone the plugin.
2. Run a `composer install`.
3. Run `yarn install`.
4. Run `yarn start` to build the development bundle.
4. Activate.### Compiling for Release
If you just want to download the latest release, see [releases](https://github.com/pagely/really-rich-results/releases).
1. Clone the plugin.
2. Run `yarn install`
3. Run `yarn build:dist`## Extending
TODO
## How it works
Quick rundown of how it works:
1. Main functionality exists inside `src/Main.php`.
2. First it hooks into the `wp` action to check for the primary content.
3. Next, it hooks into the `the_content` hook to collect any posts being displayed. Those collected posts are detected, used to create a data source, and added to `Main::$found_posts`.
4. Data sources are then used to create schema objects. They can be either auto-detected or defined manually by passing a schema object and the data source through `Schema::build_schema()`
5. Finally, they're output through a `wp_footer` action. By this time, we should have all the posts we need to build any schema.General locations for things are as follows:
* `really-rich-results.php`: Just loads up the autoloader and inits `src/Main.php`
* `src/Common.php`: Other stuff. Mostly helper functions.
* `src/Main.php`: Main functionality. Basically a controller. Collects queried posts, hands them off to wherever they need to go, stores objects, and outputs.
* `src/Admin/`: Houses any WordPress admin tasks, such as settings pages.
* `src/Schema/`: Transforms data sources into structured data schema objects. Files are named according to the schema type and inherit their parent schema. Follows the schema.org spec.
* `src/Data_Sources/`: Various data sources. Helps translate schema properties from different types of content.
* `src/Content_Types/`: Handles various content types that might need to handle a data source or group of data sources differently than normal. For example, archive pages that contain an ItemList of Article schema objects inside another main CollectionPage schema object.
* `src/Factories/`: Factories for generating schema and content type objects.
* `src/Routes/`: Contains REST API routes.
* `assets`: Various JS, SCSS, and image assets.
* `tests`: Codeception tests.## Contributing
Pull requests or issue reports are always welcome. Please be sure to run the PHPCS ruleset at `phpcs.xml` before submitting a pull request.