updateSitemap
Projenin site haritasını güncelleyin. 🔐 Bu yöntem yetkilendirme gerektirir.
Açıklama
Bu yöntem, projenin site haritasını güncelleyerek mevcut sayfa yapısına göre yeniden oluşturur. Güncellenmiş ISitemapEntity nesnelerinin bir dizisine çözülmekte olan bir Promise döndürür.
Sitemap.updateSitemap(
body*,
body.baseUrls,
body.url,
body.lastmod,
body.changefreq,
body.priority
);
Parametreler şeması
Şema
body(required): ISitemapQuery
Site haritası gövde parametreleri (örn. { baseUrls: { en_US: "https://…" } })
body.baseUrls: Record<string, string>
Site haritası oluşturma için dil başına temel URL'ler.
örnek: { "en_US": "https://example.com/" }
body.url: string
Tek bir site haritası girişi için URL.
body.lastmod: string
Girişin son değiştirilme tarihi.
body.changefreq: string
Girişin değişim sıklığı.
body.priority: number
Girişin önceliği.
Örnekler
Minimal örnek
const body = [ { "url": "https://your-project.oneentry-cloud.com/", "lastmod": "2025-06-01T00:00:00.000Z", "changefreq": "daily", "priority": 1.0 }];
const response = await Sitemap.updateSitemap(body);
Örnek yanıt
[
{
"url": "https://your-project.oneentry-cloud.com/",
"lastmod": "2025-06-01T00:00:00.000Z",
"changefreq": "daily",
"priority": 1.0
},
{
"url": "https://your-project.oneentry-cloud.com/catalog",
"lastmod": "2025-05-15T00:00:00.000Z",
"changefreq": "weekly",
"priority": 0.8
}
]
Yanıt şeması
Şema: ISitemapEntity[]
url: string
Sayfanın tam URL'si.
örnek: "https://your-project.oneentry-cloud.com/catalog"
lastmod: string
Sayfanın en son ne zaman değiştirildiği tarihi (ISO 8601 formatında).
örnek: "2025-06-01T00:00:00.000Z"
changefreq: string
Sayfanın ne sıklıkla değişmesi muhtemel. Olası değerler: "always", "hourly", "daily", "weekly", "monthly", "yearly", "never".
örnek: "weekly"
priority: number
Bu URL'nin sitenizdeki diğer URL'lere göre önceliği. Geçerli değerler 0.0 ile 1.0 arasında değişir.
örnek: 0.8