Code Monkey home page Code Monkey logo

blog-admin's Introduction

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

blog-admin

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

blog-admin

or install 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
    ;; do your configuration here
    ))

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.

blog-admin's People

Contributors

punchagan avatar syohex avatar xcodebuild avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.