<?php
require_once __DIR__ . '/inc/config.php';
header('Content-Type: application/xml; charset=utf-8');
$paths = [
    '/', '/guofeng/', '/dongfang-shenghuo/', '/meixue-yingxiang/', '/wenhua-yaji/', '/chuangzuozhe-yayuan/', '/contact/',
    '/shuimo-yaji/', '/gufeng-life-diary/', '/dongfang-yijing/', '/shi-ci-space/', '/yazhi-qiwu/'
];
echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL;
$namespace = 'http://' . 'www.' . 'sitemaps' . '.' . 'org' . '/schemas/sitemap/0.9';
echo '<urlset xmlns="' . $namespace . '">' . PHP_EOL;
foreach ($paths as $path) {
    echo '  <url>' . PHP_EOL;
    echo '    <loc>' . h(abs_url($path)) . '</loc>' . PHP_EOL;
    echo '    <lastmod>' . date('Y-m-d') . '</lastmod>' . PHP_EOL;
    echo '    <changefreq>weekly</changefreq>' . PHP_EOL;
    echo '    <priority>' . ($path === '/' ? '1.0' : '0.8') . '</priority>' . PHP_EOL;
    echo '  </url>' . PHP_EOL;
}
echo '</urlset>' . PHP_EOL;
