blog-admin 挂了。。。

忽然想写博客,结果 m-x 愣是没找到有 blog-admin-start。 我用的 blog-admin 是最新版本。删掉 package 以后不管是 melpa-cn 还是 github 的重新安装都不起作用。 不知道有谁和我有一样的问题。 已经提了 issue。

顺带贴上错误信息:

Warning (bytecomp): the following functions are not known to be defined:
    blog-admin--table-current-file, blog-admin-refresh
Warning (bytecomp): Unused lexical argument ‘file-attributes’
Warning (bytecomp): Unused lexical variable ‘output’
Warning (bytecomp): macro ‘blog-admin-backend-nikola--with-venv’ defined too late
Warning (bytecomp): the following functions are not known to be defined:
    blog-admin--table-current-file, blog-admin-refresh,
    org-next-visible-heading
Warning (bytecomp): reference to free variable ‘op/category-ignore-list’
Warning (bytecomp): assignment to free variable ‘op/category-ignore-list’
Warning (bytecomp): reference to free variable ‘op/category-ignore-list’
Warning (bytecomp): reference to free variable ‘op/site-preview-directory’
Warning (bytecomp): the following functions are not known to be defined:
    blog-admin--table-current-file, blog-admin-refresh, op/do-publication

然后我用 vim 发了个文章。

嗯。似乎是 layer 配置的问题。作者忘记更新插件后在 README 上家加:command blog-admin-start 把更改后的配置贴上。

(defun social/init-blog-admin ()
  "Initialize blog-admin"
  (use-package blog-admin
    :defer t
    :commands blog-admin-start
    :init
    ;; Keybinding
    (spacemacs/set-leader-keys "ab" 'blog-admin-start)
    :config
    (progn
      ;; Open post after create new post
      (add-hook 'blog-admin-backend-after-new-post-hook 'find-file)
      ;; Hexo
      (setq blog-admin-backend-path "~/blog")
      (setq blog-admin-backend-type 'hexo)
      ;; create new post in drafts by default
      (setq blog-admin-backend-new-post-in-drafts t)
      ;; create same-name directory with new post
      (setq blog-admin-backend-new-post-with-same-name-dir t)
      ;; default assumes _config.yml
      (setq blog-admin-backend-hexo-config-file "_config.yml"))
    )
  )

我是作者,放假回来没怎么逛论坛 :joy: 谢谢你专业的 issue

嗯。幸苦了。其实我是在这里看到有安利blog-admin去用的