-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ld+json structured data option #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Type: Enhancement
PR Summary: The pull request introduces a new feature to the MetaPlugin class by adding an option to include structured data in the form of JSON-LD to the head of the page. This feature is controlled by a configuration option 'add_ld+json' which is set to false by default. The PR also includes refactoring to optimize the retrieval of git information used in the footer for pages where dates and authors are added.
Decision: Comment
π Type: 'Enhancement' - not supported yet.
- Sourcery currently only approves 'Typo fix' PRs.
β Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
π Complexity: the changes are too large or complex for Sourcery to approve.
- Unsupported files: the diff contains files that Sourcery does not currently support during reviews.
General suggestions:
- Ensure that the JSON-LD content is properly escaped to prevent potential security risks such as injection attacks.
- Consider making the author information in the JSON-LD content configurable to cater to different users or extracting it from the page metadata or repository configuration.
- Review the default value for the 'add_ld+json' configuration option to ensure it aligns with the common use cases and user expectations for the plugin.
Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? β¨
"url": "https://ultralytics.com/" | ||
}] | ||
} | ||
ld_json_script.string = json.dumps(ld_json_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (llm): Ensure that the JSON-LD content is properly escaped to prevent injection attacks or issues when rendering the script tag content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sourcery-ai how can I do this?
π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Enhanced MkDocs plugin with structured data and improved documentation metadata.
π Key Changes
add_ld+json
to include structured data (LD+JSON
) in the page header.0.0.43
.π― Purpose & Impact
LD+JSON
) will help search engines better understand the content of the pages, potentially improving page rankings and visibility. π