Closed jordanlambrecht closed 1 year ago
Hey @jordanlambrecht, it looks like your are obfuscating page links. In that case, it's working as expected. Part of the point of react-obfuscate is to obfuscate email addresses, other text, or [in this case] links that you don't want picked up by a crawler (e.g. Google Search Console).
For the pages in your screenshot, I recommend that you do not obfuscate those links.
Hey @coston, I don't think I am. Here are two examples of my code:
import Obfuscate from 'react-obfuscate'
export const Footer: NextPage = () => {
return (
<li className='mt-3 text-xl text-cream'>
<Obfuscate tel={'402-302-0323'} className={'text-cream '}>
402 302 0323
</Obfuscate>
</li>
)
}
export default Footer
import Obfuscate from 'react-obfuscate'
const About_Team_Header = ({ source, frontMatter }) => {
return (
<Obfuscate
email={frontMatter.email}
className={'block italic text-peach cursor-pointer text-left'}
/>
)
}
export default About_Team_Header
@jordanlambrecht you are right. I get what the problem is now. 🎯 Because the email link href is "obfuscated", Google Search Console interprets it to be a relative link.
Quick solution: using the linkText
prop, create your own obfuscated placeholder with the mailto:
prefix (e.g. mailto:obfuscated
.)
Package improvement: include all the Common Options prefixes in the obfuscated href so that contact urls aren't captured by crawlers as navigation links.
@jordanlambrecht please let me know what you think about my analysis of the problem and the solution. Also, are you interested in contributing the package improvement?
@coston am I a dick if I do linktext={'tel:911'}
But yup! Confirmed. That worked. Thank you!
@coston thanks for creating this plugin. I wonder if by default the href attribute before human iteration should be generated with the prefix of the link used: email, tel, sms, etc. as appropriate and thus avoid issues with crawlers. Glad to submit a PR if you agree.
Hiya,
Screaming Frog and Google Search Console are picking up on ghost pages generated by ROE. Any ideas why or how to fix it?