Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEO code produces invalid JSON-LD #12

Closed
saper opened this issue Jan 12, 2020 · 1 comment
Closed

SEO code produces invalid JSON-LD #12

saper opened this issue Jan 12, 2020 · 1 comment

Comments

@saper
Copy link
Contributor

saper commented Jan 12, 2020

Using hugo-0.61.0

Google webmaster tools complain about the default JSON-LD entry on a home page:

{ 
  "@context": "http://schema.org", 
  "@type": "WebSite", 
  "url": "https:\/\/odpal.dajznak.pl\/", 
  "name": "Daj znak!",
   "author": {
      "@type": "Person",
      "name": ""
    },
  "description": "",
}

The errors is in the line with description - there is a trailing comma.

jq commands reports:

> jq -M .
parse error: Expected another key-value pair at line 11, column 1

On the page JSON-LD there are other issues as well:

{ 
    "@context": "http://schema.org", 
    "@type": "BlogPosting",
    "headline": "Polki nagrodzone!",
    "genre": "",  
    "url": "https:\/\/odpal.dajznak.pl\/posts\/polki-nagrodzone\/",
    "datePublished": "2019-11-22 21:00:00 \x2b0000 UTC",
    "description": "Piękny wieczór we frankfurckim Ratuszu - dziś Rada Obcokrajowców KAV przyznała nagrody wybitnym osobowościom obcego pochodzenia.\n",
    "author": {
        "@type": "Person",
        "name": ""
    }
 }

date has strange quote \x2b0000 and there is unescaped UTF-8 ("Piękny").

> jq -M .
parse error: Invalid escape at line 7, column 55
@saper
Copy link
Contributor Author

saper commented Jan 13, 2020

JSON-LD quoting errors are probably hugo bugs, see gohugoio/hugo#6695

saper added a commit to dajznak/hugo-cards that referenced this issue Jan 13, 2020
Fixes one issue reported to bul-ikana#12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants