{"repo":"0no-co/hoofd","free":true,"listed":false,"github":"https://github.com/0no-co/hoofd","clone":"git clone https://github.com/0no-co/hoofd.git","description":"Hooks to populate the html head.","language":"TypeScript","stars":342,"topics":["head","html","react","react-hooks","seo"],"license":"MIT","category":"scrapers-browser-automation","readme_excerpt":"Hoofd This project aims at providing a set of hooks to populate , ... for each page. With crawlers now supporting client-side alterations it's important to support a fallback model for our tags. The dispatcher located in this library will always make a queue of how we should fallback, ... This way we'll always have some information to give to a visiting crawler. Or you can choose to Preact If you need support for Preact you can import from hoofd/preact instead. Gatsby There's a plugin that hooks in with Gatsby and that will fill in the meta , ... in your build process. Hooks This package exports useTitle , useTitleTemplate , useMeta , useLink and useLang . These hooks are used to control information conveyed by the in an html document. useTitle This hook accepts a string that will be used to set the document.title , every time the given string changes it will update the property. useTitleTemplate This hook accepts a string, which will be used to format the result of useTitle whenever it updates. Similar to react-helmet, the placeholder %s will be replaced with the title . useMeta This hook accepts the regular properties, being name , property , httpEquiv , charset and content . These have to be passed as an object and will update when content changes. useLink This hook accepts the regular properties, being rel , as , media , href , sizes and crossorigin . This will update within the same useLink but will never go outside useLang This hook accepts a string that will be used to","default_branch":null,"files":null,"tree":[],"storefront":"/r/0no-co","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/0no-co/hoofd/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}