npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hexo-lute

v1.1.1

Published

A markdown renderer based on Lute

Downloads

2

Readme

hexo-lute

npm version MIT license travis code size

A markdown renderer for Hexo based on Lute.

Installations

Make sure you have existed markdown renderer uninstalled:

  • hexo-renderer-marked - The default markdown renderer shipped with Hexo.
  • hexo-renderer-markdown-it - Another official markdown renderer made by Hexo.

Then install hexo-lute with following command:

$ npm i hexo-lute --save
# yarn add hexo-lute # if you prefer yarn

Configuration

The default behavior of hexo-lute is nearly the same as hexo-renderer-marked with default configuration.

You can configure this plugin in _config.yml to enable extra features.

lute:
  gfm: true # Enabled by default
  breaks: true # Enabled by default
  header_id: true # Enabled by default
  autolink: true # Enabled by default
  emoji: false # Disabled by default
  prepend_root: false # Disabled by default
  sanitize: false # Disabled by default
  lazyload: false # Disabled by default
  lazyload_src: ''
  github_todo_list: false # Disabled by default
  github_todo_list_class: 'task-list'
  fix_term_typo: false # Disabled by default
  auto_space: false # Disabled by default
  chinese_punct: false # Disabled by default
  • gfm: GitHub flavored markdown
  • breaks: Treats soft break as a hard break, just like GitHub Issues.
  • header_id: Insert header id, e.g. <h1 id="text">text</h1>. Useful for inserting anchor link to each paragraph with a heading.
  • autolink: Enable autolink for URLs. E.g. https://hexo.io will become <a href="https://hexo.io">https://hexo.io</a>.
  • emoji: Emoji support. E.g. :heart: will become ❤️.
  • prepend_root: Prepend config.root value to internal image url & relative link.
  • sanitize: Basic XSS filter based on bluemonday. Please just don't rely on it.
  • lazyload: Enable lazyload for image. The original src will then become data-src.
  • lazyload_src: Set a new src after original src became data-src. Useful for a placeholder (small "loading" gif things).
    • If lazyload is set to true and lazyload_src is unset or empty, data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs= will be use then.
  • github_todo_list: GFM Todo List support.
  • github_todo_list_class: The class name for GFM Todo List support, useful for styling.
  • fix_term_typo: Enable some coding term correction (e.g. Github => GitHub, jquery => jQuery, etc.)
  • auto_space: Add a space between CJK character and other characters.
  • chinese_punct: Replace the English punctuation to Chinese punctuation (punctuation between Chinese words only).

Performance

  Benchmark
    ✓ hexo-lute (324ms)
    ✓ hexo-renderer-marked (41ms)

It shows that hexo-lute is 7x slower than hexo-renderer-marked. But hexo-lute could be faster under specific circumstances (shorter & simpler posts).

License

MIT License

Maintainer

hexo-lute © Sukka, Released under the MIT License. Authored and maintained by Sukka with help from contributors (list).

Personal Website · Blog · GitHub @SukkaW · Telegram Channel @SukkaChannel · Twitter @isukkaw · Keybase @sukka