<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        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">

  <!-- ========================================
       STATIC PAGES
       ======================================== -->

  <!-- Homepage -->
  <url>
    <loc>https://www.postoakmachinery.com/</loc>
    <lastmod>2026-07-08</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>

  <!-- Inventory / Machines listing -->
  <url>
    <loc>https://www.postoakmachinery.com/machines</loc>
    <lastmod>2026-07-08</lastmod>
    <changefreq>daily</changefreq>
    <priority>0.9</priority>
  </url>

  <!-- Blog listing -->
  <url>
    <loc>https://www.postoakmachinery.com/blog</loc>
    <lastmod>2026-07-09</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.7</priority>
  </url>

  <!-- ========================================
       MACHINE DETAIL PAGES (dynamic)
       ========================================
       Generated by the backend from GetInventory — one <url> per machine.
       The React app routes as /detail/:category/:addId/:id and fetches the
       machine by the MIDDLE segment (addId = asset id); the first and last
       segments are descriptive/SEO. Build URLs to match (or they 404):

         <loc>https://www.postoakmachinery.com/detail/{category}/{id}/{year-manufacturer-model[-unit]}</loc>
         <lastmod>YYYY-MM-DD</lastmod>
         <changefreq>weekly</changefreq>
         <priority>0.8</priority>

       where:
         {category} = category.name with spaces replaced by "-" (fallback "machine")
         {id}       = the asset id (this is what the page fetches by)
         last seg   = encodeURIComponent(`${year}-${manufacturer}-${model}${unit ? '-'+unit : ''}`)
                      (spaces -> %20, e.g. "D6N XL" -> "D6N%20XL")
       Example:
         https://www.postoakmachinery.com/detail/Bulldozers/766/2017-CATERPILLAR-D6N%20XL
  -->

  <!-- ========================================
       BLOG DETAIL PAGES (dynamic)
       ========================================
       Generated by the backend from
       GetPublishToWebsiteWebPageTextBlockSummaries (TextType == "Blog") —
       one <url> per published blog post. The React app routes each post as
       /blog/{WPTextBlockId} (see src/page/Blog/detail.js), so the path segment
       is simply the numeric WPTextBlockId:

         <loc>https://www.postoakmachinery.com/blog/{WPTextBlockId}</loc>
         <lastmod>YYYY-MM-DD</lastmod>   (from the post's ChangeDateTime)
         <changefreq>monthly</changefreq>
         <priority>0.6</priority>

       Example:
         https://www.postoakmachinery.com/blog/2
  -->

</urlset>
