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-renderer-org

v0.2.6

Published

Emacs org-mode render plugin for hexo

Downloads

25

Readme

[[https://travis-ci.org/CodeFalling/hexo-renderer-org][https://travis-ci.org/CodeFalling/hexo-renderer-org.svg]] [[https://www.npmjs.com/package/hexo-renderer-org][https://badge.fury.io/js/hexo-renderer-org.svg]]

  • Table of Contents :TOC_4_org:
    • [[hexo-renderer-org][hexo-renderer-org]]
    • [[Usage][Usage]]
  • [[Options][Options]]
    • [[A more functional example][A more functional example]]
  • [[How to create new post][How to create new post]]
  • [[Q&A][Q&A]]
    • [[How to add ~Read more~ button?][How to add ~Read more~ button?]]
    • [[How to set caption of image?][How to set caption of image?]]
    • [[Old pure-js version][Old pure-js version]]
    • [[Front-matter not work?][Front-matter not work?]]
    • [[How to enable line number?][How to enable line number?]]
  • hexo-renderer-org

Hexo renderer plugin for emacs org-mode

中文动态:[[https://codefalling.com/tags/hexo-renderer-org/][标签: hexo-renderer-org | M-x codefalling]]

  • Usage

Cd to your hexo blog.Run

#+BEGIN_SRC shell npm install https://github.com/CodeFalling/hexo-renderer-org#emacs --save #+END_SRC

You can also install it from npm,too.

Then restart your hexo server.

  • Options

You can configure this plugin in ~_config.yml~.

#+BEGIN_SRC yml org: emacs: '/Applications/Emacs.app/Contents/MacOS/Emacs' common: | #+OPTIONS: toc:nil #+BIND: org-html-postamble "Last Updated %C.Render by hexo-renderer-org with %c" cachedir: './hexo-org-cache/' #+END_SRC

  1. ~emacs~ is execute file of emacs
  2. ~common~ is common org content or you want to insert before renderer every org file.This is a example to disable toc.
  3. ~cachedir~ is where your cache file located.With this option ~hexo-org-renderer~ will enable cache. Recommend for a much faster speed. Default enable.

** A more functional example #+BEGIN_SRC yml org: emacs: '/Applications/Emacs.app/Contents/MacOS/Emacs'
common: | #+OPTIONS: toc:nil num:nil #+BEGIN_HTML function editAtGithub(isRaw){ var url_parts = document.location.pathname.split('/'); var postname = url_parts[url_parts.length - 2]; if(url_parts.length == 3){ // is a page(wiki about etc) postname = postname + '/index.org'; }else{ postname = '_posts/' + postname + '.org'; } var url = 'https://github.com/CodeFalling/codefalling.com/tree/source/source/' + postname; if(isRaw) url = 'https://raw.githubusercontent.com/CodeFalling/codefalling.com/source/source/' + postname; window.open(url); } #+END_HTML #+BIND: org-html-postamble "Edit Me at Github - Org Source - Last Updated %C.Render by hexo-renderer-org with %c" #+END_SRC

This example add a ~Edit Me at Github - Org Source~ at every org page.

  • How to create new post

Create ~balbala.org~ in source/_posts/,there is a template:

#+BEGIN_SRC org ,#+TITLE: Hello,orgmode ,#+DATE: <2015-11-15 Sun 17:00> ,#+TAGS: emacs, orgmode, hexo ,#+LAYOUT: post ,#+CATEGORIES: orgmode ,* Orgmode ,** Why org ,#+BEGIN_SRC js console.log('hello'); ,#+END_SRC 我编不下去了。。 #+END_SRC

  • Q&A

** How to add ~Read more~ button?

Place

#+BEGIN_SRC org ,#+BEGIN_HTML

,#+END_HTML #+END_SRC

in where you would like to add a ~Read more~

** How to set caption of image? Hexo use alt as title of image.

So just use #+BEGIN_EXAMPLE #+ATTR_HTML: :alt caption [[image url]] #+END_EXAMPLE ** Old pure-js version

See [[https://github.com/CodeFalling/hexo-renderer-org/tree/old-js-version][CodeFalling/hexo-renderer-org at old-js-version]] for old pure-js version.

** Front-matter not work?

Orgmode has its own way to describe meta info of post,such as title,date etc.

| Front-matter | Orgmode | Value | |--------------+--------------+-------------------------------------------------------------------| | layout | #+LAYOUT | post/page | | title | #+TITLE | string | | date | #+DATE | <2015-11-16 Mon 20:45>, you can use ~M-x org-time-stamp~ in emacs | | comments | #+COMMENTS | yes/no | | tags | #+TAGS | tag1, tag2, tag3 | | categories | #+CATEGORIES | |

** How to enable line number? Config in your ~_config.yml~

#+BEGIN_EXAMPLE highlight: enable: true number: false #+END_EXAMPLE

** Disable number of outline

#+BEGIN_SRC yaml org: common: | #+OPTIONS: num: nil #+END_SRC