@bast1oncz/robots
v1.0.1
Published
Integrates features to support presentation for web crawler robots
Readme
@bast1oncz/robots
About
Solves problem with crawlers indexing react application. The provider contains basic settings, which can be overriden inside wrapped components using react hook api. It is highly recommended using this library along with some application router. Does not help robots indexing the application by generating any additional html.
Usage
Installation
npm install @bast1oncz/robotsSetup
import {RobotsProvider} from '@bast1oncz/robots'
<RobotsProvider defaultSettings={{index: true, follow: true}}>
{children}
</RobotsProviderOverride default settings inside component
import {useRobotRestriction} from '@bast1oncz/robots'
// disables robot index
useRobotRestriction('index')
// disables robot follow
useRobotRestriction('follow')