Skip to content

Instantly share code, notes, and snippets.

View jonoalderson's full-sized avatar

Jono Alderson jonoalderson

View GitHub Profile
@jonoalderson
jonoalderson / yoast-howto-schema.js
Created January 18, 2019 13:54
yoast-howto-schema.js
{
"@context": "https://schema.org",
"@graph": [
{
"@type" : "Organization",
"@id" : "https://www.example.com/#organization",
"url" : "https://www.example.com/",
"name" : "{{Organization Name}}",
"logo" : {
"@type" : "ImageObject",
{
"@context": "https://schema.org",
"@graph": [{
"@type" : "Organization",
"@id" : "https://www.example.com/#organization",
"url" : "https://www.example.com/",
"name" : "{{Organization Name}}",
"logo" : {
"@type" : "ImageObject",
"@id" : "https://www.example.com/#logo",
@jonoalderson
jonoalderson / yoast-schema-example-product.js
Last active December 3, 2021 00:07
Yoast Schema Example - Product
{
"@context": "https://schema.org",
"@graph": [
// Organization
{
"@type" : "Organization",
"@id" : "https://www.example.com/#organization",
"url" : "https://www.example.com/",
"mainEntityOfPage" : "https://www.example.com/",
"name" : "{{Organization Name}}",
@jonoalderson
jonoalderson / yoast-schema-example-blogpost.js
Last active October 24, 2018 08:23
Yoast Schema Example - Blog Post
{
"@context": "https://schema.org",
"@graph": [
// Organization
{
"@type" : "Organization",
"@id" : "https://www.example.com/#organization",
"url" : "https://www.example.com/",
"mainEntityOfPage" : "https://www.example.com/",
"name" : "{{Organization Name}}",
@jonoalderson
jonoalderson / yoast-schema-example-generic.js
Last active October 23, 2018 14:46
Yoast Schema Example - Generic
{
"@context": "https://schema.org",
"@graph": [
// Organization
{
"@type" : "Organization",
"@id" : "https://www.example.com/#organization",
"url" : "https://www.example.com/",
"mainEntityOfPage" : "https://www.example.com/",
"name" : "{{Organization Name}}",
@jonoalderson
jonoalderson / userAgentSEO.php
Last active November 29, 2018 09:13
Looks up the user agent against a known list, and outputs a HTML comment
<?php
// Quick script to check and output the user agent in a HTML comment
// Jono Alderson [https://www.jonoalderson.com]
// =================================
// Google user agent strings are sourced from
// [https://support.google.com/webmasters/answer/1061943?hl=en]
// Feel free to add/edit definitions
// =================================
// Last updated: 20/03/2018