{"id":14008635,"url":"https://github.com/coldnew/hexo-renderer-org","last_synced_at":"2025-08-20T12:32:31.212Z","repository":{"id":18246229,"uuid":"44906608","full_name":"coldnew/hexo-renderer-org","owner":"coldnew","description":"Hexo renderer plugin for emacs org-mode","archived":false,"fork":false,"pushed_at":"2023-06-22T06:25:31.000Z","size":634,"stargazers_count":166,"open_issues_count":36,"forks_count":38,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-12-09T18:39:56.813Z","etag":null,"topics":["emacs","hexo","org-mode"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"CodeFalling/hexo-renderer-org","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coldnew.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-25T11:08:48.000Z","updated_at":"2024-11-05T18:48:09.000Z","dependencies_parsed_at":"2024-05-01T23:54:51.929Z","dependency_job_id":"33777fdb-4c7f-4a51-8cf3-45bb3f186120","html_url":"https://github.com/coldnew/hexo-renderer-org","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fhexo-renderer-org","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fhexo-renderer-org/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fhexo-renderer-org/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fhexo-renderer-org/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coldnew","download_url":"https://codeload.github.com/coldnew/hexo-renderer-org/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230423564,"owners_count":18223435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","hexo","org-mode"],"created_at":"2024-08-10T11:01:57.223Z","updated_at":"2024-12-19T11:13:20.597Z","avatar_url":"https://github.com/coldnew.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\n[[https://github.com/coldnew/hexo-renderer-org/raw/master/icon.png]]\n\n[[https://hexo.io][Hexo]] renderer plugin for emacs [[https://orgmode.org/][org-mode]].\n\n[[https://circleci.com/gh/coldnew/hexo-renderer-org][https://circleci.com/gh/coldnew/hexo-renderer-org.svg?style=svg]]\n\n[[https://coldnew.github.io/hexo-org-example/2017/03/05/getting-started-with-hexo-and-org-mode/][Getting Started Guide]]\n\n* Table of Contents                                               :TOC_2_gh:\n- [[#installation][Installation]]\n- [[#options][Options]]\n  - [[#for-highlightjs-user][For highlight.js user]]\n  - [[#for-htmlize-user][For htmlize user]]\n  - [[#full-options-documentation][Full options documentation]]\n- [[#create-post][Create Post]]\n- [[#front-matters][Front-matters]]\n- [[#tutorials][Tutorials]]\n- [[#q--a][Q \u0026 A]]\n  - [[#which-org-mode-version-do-you-use-][Which org-mode version do you use ?]]\n  - [[#how-to-add-read-more-button-][How to add Read more button ?]]\n  - [[#how-to-install-my-emacs-theme][How to install my emacs theme]]\n  - [[#can-i-clean-cachedir-when-use-hexo-clean-][Can I clean cachedir when use hexo clean ?]]\n  - [[#how-can-i-add-line-number-on-src-block-][How can I add line-number on src-block ?]]\n  - [[#i-dont-want-to-use-emacs-daemon][I don't want to use emacs daemon]]\n  - [[#can-i-drag-and-drop-image-to-org-files-][Can I drag and drop image to org files ?]]\n\n* Installation\n\n  Switch to your hexo blog directory and run:\n\n  #+BEGIN_SRC sh\n    npm install https://github.com/coldnew/hexo-renderer-org#master --save\n  #+END_SRC\n\n  Then restart your hexo server.\n\n* Options\n\n  You can configure this plugin in ~_config.yml~ according to the backend you want to use.\n\n** For highlight.js user\n\n   If [[https://highlightjs.org/][highlight.js]] is enough for you, here's the minimal config:\n\n   #+BEGIN_SRC yaml\n     org:\n       emacs: 'emacs'\n       emacsclient: 'emacsclient'\n   #+END_SRC\n\n** For htmlize user\n\n   If you want to use emacs's [[https://www.emacswiki.org/emacs/Htmlize][htmlize]] to syntax highlight your code block, you can use this config instead:\n\n  #+BEGIN_SRC yaml\n    org:\n      emacs: 'emacs'\n      emacsclient: 'emacsclient'\n      htmlize: true       # \u003c--- for htmlize user, this MUST set true\n      theme: 'leuven'\n  #+END_SRC\n\n** Full options documentation\n\n   Some options may not uesed on above example, here's the doc:\n\n  | config      | description                              | default value                                              |\n  |-------------+------------------------------------------+------------------------------------------------------------|\n  | emacs       | executable file of emacs                 | emacs                                                      |\n  | emacsclient | executable file of emacsclient           | emacsclient                                                |\n  | common      | common org content you'll use            | #+OPTIONS: toc:nil num:nil\\n#+BIND: org-html-postamble nil |\n  | cachedir    | where cache file located                 | ./hexo-org-cache/                                          |\n  | clean_cache | set true to clean cache by 'hexo clean'  | false                                                      |\n  | theme       | emacs's theme you want to use            |                                                            |\n  | user_config | extra emacs config you want to load      |                                                            |\n  | htmlize     | use emacs's htmlize to syntax highlight  | false                                                      |\n  | line_number | Enable line-number globally on src-block | false                                                      |\n  | debug       | Show more debug message                  | false                                                      |\n  | daemonize   | Enable/Disable use emacs server          | true                                                       |\n\n* Create Post\n\n  Create =source/_posts/foobar.org= with followin content:\n\n  #+BEGIN_SRC org\n    ,#+TITLE: Hello World\n    ,#+DATE: \u003c2017-03-05 Sun 08:52\u003e\n    ,#+LAYOUT: post\n    ,#+CATEGORIES: org-mode\n    ,#+TAGS: hexo, org-mode\n\n    Welcome to [[https://github.com/coldnew/hexo-renderer-org][coldnew/hexo-renderer-org]]!\n\n    ,#+HTML: \u003c!-- more --\u003e\n\n    You also can add some code block:\n\n    ,#+BEGIN_SRC js\n      console.log(\"hi\");\n    ,#+END_SRC\n  #+END_SRC\n* Front-matters\n\n  [[https://orgmode.org/][org-mode]] has it's own way to describe the [[https://hexo.io/docs/front-matter.html][front-matter]].\n\n  | Front-matter | org-mode     | value                                                      |\n  |--------------+--------------+------------------------------------------------------------|\n  | layout       | #+LAYOUT     | post/page                                                  |\n  | title        | #+TITLE      | string                                                     |\n  | date         | #+DATE       | \u003c2017-04-15 Sat 12:30\u003e, use ~M-x org-time-stamp~ to insert |\n  | updated      | #+UPDATED    | \u003c2017-04-15 Sat 12:30\u003e, use ~M-x org-time-stamp~ to insert |\n  | comments     | #+COMMENTS   | yes/no                                                     |\n  | tags         | #+TAGS       | tag1, tag2, tag3                                           |\n  | categories   | #+CATEGORIES | string                                                     |\n\n  To insert date in org-mode, the default keybinding is =C-c .=, you can also use =C-u C-c .= instead.\n\n* Tutorials\n\n  For more tutorials, please see:\n\n  - [[https://coldnew.github.io/hexo-org-example/2017/03/05/getting-started-with-hexo-and-org-mode/][Getting started with hexo and org-mode]]\n\n* Q \u0026 A\n\n** Which org-mode version do you use ?\n\n   This renderer *ONLY* support =org-mode 9.x= syntax, be careful there's some [[http://orgmode.org/Changes.html][conflict]] with org-mode 9.x and 8.x.\n\n   If you really want to use org-mode 8.x, here's the [[https://coldnew.github.io/hexo-org-example/2017/04/26/tips-for-org-mode-8-user/][guide.]]\n\n** How to add Read more button ?\n\n   Place =#+HTML: \u003c!-- more --\u003e= in where you would like to add a ~Read more~.\n\n** How to install my emacs theme\n\n   If the emacs theme you want to use is not installed by default, you can setup the ~_config.yml~\n\n   For example, if we want to use [[https://github.com/kuanyui/moe-theme.el][moe-theme]] for your code block, we need to edit =_config.yml= like this:\n\n   #+BEGIN_SRC yaml\n       org:\n         # skip ...\n         theme: 'moe-dark'\n         user_config: './emacs/init.el'\n   #+END_SRC\n\n   Then add following code to your =./emacs/init.el=.\n\n   #+BEGIN_SRC emacs-lisp\n     ;; install moe-theme and use it\n     (package-install 'moe-theme)\n     (require 'moe-theme)\n   #+END_SRC\n\n** Can I clean cachedir when use hexo clean ?\n\n   If you want to make =hexo clean= work with [[https://github.com/coldnew/hexo-renderer-org][hexo-renderer-org]], you can setup your ~_config.yml~.\n\n   #+BEGIN_SRC yaml\n       org:\n         # skip ...\n         clean_cache: true\n   #+END_SRC\n\n   Note that the emacs-lisp cache in cachedir will be kept after =hexo clean=, you can manually remove it if you want to re-fetch all emacs-lisp plugin.\n** How can I add line-number on src-block ?\n\n   You can add following to your =_config.yml= to make line-number display on your src-block globally:\n\n   #+BEGIN_SRC yaml\n      org:\n        # Make src-block has line-number (this won't make effect on example-block)\n        line_number: true\n   #+END_SRC\n\n   Or use org-mode's [[http://orgmode.org/manual/Literal-examples.html][standard method]] to add line-number manually:\n\n   #+BEGIN_SRC org\n     ,#+BEGIN_SRC js -n\n        console.log(\"This is line 1\")\n     ,#+END_SRC\n   #+END_SRC\n** I don't want to use emacs daemon\n\n   If you still want to use [[https://github.com/CodeFalling/hexo-renderer-org][CodeFalling/hexo-renderer-org]] method, which start emacs process to render post instead of using emacs daemon, you can switch to emacs process by setting =_config.xml=\n\n   #+BEGIN_SRC yaml\n     org:\n       # disable use emacs server by set 'false'\n       daemonize: false\n   #+END_SRC\n** Can I drag and drop image to org files ?\n\nYes, first you need to install [[https://github.com/abo-abo/org-download][org-download]] to your emacs.\n\nThen add following to =.dir-locals.el= at the top of your hexo project:\n\n#+BEGIN_SRC emacs-lisp\n  ((nil .\n        ((eval .\n               (progn\n\n                 ;; make drag-and-drop image save in the same name folder as org file\n                 ;; ex: `aa-bb-cc.org' then save image test.png to `aa-bb-cc/test.png'\n                 (defun my-org-download-method (link)\n                   (let ((filename\n                          (file-name-nondirectory\n                           (car (url-path-and-query\n                                 (url-generic-parse-url link)))))\n                         (dirname (file-name-sans-extension buffer-file-name) ))\n                     ;; if directory not exist, create it\n                     (unless (file-exists-p dirname)\n                       (make-directory dirname))\n                     ;; return the path to save the download files\n                     (expand-file-name filename dirname)))\n\n                 ;; only modify `org-download-method' in this project\n                 (setq-local org-download-method 'my-org-download-method)\n\n                 )))))\n#+END_SRC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Fhexo-renderer-org","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldnew%2Fhexo-renderer-org","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Fhexo-renderer-org/lists"}