Skip to content
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

feat: support custom robots content or disable tags #750

Closed

Conversation

dgrebb
Copy link

@dgrebb dgrebb commented Jul 14, 2023

Description

Added a robots property which will either pass the meta tags' content via string (and include robotsProps if set), or disable the meta tags entirely.

Fixes #749

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Tested within the project as well as locally via patching as well as pnpm i /system-path/to/svelte-meta-tags in local project.

  • pnpm test
  • manually via pnpm build && pnpm preview

Checklist:

  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@changeset-bot
Copy link

changeset-bot bot commented Jul 14, 2023

🦋 Changeset detected

Latest commit: 0c67ce2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte-meta-tags Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dgrebb dgrebb force-pushed the feature/custom-robots-content-string branch from b429d8b to 0fe92d0 Compare July 14, 2023 15:56
@oekazuma
Copy link
Owner

Thanks for your contribution!

We already have properties to control noindex and nofollow, but is that not enough?

@dgrebb
Copy link
Author

dgrebb commented Jul 18, 2023

@oekazuma to each their own. In my particular situation my SEO is controlled via fields in a CMS. In this case, both noindex and nofollow are passed as one string to the content attribute. Splitting up the CMS fields is a no-can do.

I'm fine with patching this myself but wanted to throw it out there in case it ever comes up :)

Cheers!

@oekazuma
Copy link
Owner

I am looking to support a variety of use cases. However, we are concerned that adding a robots property would complicate the properties that affect the robots element.

I'm still struggling with what to do, but I'm wondering if integrating the robots feature with the robotsProps feature might be a solution?

@dgrebb
Copy link
Author

dgrebb commented Jul 19, 2023

@oekazuma understood. Closing this for now, and will find some time to change things around in a separate PR.

Thank you for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom robots and googlebot content
2 participants