diff --git a/_config.yml b/_config.yml index 25c4d82a9..ad0c20c35 100644 --- a/_config.yml +++ b/_config.yml @@ -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 diff --git a/layout/includes/head/structured_data.pug b/layout/includes/head/structured_data.pug index 72173ea24..cacb02cb0 100644 --- a/layout/includes/head/structured_data.pug +++ b/layout/includes/head/structured_data.pug @@ -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 diff --git a/scripts/events/merge_config.js b/scripts/events/merge_config.js index 2bb6f7484..bff1125d3 100644 --- a/scripts/events/merge_config.js +++ b/scripts/events/merge_config.js @@ -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,