Where on the website should I put RDF/XML Schema.org code? - schema.org

I'm trying to put Schema.org on a website. First I made JSON-LD but the website is not allowing any script in the head element. Then I converted it into RDF/XML format below.
Now, where on the website should I put this for Google to read it. Should I put in the head element?
<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:schema="http://schema.org/">
<schema:Organization rdf:nodeID="genid1">
<schema:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">National Public Radio</schema:name>
<schema:sponsor>
<schema:Organization>
<schema:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">GloboCorp</schema:name>
<schema:url rdf:resource="http://www.example.com/"/>
</schema:Organization>
</schema:sponsor>
<schema:url rdf:resource="http://npr.org"/>
</schema:Organization>
</rdf:RDF>

If you want to include it in the HTML document, you would have to use a script element (just like with JSON-LD). This script element doesn’t have to be part of the head, you can place it in the body. An alternative is to provide the RDF/XML in its own file and link it from the head, or offer it via content negotiation.
That said, Google Search doesn’t support RDF/XML. For their search result features, which make use of Schema.org, they only support these syntaxes:
JSON-LD (in script)
Microdata
RDFa

Related

Specify sitemap language (same language for all sitemap)

According to Google, you can specify languages in a sitemap like this:
<url>
<loc>http://www.example.com/english/page.html</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/page.html"/>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://www.example.com/english/page.html"/>
</url>
However, I just need to specify that ALL the sitemap/website is in Spanish, which means it's not a multi-language sitemap, it's a one-language sitemap but that language happens to be "Spanish".
Should I include a hreflang tag for each and every URL? or is there a better way to do this, like specifying it in the header section?
No, setting header for the sitemap xml only sets it for the sitemap.xml and not all locations declared in the sitemap. You have to declare it for all locations.
Checked with the URL inspection tool to see if there are any errors with Google trying to index your site.
If you had access to the server, you can set Link response header alongst the following lines.
Nginx
add-header Link <$scheme://$host$request_uri>; rel="alternate"; hreflang="es"
Apache
Header set Link "<%{REQUEST_SCHEME}://%{HTTP_HOST}%{REQUEST_URI}>; rel=\"alternate\"; hreflang=\"es\""
Also, you could set the "lang" attribute on the "html" tag or "link" tag of every page in your website. You can use a template for this if your site is built using a static site generator.
If you only have access in Cloud console, you have to make an entry for every location in your website in the sitemap.xml.

Integrating FormSpree into GitHub Jekyll markdown file

I am attempting to add a contact form to a GitHub Jekyll website. I have mostly been following advice from the most-liked answer here, from a YouTube tutorial here, and from the FormSpree site.
In my attempt to keep the website design consistent, one major difference compared to these tutorials is probably that I am adding the FormSpree contact form to a markdown file, which is here. As you can see in this markdown file, I tried creating the form twice (once with bare-bone suggestions and once with more bells and whistles).
I am almost certain the form is not looking as expected (which in the YouTube tutorial I was following would look more like this) because I am not using a .html file. However, when I tried to convert my page to .html instead of .md it rendered the contact form page looking visually/aesthetically inconsistent with the rest of the webpage tabs. As a result, I am hoping to maintain the .md format with the same current YAML metadata.
My question is: Is it possible to add a FormSpree contact form to GitHub Jekyll pages directly inside a Markdown (.md) file and, if so, what alterations would I need to make to accomplish this? Thank you for sharing any advice!
Using html chunks in md files can seem quite tricky.
In your particular case, as you're including raw html, you can use nomarkdown extension tag.
Just try :
{::nomarkdown}
<form action="http://formspree.io/moqeoggo method="POST">
<input type="email" name="_replyto">
<textarea name="body"></textarea>
<input type="submit" value="Send">
</form>
{:/nomarkdown}

Using wget to download dokuwiki pages in plain xhtml format only

I'm currently modifying the offline-dokuwiki[1] shell script to get the latest documentation for an application for automatically embedding within instances of that application. This works quite well except in its current form it grabs three versions of each page:
The full page including header and footer
Just the content without header and footer
The raw wiki syntax
I'm only actually interested in 2. This is linked to from the main pages by a html <link> tag in the <head>, like so:
<link rel="alternate" type="text/html" title="Plain HTML"
href="/dokuwiki/doku.php?do=export_xhtml&id=documentation:index" />
and is the same url as the main wiki pages only they contain 'do=export_xhtml' in the querystring. Is there a way of instructing wget to only download these versions or to automatically add '&do=export_xhtml' to the end of any links it follows? If so this would be a great help.
[1] http://www.dokuwiki.org/tips:offline-dokuwiki.sh (author: samlt)
DokuWiki accepts the do parameter as HTTP header as well. You could run wget with the parameter --header "X-DokuWiki-Do: export_xhtml"

Get google to index links from javascript generated content

On my site I have a directory of things which is generated through jquery ajax calls, which subsequently creates the html.
To my knwoledge goole and other bots aren't aware of dom changes after the page load, and won't index the directory.
What I'd like to achieve, is to serve the search bots a dedicated page which only contains the links to the things.
Would adding a noscript tag to the directory page be a solution? (in the noscript section, I would link to a page which merely serves the links to the things.)
I've looked at both the robots.txt and the meta tag, but neither seem to do what I want.
It looks like you stumbled on the answer to this yourself, but I'll post the answer to this question anyway for posterity:
Implement Google's AJAX crawling specification. If links to your page contain #! (a URL fragment starting with an exclamation point), Googlebot will send everything after the ! to the server in the special query string parameter _escaped_fragment_.
You then look for the _escaped_fragment_ parameter in your server code, and if present, return static HTML.
(I went into a little more detail in this answer.)

Does Bing Allow Image Sitemaps Like Google?

Does Bing allow images in their sitemaps like Google?
Please see the Google example below:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<url>
<loc>http://www.example.com/foo.html</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
</url>
</urlset>
It's Google the only search engine currently which supports Image sitemaps. The other search engines may successfully parse these sitemaps but they will likely ignore the tags related to the Image sitemap extension.
Note that in your example there's an error, and is likely that this is what causes parsing difficulties for Bing. The Image schema hub is located at http://www.google.com/schemas/sitemap-image/1.1/
That is, you need to replace the following bit:
xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1"
with
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"