Skip to content

Commit

Permalink
google expects plain schema-org url (#576)
Browse files Browse the repository at this point in the history
* google expects plain schema-org url
https://yoast.com/json-ld/
resolves #574

* Revert "google expects plain schema-org url"

This reverts commit 7f09d4c.

* hack to replace full path for short path, because pyld requires full, search engine expects short
  • Loading branch information
paul van genuchten authored Dec 1, 2020
1 parent 8c699a1 commit f4859d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pygeoapi/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
var head = document.getElementsByTagName('head')[0];
var jsonld_datablock = document.createElement('script');
jsonld_datablock.type = "application/ld+json";
jsonld_datablock.textContent = xhr.responseText;
//remove full context path, because search engines don't expect it here, pyld requires it.
jsonld_datablock.textContent = xhr.responseText.replace('docs/jsonldcontext.jsonld','');
head.appendChild(jsonld_datablock);
}
};
Expand Down

0 comments on commit f4859d6

Please sign in to comment.