Skip to content

hexojs/hexo-renderer-jsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSX Renderer for Hexo

Author Version Repo Size

Install

npm install hexo-renderer-jsx react react-dom --save
# or use yarn:
#   yarn add hexo-renderer-jsx react react-dom

Access Hexo locals

This renderer exposes an useLocals hook for theme authors to access Hexo's locals and avoid prop-drilling.

const { useLocals } = require('hexo-renderer-jsx/use-locals');

export default function Index(props) {
  const { config, url_for } = useLocals();
  return (
    <a href={url_for('')} >
      {config.title}
    </a>
  );
}

Author

hexo-renderer-jsx © Baoshuo, Released under the MIT License.
Authored and maintained by Baoshuo with help from contributors.

Personal Website · Blog · GitHub @renbaoshuo · Twitter @renbaoshuo

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •