Fix merge conflicts

This commit is contained in:
Jerry committed 2025-08-19 14:55:15 +08:00
commit ec1a226774
4 files changed
+22 -3

No files matched your search

+5 -1
View File
@@ -1033,7 +1033,11 @@ Open_Graph_meta:
# Structured Data # Structured Data
# https://developers.google.com/search/docs/guides/intro-structured-data # https://developers.google.com/search/docs/guides/intro-structured-data
structured_data: false structured_data:
enable: false
# Alternate name for the site, used in structured data
# Format: ['name1', 'name2']
alternate_name:
# Add the vendor prefixes to ensure compatibility # Add the vendor prefixes to ensure compatibility
css_prefix: true css_prefix: true
+12
View File
@@ -40,10 +40,22 @@ if theme.structured_data
const isRootOrSubdomain = currentPath.split('/').filter(Boolean).length === 0; const isRootOrSubdomain = currentPath.split('/').filter(Boolean).length === 0;
if (isRootOrSubdomain) { if (isRootOrSubdomain) {
const domain = new URL(config.url).hostname;
const alternateNames = theme.structured_data.alternate_name || [];
if (config.subtitle) {
alternateNames.push(config.subtitle);
}
if (domain) {
alternateNames.push(domain);
}
const jsonLd = { const jsonLd = {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "WebSite", "@type": "WebSite",
"name": config.title, "name": config.title,
"alternateName": alternateNames,
"url": full_url_for('/'), "url": full_url_for('/'),
} }
+4 -1
View File
@@ -574,7 +574,10 @@ module.exports = {
enable: true, enable: true,
option: null option: null
}, },
structured_data: false, structured_data: {
enable: false,
alternate_name: null
},
css_prefix: true, css_prefix: true,
inject: { inject: {
head: null, head: null,
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more