How to use the @times-components/markup-forest.renderTreeArrayAsText function in @times-components/markup-forest

To help you get started, we’ve selected a few @times-components/markup-forest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newsuk / times-components / packages / topic / src / head.web.js View on Github external
function Head({ description, name, slug }) {
  const content =
    description && description.length
      ? renderTreeArrayAsText(description).substring(0, 200)
      : `Discover expert ${name} articles from The Times and The Sunday Times.`;

  return (
    
      {({ makeTopicUrl }) => (
        
          <title>{name} | The Times &amp; The Sunday Times</title>
          
          
        
      )}
    
  );
}
github newsuk / times-components / packages / author-profile / src / head.web.js View on Github external
function Head({ description, name }) {
  const content =
    description &amp;&amp; description.length
      ? renderTreeArrayAsText(description).substring(0, 200)
      : `Get up to date information and read all the latest articles from ${name}.`;
  return (
    
      <title>{name} | The Times &amp; The Sunday Times</title>
      
    
  );
}

@times-components/markup-forest

Utility functions for traversing The Times' AST

BSD-3-Clause
Latest version published 8 months ago

Package Health Score

80 / 100
Full package analysis