• Stars
    star
    228
  • Rank 175,267 (Top 4 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created almost 9 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Write blog in emacs with hexo/org-page/nikola

https://travis-ci.org/CodeFalling/blog-admin.svg https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg

blog-admin

https://github.com/CodeFalling/blog-admin/issues Write blog in emacs with hexo, org-page or nikola.

Preview

https://cloud.githubusercontent.com/assets/5436704/12700452/1aa686ea-c81e-11e5-92c6-5cd5e810ba35.gif

Install

Melpa

Manual

  1. git clone https://github.com/CodeFalling/blog-admin /path/to/blog-admin -b master
  2. (add-to-load-path "/path/to/blog-admin")
  3. (require 'blog-admin)
  4. You may have to install s f ctable as depends

Spacemacs

If you use a private spacemacs layer, just add blog-admin in your package.el then add below code into your private-layer-name/init-blog-admin

If you use a standalone .spacemacs file, just add blog-admin in your dotspacemacs-additional-packages, then add below code into dotspacemacs/user-config()

If installing from github(not melpa)

(blog-admin :location (recipe
                       :fetcher github
                       :repo "codefalling/blog-admin"))

in your layer’s packages, then

(use-package blog-admin
:init
(progn
  ;; your config
  (setq blog-admin-backend-type 'hexo)
  (setq blog-admin-backend-path "~/codefalling.com")
  (setq blog-admin-backend-new-post-in-drafts t)
  (setq blog-admin-backend-new-post-with-same-name-dir t)
  ))

Usage

  • (require 'blog-admin) first
  • M-x blog-admin-start to start this.
  • d to delete current post
  • w to write new post
  • s to switch between draft and categories

Open post after create new post

(add-hook 'blog-admin-backend-after-new-post-hook 'find-file)

hexo

orgmode & markdown

Both orgmode or markdown works well.You can even use them at the same time.But this plugin do nothing about render.If you want to make orgmode work with hexo,you’d better use hexo-renderer-org.

configure

(setq blog-admin-backend-path "~/blog")
(setq blog-admin-backend-type 'hexo)
(setq blog-admin-backend-new-post-in-drafts t) ;; create new post in drafts by default
(setq blog-admin-backend-new-post-with-same-name-dir t) ;; create same-name directory with new post
(setq blog-admin-backend-hexo-config-file "my_config.yml") ;; default assumes _config.yml

org-page

org-page is pure emacs static blog generator.

configure

(setq blog-admin-backend-type 'org-page)
(setq blog-admin-backend-path "~/code/blog")
(setq blog-admin-backend-new-post-in-drafts t)
(setq blog-admin-backend-new-post-with-same-name-dir t)
(setq blog-admin-backend-org-page-drafts "_drafts") ;; directory to save draft
(setq blog-admin-backend-org-page-config-file "/path/to/org-page/config.el") ;; if nil init.el is used

nikola

Nikola is Python based static blog generator that supports org-mode posts with a bunch of other formats.

To be able to use blog-admin on your Nikola site, you will need to install the tags plugin and Nikola >= 7.7.9.

configure

(setq blog-admin-backend-type 'nikola)
(setq blog-admin-backend-path "~/code/blog")
(setq blog-admin-backend-new-post-in-drafts t)
(setq blog-admin-backend-nikola-executable "~/.venvs/nikola/bin/nikola") ;; path to nikola executable
(setq blog-admin-backend-nikola-config-file "my_conf.py") ;; conf.py is default

Thanks

  1. I stole idea that operating posts in table from org-octopress.
  2. The table build on a awesome library: emacs-ctable.
  3. Thanks for s and f who provide a modern API for emacs.

More Repositories

1

CodeTerminal

Cross platform standalone terminal app extract from Visual Studio Code.
TypeScript
663
star
2

RecyclerViewSwipeDismiss

A very easy-to-use and non-intrusive implement of Swipe to dismiss for RecyclerView.
Java
429
star
3

hexo-asset-image

Give asset image in hexo a absolutely path automatically
JavaScript
321
star
4

fcitx-remote-for-osx

A simulate fcitx-remote to handle osx input method in command line
Objective-C
198
star
5

iProxy

💎 Cross platform Web debugging proxy(fork of LightProxy、Linux & 多网卡支持)
TypeScript
152
star
6

ar-demo-mobile-browser

A AR demo on mobile browser(Android yet) powered by JavaScript
JavaScript
64
star
7

nlinum-relative

Emacs relative line number besed on nlinum-mode
Emacs Lisp
60
star
8

fcitx-vim-osx

Modified fcitx.vim for osx with https://github.com/CodeFalling/fcitx-remote-for-osx
Vim Script
57
star
9

dns-proxy-https

DNS proxy server over Google HTTPS DNS Service with socks supported
JavaScript
25
star
10

react-tiny

Tiny implementation of React step by step
JavaScript
22
star
11

inoreader-app

Unofficial electron app for inoreader
HTML
21
star
12

perfbook

《前端性能揭秘》勘误 & 答疑
HTML
14
star
13

localapp

Rust CLI to convert webpage into desktop app with tauri under 3 MB
Rust
12
star
14

my.vimrc

Vim Script
5
star
15

spacemacs-private

My spacemacs private layer based on spacemacs-base
Emacs Lisp
5
star
16

nuc6i7kyk-macos-efi

EFI for nuc6i7kyk macOS Catalina
C++
5
star
17

overdom

A tiny view library with JSX, mutate(data) = mutate(DOM).
TypeScript
5
star
18

UITimeField

A iOS time input inspired by Android's timer app
Objective-C
5
star
19

fastkill

Interactive CLI to kill process with port/pid/name
Rust
4
star
20

gtrans

VIm 的谷歌翻译插件(A google translater for vim)
Python
4
star
21

universal-indent-size

Set all indent size in emacs at once
Emacs Lisp
3
star
22

smart-im-osx

A emacs plugin to make your input method on Mac smarter.
Emacs Lisp
3
star
23

fyarn

使用 taobao npm 镜像源的高速 yarn,同时支持 electorn/node-sass 等二进制安装时的加速。
JavaScript
3
star
24

commit-history

The missing GitHub commit history graph of GitHub repos
TypeScript
3
star
25

nativefier-apps

Build apps with nativefier & github actions
3
star
26

vdom

basic virtual dom
JavaScript
2
star
27

web-perf-secret

A tiny book for web performance
CSS
2
star
28

easy-password

Easy way to manage password with memory.
JavaScript
2
star
29

cerebro-mac-switch-window

Cerebro plugin to switch window on macOS
Swift
2
star
30

ts-zero

Starter project for create Typescript library with zero-configuration build/watch/test/lint
JavaScript
1
star
31

hexo-theme-clean

A minimal hexo theme fork from hexo-theme-strict
CSS
1
star
32

shell-toggle-plus

Shell-toggle for emacs that can use eshell
Emacs Lisp
1
star
33

blogsite

CSS
1
star
34

any-inspector

Inspect any state with Redux DevTools.
TypeScript
1
star
35

gdb_printers

My own modified gdb printers
Python
1
star
36

homebrew-fcitx-remote-for-osx

brew tap for https://github.com/CodeFalling/fcitx-remote-for-osx
Ruby
1
star
37

autokey-macos

My personal autokey config for macos key-binding on linux
Python
1
star
38

leetcode-es6

This is a leetcode repository created by LeetCode Extension
JavaScript
1
star