optimize search engine
This commit is contained in:
1 parent
f5159100f7
commit
ac8c63d790
2 files changed
+133
-10
No files matched your search
+46
-8
@@ -4,13 +4,20 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title data-i18n="page_title">Nha Trang — Thiên đường du lịch biển Việt Nam | 芽庄 | Nha Trang | Нячанг</title>
|
<title data-i18n="page_title">Nha Trang — Thiên đường du lịch biển Việt Nam | 芽庄 | Nha Trang | Нячанг</title>
|
||||||
<meta name="description" content="Khám phá Nha Trang: các điểm tham quan nổi bật, thời tiết theo mùa, ẩm thực địa phương và tour du lịch.">
|
<meta id="meta-description" name="description" content="Khám phá Nha Trang: điểm tham quan, thời tiết, ẩm thực địa phương và tour du lịch.">
|
||||||
<link rel="canonical" href="https://kyduyen.duckdns.org/">
|
<link id="canonical-url" rel="canonical" href="https://kyduyen.duckdns.org/?lang=vi">
|
||||||
|
<link rel="alternate" hreflang="vi" href="https://kyduyen.duckdns.org/?lang=vi">
|
||||||
|
<link rel="alternate" hreflang="ru" href="https://kyduyen.duckdns.org/?lang=ru">
|
||||||
|
<link rel="alternate" hreflang="en" href="https://kyduyen.duckdns.org/?lang=en">
|
||||||
|
<link rel="alternate" hreflang="zh" href="https://kyduyen.duckdns.org/?lang=zh">
|
||||||
|
<link rel="alternate" hreflang="de" href="https://kyduyen.duckdns.org/?lang=de">
|
||||||
|
<link rel="alternate" hreflang="fr" href="https://kyduyen.duckdns.org/?lang=fr">
|
||||||
|
<link rel="alternate" hreflang="x-default" href="https://kyduyen.duckdns.org/?lang=vi">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:title" content="Nha Trang — Cẩm nang du lịch">
|
<meta id="og-title" property="og:title" content="Nha Trang — Thiên đường du lịch biển Việt Nam">
|
||||||
<meta property="og:description" content="Khám phá điểm đến, thời tiết, ẩm thực và trải nghiệm tại Nha Trang, Việt Nam.">
|
<meta id="og-description" property="og:description" content="Khám phá Nha Trang: điểm tham quan, thời tiết, ẩm thực địa phương và tour du lịch.">
|
||||||
<meta property="og:url" content="https://kyduyen.duckdns.org/">
|
<meta id="og-url" property="og:url" content="https://kyduyen.duckdns.org/?lang=vi">
|
||||||
<meta property="og:locale" content="vi_VN">
|
<meta id="og-locale" property="og:locale" content="vi_VN">
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
@@ -436,6 +443,7 @@
|
|||||||
const translations = {
|
const translations = {
|
||||||
vi: {
|
vi: {
|
||||||
page_title: "Nha Trang — Thiên đường du lịch biển Việt Nam",
|
page_title: "Nha Trang — Thiên đường du lịch biển Việt Nam",
|
||||||
|
meta_description: "Khám phá Nha Trang: điểm tham quan, thời tiết, ẩm thực địa phương và tour du lịch.",
|
||||||
logo_sub: "Paradise Bay",
|
logo_sub: "Paradise Bay",
|
||||||
nav_about: "Về Nha Trang",
|
nav_about: "Về Nha Trang",
|
||||||
nav_attractions: "Điểm đến",
|
nav_attractions: "Điểm đến",
|
||||||
@@ -525,6 +533,7 @@
|
|||||||
},
|
},
|
||||||
ru: {
|
ru: {
|
||||||
page_title: "Нячанг — Жемчужина Вьетнама",
|
page_title: "Нячанг — Жемчужина Вьетнама",
|
||||||
|
meta_description: "Откройте для себя Нячанг: достопримечательности, погода, местная кухня и экскурсии.",
|
||||||
logo_sub: "Paradise Bay",
|
logo_sub: "Paradise Bay",
|
||||||
nav_about: "О Нячанге",
|
nav_about: "О Нячанге",
|
||||||
nav_attractions: "Достопримечательности",
|
nav_attractions: "Достопримечательности",
|
||||||
@@ -614,6 +623,7 @@
|
|||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
page_title: "Nha Trang — Vietnam's Coastal Paradise",
|
page_title: "Nha Trang — Vietnam's Coastal Paradise",
|
||||||
|
meta_description: "Explore Nha Trang, Vietnam: top attractions, local weather, cuisine, and tours.",
|
||||||
logo_sub: "Paradise Bay",
|
logo_sub: "Paradise Bay",
|
||||||
nav_about: "About",
|
nav_about: "About",
|
||||||
nav_attractions: "Attractions",
|
nav_attractions: "Attractions",
|
||||||
@@ -703,6 +713,7 @@
|
|||||||
},
|
},
|
||||||
zh: {
|
zh: {
|
||||||
page_title: "芽庄 — 越南海滨度假天堂",
|
page_title: "芽庄 — 越南海滨度假天堂",
|
||||||
|
meta_description: "探索越南芽庄:热门景点、天气、当地美食与旅游体验。",
|
||||||
logo_sub: "Paradise Bay",
|
logo_sub: "Paradise Bay",
|
||||||
nav_about: "关于芽庄",
|
nav_about: "关于芽庄",
|
||||||
nav_attractions: "热门景点",
|
nav_attractions: "热门景点",
|
||||||
@@ -792,6 +803,7 @@
|
|||||||
},
|
},
|
||||||
de: {
|
de: {
|
||||||
page_title: "Nha Trang — Vietnams Küstenparadies",
|
page_title: "Nha Trang — Vietnams Küstenparadies",
|
||||||
|
meta_description: "Entdecken Sie Nha Trang: Sehenswürdigkeiten, Wetter, lokale Küche und Ausflüge.",
|
||||||
logo_sub: "Paradiesische Bucht",
|
logo_sub: "Paradiesische Bucht",
|
||||||
nav_about: "Über Nha Trang",
|
nav_about: "Über Nha Trang",
|
||||||
nav_attractions: "Sehenswürdigkeiten",
|
nav_attractions: "Sehenswürdigkeiten",
|
||||||
@@ -881,6 +893,7 @@
|
|||||||
},
|
},
|
||||||
fr: {
|
fr: {
|
||||||
page_title: "Nha Trang — Le paradis côtier du Vietnam",
|
page_title: "Nha Trang — Le paradis côtier du Vietnam",
|
||||||
|
meta_description: "Découvrez Nha Trang : sites incontournables, météo, cuisine locale et excursions.",
|
||||||
logo_sub: "Baie paradisiaque",
|
logo_sub: "Baie paradisiaque",
|
||||||
nav_about: "À propos de Nha Trang",
|
nav_about: "À propos de Nha Trang",
|
||||||
nav_attractions: "Sites à découvrir",
|
nav_attractions: "Sites à découvrir",
|
||||||
@@ -970,6 +983,15 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const languageLocales = {
|
||||||
|
vi: 'vi_VN',
|
||||||
|
ru: 'ru_RU',
|
||||||
|
en: 'en_US',
|
||||||
|
zh: 'zh_CN',
|
||||||
|
de: 'de_DE',
|
||||||
|
fr: 'fr_FR'
|
||||||
|
};
|
||||||
|
|
||||||
let currentLang = 'vi';
|
let currentLang = 'vi';
|
||||||
let currentWeatherCondition = 'weather_loading';
|
let currentWeatherCondition = 'weather_loading';
|
||||||
|
|
||||||
@@ -1028,7 +1050,13 @@
|
|||||||
return 'vi';
|
return 'vi';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getRequestedLanguage() {
|
||||||
|
const requested = new URLSearchParams(window.location.search).get('lang');
|
||||||
|
return translations[requested] ? requested : null;
|
||||||
|
}
|
||||||
|
|
||||||
function setLanguage(lang) {
|
function setLanguage(lang) {
|
||||||
|
if (!translations[lang]) lang = 'vi';
|
||||||
currentLang = lang;
|
currentLang = lang;
|
||||||
document.querySelectorAll('[data-i18n]').forEach(el => {
|
document.querySelectorAll('[data-i18n]').forEach(el => {
|
||||||
const key = el.getAttribute('data-i18n');
|
const key = el.getAttribute('data-i18n');
|
||||||
@@ -1051,6 +1079,17 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
document.documentElement.lang = lang;
|
document.documentElement.lang = lang;
|
||||||
|
const languageUrl = new URL(window.location.href);
|
||||||
|
languageUrl.searchParams.set('lang', lang);
|
||||||
|
history.replaceState(null, '', `${languageUrl.pathname}${languageUrl.search}${languageUrl.hash}`);
|
||||||
|
|
||||||
|
const canonicalUrl = new URL(`/?lang=${lang}`, window.location.origin).href;
|
||||||
|
document.getElementById('canonical-url').href = canonicalUrl;
|
||||||
|
document.getElementById('meta-description').content = translations[lang].meta_description;
|
||||||
|
document.getElementById('og-title').content = translations[lang].page_title;
|
||||||
|
document.getElementById('og-description').content = translations[lang].meta_description;
|
||||||
|
document.getElementById('og-url').content = canonicalUrl;
|
||||||
|
document.getElementById('og-locale').content = languageLocales[lang];
|
||||||
renderWeatherCondition();
|
renderWeatherCondition();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1104,8 +1143,7 @@
|
|||||||
document.getElementById('success-modal').classList.add('hidden');
|
document.getElementById('success-modal').classList.add('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize from browser language preferences
|
setLanguage(getRequestedLanguage() || getPreferredLanguage());
|
||||||
setLanguage(getPreferredLanguage());
|
|
||||||
loadCurrentWeather();
|
loadCurrentWeather();
|
||||||
setInterval(loadCurrentWeather, 30 * 60 * 1000);
|
setInterval(loadCurrentWeather, 30 * 60 * 1000);
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+87
-2
@@ -1,6 +1,91 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||||
|
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
|
||||||
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
<url>
|
<url>
|
||||||
<loc>https://kyduyen.duckdns.org/</loc>
|
<loc>https://kyduyen.duckdns.org/?lang=vi</loc>
|
||||||
|
<lastmod>2026-10-14</lastmod>
|
||||||
|
<xhtml:link rel="alternate" hreflang="vi" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://kyduyen.duckdns.org/?lang=ru" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://kyduyen.duckdns.org/?lang=en" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="zh" href="https://kyduyen.duckdns.org/?lang=zh" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="de" href="https://kyduyen.duckdns.org/?lang=de" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="fr" href="https://kyduyen.duckdns.org/?lang=fr" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
<image:image>
|
||||||
|
<image:loc>https://kyduyen.duckdns.org/images/ThapBa.png</image:loc>
|
||||||
|
<image:caption>Tháp Bà Ponagar, quần thể kiến trúc đền tháp Champa cổ kính trên đồi cao hướng ra sông Cái.</image:caption>
|
||||||
|
</image:image>
|
||||||
|
<image:image>
|
||||||
|
<image:loc>https://kyduyen.duckdns.org/images/VinWonders.jpg</image:loc>
|
||||||
|
<image:caption>VinWonders Nha Trang trên đảo Hòn Tre, với cáp treo vượt biển, công viên nước và thủy cung.</image:caption>
|
||||||
|
</image:image>
|
||||||
|
<image:image>
|
||||||
|
<image:loc>https://kyduyen.duckdns.org/images/seafood.jpg</image:loc>
|
||||||
|
<image:caption>Hải sản tươi sống Nha Trang: tôm hùm, mực nướng và các loại ốc tại nhà hàng ven biển.</image:caption>
|
||||||
|
</image:image>
|
||||||
|
<image:image>
|
||||||
|
<image:loc>https://kyduyen.duckdns.org/images/BunCa.jpg</image:loc>
|
||||||
|
<image:caption>Phở và bún cá Nha Trang với hương vị thanh ngọt đặc trưng của biển.</image:caption>
|
||||||
|
</image:image>
|
||||||
|
<image:image>
|
||||||
|
<image:loc>https://kyduyen.duckdns.org/images/BanhXeoMuc.jpg</image:loc>
|
||||||
|
<image:caption>Bánh xèo mực Nha Trang giòn rụm, ăn kèm rau sống và nước mắm chua ngọt.</image:caption>
|
||||||
|
</image:image>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://kyduyen.duckdns.org/?lang=ru</loc>
|
||||||
|
<lastmod>2026-10-14</lastmod>
|
||||||
|
<xhtml:link rel="alternate" hreflang="vi" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://kyduyen.duckdns.org/?lang=ru" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://kyduyen.duckdns.org/?lang=en" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="zh" href="https://kyduyen.duckdns.org/?lang=zh" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="de" href="https://kyduyen.duckdns.org/?lang=de" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="fr" href="https://kyduyen.duckdns.org/?lang=fr" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://kyduyen.duckdns.org/?lang=en</loc>
|
||||||
|
<lastmod>2026-10-14</lastmod>
|
||||||
|
<xhtml:link rel="alternate" hreflang="vi" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://kyduyen.duckdns.org/?lang=ru" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://kyduyen.duckdns.org/?lang=en" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="zh" href="https://kyduyen.duckdns.org/?lang=zh" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="de" href="https://kyduyen.duckdns.org/?lang=de" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="fr" href="https://kyduyen.duckdns.org/?lang=fr" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://kyduyen.duckdns.org/?lang=zh</loc>
|
||||||
|
<lastmod>2026-10-14</lastmod>
|
||||||
|
<xhtml:link rel="alternate" hreflang="vi" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://kyduyen.duckdns.org/?lang=ru" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://kyduyen.duckdns.org/?lang=en" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="zh" href="https://kyduyen.duckdns.org/?lang=zh" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="de" href="https://kyduyen.duckdns.org/?lang=de" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="fr" href="https://kyduyen.duckdns.org/?lang=fr" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://kyduyen.duckdns.org/?lang=de</loc>
|
||||||
|
<lastmod>2026-10-14</lastmod>
|
||||||
|
<xhtml:link rel="alternate" hreflang="vi" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://kyduyen.duckdns.org/?lang=ru" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://kyduyen.duckdns.org/?lang=en" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="zh" href="https://kyduyen.duckdns.org/?lang=zh" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="de" href="https://kyduyen.duckdns.org/?lang=de" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="fr" href="https://kyduyen.duckdns.org/?lang=fr" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>https://kyduyen.duckdns.org/?lang=fr</loc>
|
||||||
|
<lastmod>2026-10-14</lastmod>
|
||||||
|
<xhtml:link rel="alternate" hreflang="vi" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="ru" href="https://kyduyen.duckdns.org/?lang=ru" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="en" href="https://kyduyen.duckdns.org/?lang=en" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="zh" href="https://kyduyen.duckdns.org/?lang=zh" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="de" href="https://kyduyen.duckdns.org/?lang=de" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="fr" href="https://kyduyen.duckdns.org/?lang=fr" />
|
||||||
|
<xhtml:link rel="alternate" hreflang="x-default" href="https://kyduyen.duckdns.org/?lang=vi" />
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
||||||
Reference in new issue
Block a user