Skip to content

Commit

Permalink
chore: 简化结构化数据配置,移除不必要的嵌套
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepChirp committed Nov 11, 2024
1 parent e5a52d5 commit 648ca6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,7 @@ Open_Graph_meta:

# Structured Data
# https://developers.google.com/search/docs/guides/intro-structured-data
structured_data:
enable: true
structured_data: true

# Add the vendor prefixes to ensure compatibility
css_prefix: true
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/head/structured_data.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if theme.structured_data.enable && page.layout === 'post'
if theme.structured_data && page.layout === 'post'
-
// use json-ld to add structured data
Expand Down
4 changes: 1 addition & 3 deletions scripts/events/merge_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,7 @@ hexo.extend.filter.register('before_generate', () => {
enable: true,
option: null
},
structured_data: {
enable: true
},
structured_data: true,
css_prefix: true,
inject: {
head: null,
Expand Down

0 comments on commit 648ca6e

Please sign in to comment.