All Projects → ashhitch → Wp Graphql Yoast Seo

ashhitch / Wp Graphql Yoast Seo

Licence: gpl-3.0
This is an extension to the WPGraphQL plugin for Yoast SEO

Projects that are alternatives of or similar to Wp Graphql Yoast Seo

Wp Graphql
🚀 GraphQL API for WordPress
Stars: ✭ 3,097 (+2480.83%)
Mutual labels:  graphql, hacktoberfest, wordpress, wordpress-plugin
Wp Graphql Gutenberg
Query gutenberg blocks with wp-graphql
Stars: ✭ 158 (+31.67%)
Mutual labels:  graphql, wordpress, wordpress-plugin
Pop
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder
Stars: ✭ 160 (+33.33%)
Mutual labels:  graphql, wordpress, wordpress-plugin
Nextjs Headless Wordpress
🔥 Nextjs Headless WordPress
Stars: ✭ 110 (-8.33%)
Mutual labels:  graphql, hacktoberfest, wordpress
Wp Graphiql
GraphiQL IDE, fine tuned for use with WPGraphQL
Stars: ✭ 284 (+136.67%)
Mutual labels:  graphql, wordpress, wordpress-plugin
Coblocks
A suite of professional page building content blocks for the WordPress Gutenberg block editor.
Stars: ✭ 486 (+305%)
Mutual labels:  hacktoberfest, wordpress, wordpress-plugin
Gatsby Woocommerce Themes
⚡ A Gatsby Theme for WooCommerce E-commerce site Gatsby WooCommerce WordPress
Stars: ✭ 306 (+155%)
Mutual labels:  graphql, hacktoberfest, wordpress
Wp Graphql Acf
WPGraphQL for Advanced Custom Fields
Stars: ✭ 358 (+198.33%)
Mutual labels:  graphql, hacktoberfest, wordpress
Stream
🗄️ Stream plugin for WordPress
Stars: ✭ 335 (+179.17%)
Mutual labels:  hacktoberfest, wordpress, wordpress-plugin
Wordpresscan
WPScan rewritten in Python + some WPSeku ideas
Stars: ✭ 456 (+280%)
Mutual labels:  hacktoberfest, wordpress, wordpress-plugin
Jetpack
Security, performance, marketing, and design tools — Jetpack is made by the WordPress experts to make WP sites safer and faster, and help you grow your traffic.
Stars: ✭ 1,283 (+969.17%)
Mutual labels:  hacktoberfest, wordpress, wordpress-plugin
Fewbricks
Write code to create ACF field groups, fields and re-usable modules.
Stars: ✭ 100 (-16.67%)
Mutual labels:  wordpress, wordpress-plugin
Phpcompat
WordPress Plugin: PHP Compatibility Checker
Stars: ✭ 106 (-11.67%)
Mutual labels:  wordpress, wordpress-plugin
Wp Postviews
Enables you to display how many times a post/page had been viewed.
Stars: ✭ 107 (-10.83%)
Mutual labels:  wordpress, wordpress-plugin
Thorium
Platform for starship simulator controls
Stars: ✭ 109 (-9.17%)
Mutual labels:  graphql, hacktoberfest
Wp Help
#WordPressPlugin: Site operators can create detailed, hierarchical documentation for the site's authors, editors, and contributors, viewable in the WordPress admin
Stars: ✭ 99 (-17.5%)
Mutual labels:  wordpress, wordpress-plugin
Strapi
🚀 Open source Node.js Headless CMS to easily build customisable APIs
Stars: ✭ 41,786 (+34721.67%)
Mutual labels:  graphql, hacktoberfest
Action policy Graphql
Action Policy integration for GraphQL
Stars: ✭ 110 (-8.33%)
Mutual labels:  graphql, hacktoberfest
Wp Cache Remember
Helper for the WordPress object cache and transients.
Stars: ✭ 111 (-7.5%)
Mutual labels:  wordpress, wordpress-plugin
Debug Objects
WordPress Plugin for debugging and learning with and at the application.
Stars: ✭ 98 (-18.33%)
Mutual labels:  wordpress, wordpress-plugin

WPGraphQl Yoast SEO Plugin

Latest Stable Version Total Downloads Monthly Downloads

WPGraphQl Yoast SEO Plugin

Please note version 14 of the Yoast Plugin is a major update.

If you are stuck on version of Yoast before V14 then use v3 of this plugin.

This is an extension to the WPGraphQL plugin (https://github.com/wp-graphql/wp-graphql) that returns Yoast SEO data.

Using this plugin? I would love to see what you make with it. 😃 @ash_hitchcock

Currently returning SEO data for:

  • Pages
  • Posts
  • Custom post types
  • Products (WooCommerce)
  • Categories
  • Custom taxonomies
  • WooCommerce Products
  • Yoast Configuration
    • Webmaster verification
    • Social profiles
    • Schemas
    • Breadcrumbs

If there is any Yoast data that is not currently returned, please raise an issue so we can add it to the roadmap.

Quick Install

  • Install from the WordPress Plugin Directory
  • Clone or download the zip of this repository into your WordPress plugin directory & activate the WP GraphQL Yoast SEO plugin
  • Install & activate WPGraphQL

Composer

composer require ashhitch/wp-graphql-yoast-seo

V4 breaking change

Plugin now requires at least Yoast 14.0.0

V3 breaking change

Image urls are now returned as mediaItem type.

This applies to twitterImage and opengraphImage

Usage with Gatsby

Checkout the companion Gatsby plugin to add in Metadata and JSON LD schema with ease.

Usage

To query for the Yoast Data simply add the seo object to your query:

Post Type Data

query GetPages {
    pages(first: 10) {
        edges {
            node {
                id
                title
                seo {
                    canonical
                    title
                    metaDesc
                    focuskw
                    metaRobotsNoindex
                    metaRobotsNofollow
                    opengraphAuthor
                    opengraphDescription
                    opengraphTitle
                    opengraphDescription
                    opengraphImage {
                        altText
                        sourceUrl
                        srcSet
                    }
                    opengraphUrl
                    opengraphSiteName
                    opengraphPublishedTime
                    opengraphModifiedTime
                    twitterTitle
                    twitterDescription
                    twitterImage {
                        altText
                        sourceUrl
                        srcSet
                    }
                    breadcrumbs {
                        url
                        text
                    }
                    cornerstone
                    schema {
                        pageType
                        articleType
                        raw
                    }
                    readingTime
                }
                author {
                    node {
                        seo {
                            metaDesc
                            metaRobotsNofollow
                            metaRobotsNoindex
                            title
                            social {
                                youTube
                                wikipedia
                                twitter
                                soundCloud
                                pinterest
                                mySpace
                                linkedIn
                                instagram
                                facebook
                            }
                        }
                    }
                }
            }
        }
    }
}

Post Taxonomy Data

query GetCategories {
    categories(first: 10) {
        edges {
            node {
                id
                seo {
                    canonical
                    title
                    metaDesc
                    focuskw
                    metaRobotsNoindex
                    metaRobotsNofollow
                    opengraphAuthor
                    opengraphDescription
                    opengraphTitle
                    opengraphDescription
                    opengraphImage {
                        altText
                        sourceUrl
                        srcSet
                    }
                    twitterTitle
                    twitterDescription
                    twitterImage {
                        altText
                        sourceUrl
                        srcSet
                    }
                    breadcrumbs {
                        url
                        text
                    }
                }
                name
            }
        }
    }
}

User Data

query GetUsers {
    users {
        nodes {
            seo {
                metaDesc
                metaRobotsNofollow
                metaRobotsNoindex
                title
                social {
                    youTube
                    wikipedia
                    twitter
                    soundCloud
                    pinterest
                    mySpace
                    linkedIn
                    instagram
                    facebook
                }
            }
        }
    }
}

Edge and Page Info Data

query GetPostsWithIsPrimary {
    posts {
        pageInfo {
            startCursor
            seo {
                schema {
                    raw
                }
            }
        }
        nodes {
            title
            slug
            categories {
                edges {
                    isPrimary
                    node {
                        name
                        count
                    }
                }
            }
        }
    }
}

Yoast Config Data

query GetSeoConfig {
    seo {
        webmaster {
            googleVerify
            yandexVerify
            msVerify
            baiduVerify
        }
        schema {
            siteName
            wordpressSiteName
            siteUrl
            inLanguage
            companyName
            companyOrPerson
            companyLogo {
                mediaItemUrl
            }
            logo {
                mediaItemUrl
            }
            personLogo {
                mediaItemUrl
            }
        }
        breadcrumbs {
            showBlogPage
            separator
            searchPrefix
            prefix
            homeText
            enabled
            boldLast
            archivePrefix
            notFoundText
        }
        social {
            facebook {
                url
                defaultImage {
                    mediaItemUrl
                }
            }
            instagram {
                url
            }
            linkedIn {
                url
            }
            mySpace {
                url
            }
            pinterest {
                url
                metaTag
            }
            twitter {
                cardType
                username
            }
            wikipedia {
                url
            }
            youTube {
                url
            }
        }
        openGraph {
            frontPage {
                title
                description
                image {
                    altText
                    sourceUrl
                    mediaItemUrl
                }
            }
            defaultImage {
                altText
                sourceUrl
                mediaItemUrl
            }
        }
        contentTypes {
            post {
                title
                schemaType
                metaRobotsNoindex
                metaDesc
                schema {
                    raw
                }
                archive {
                    archiveLink
                    breadcrumbTitle
                    hasArchive
                    metaDesc
                    metaRobotsNoindex
                    title
                }
            }
            page {
                metaDesc
                metaRobotsNoindex
                schemaType
                title
                schema {
                    raw
                }
            }
        }
        redirects {
            origin
            target
            format
            type
        }
    }
}

Support

Open an issue

Twitter: @ash_hitchcock

Please Note: Yoast and WPGraphQL and their logos are copyright to their respective owners.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].