-
Notifications
You must be signed in to change notification settings - Fork 0
add a whitelist of domains for links in content #95
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
base: astro
Are you sure you want to change the base?
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.
Pull request overview
This pull request adds domain whitelisting functionality for content links, allowing configuration of SEO-friendly link attributes based on whether domains are whitelisted. The feature enables automatic addition of nofollow and noindex attributes to non-whitelisted external links in paragraph content, while allowing custom rel attributes for whitelisted domains.
Changes:
- New
SeoLinkHelpermodule to process HTML links and apply rel attributes based on domain whitelist configuration - Configuration schema additions in
SEOWebsitesConfigfor domain whitelist settings - Integration of link processing in
ParagraphBlockcomponent after link replacement - Version bump from 4.4.3 to 4.5.0 (appropriate for a minor feature addition)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/helpers/SeoLinkHelper.ts | New helper module that processes HTML anchor tags, checks domains against whitelist, and applies appropriate rel attributes |
| src/helpers/ConfigHelper.ts | Added ConfigHelper_getContentLinksConfig function to retrieve content links configuration |
| src/configs/SEOWebsitesConfig.ts | Added configuration schema for contentLinks including domain whitelist and rel attribute settings |
| src/components/widgets/Story/StoryContent/StoryContentBlocks/ParagraphBlock.astro | Integrated SeoLinkHelper processing after LinkReplacerHelper |
| package.json | Version bumped to 4.5.0 for minor feature addition |
No description provided.