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

[Example] Support Coveo metadata #413

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kjvarga
Copy link
Owner

@kjvarga kjvarga commented Aug 15, 2022

An example of how to support Coveo metadata https://docs.coveo.com/en/2656/index-content/index-xml-sitemap-metadata

Here's an example sitemap

SitemapGenerator::Sitemap.default_host = "http://www.example.com"
SitemapGenerator::Sitemap.compress = false
SitemapGenerator::Sitemap.create do
  add '/contents', coveo: { case_number: '12345', company_name: 'Publication Name' }
end

And output

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
  xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
  xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"
  xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"
  xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0"
  xmlns:pagemap="http://www.google.com/schemas/sitemap-pagemap/1.0"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
  xmlns:coveo="https://www.coveo.com/en/company/about-us">
  <url>
    <loc>http://www.example.com</loc>
    <lastmod>2022-08-15T11:31:53-07:00</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc>http://www.example.com/contents</loc>
    <lastmod>2022-08-15T11:31:53-07:00</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.5</priority>
    <coveo:metadata>
      <casenumber>12345</casenumber>
      <company_name>Publication Name</company_name>
    </coveo:metadata>
  </url>
</urlset>

@kjvarga kjvarga changed the title Support Coveo metadata [Example] Support Coveo metadata Aug 15, 2022
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

Successfully merging this pull request may close these issues.

1 participant