[修改中] 1 更好地发布博客日志

[学习] 1.1 使用 org-capture 自动生成 org (或 md ) 文件在 OneDrive/org/journal 目录下

[学习] 1.2 书写博客的内容

[学习] 1.3 1. 使用 org-publish 发布 html

[学习] 1.3.1 使用 org-publish-project 进行发布,直接导出为 workspace/github.io/blog 目录下,生成 html 文件

[学习] 1.4 2. 使用 ox-hugo 发布 md

[学习] 1.4.1 使用 org-hugo-export-to-md 直接导出为 workspace/awesome-hugo-blog/post 目录下, 生成 md 文件

  1. 设置

    ;; 设定`hugo的目录'
    (setq org-hugo-base-dir (expand-file-name "workspace/awesome-hugo-blog" home-directory))
    ;; ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂
    ;; 博客 blog
    ;; ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂ ✂
    ;; for Hugo
    (defvar blog-hugo-process "Hugo Server"
      "Name of 'gridsome develop' process process")
    
    (defun +modern-blog-hugo-find-dir ()
      "Open hugo blog files"
      (interactive)
      (find-file (workspace-path "awesome-hugo-blog/content/posts")))
    
    (defun +modern-blog-hugo-deploy ()
      "Run gridsome cli and push changes upstream."
      (interactive)
      (with-dir org-hugo-base-dir
                ;; deploy to github for ci
                (shell-command "cd " org-hugo-base-dir)
                (shell-command "git add .")
                (--> (current-time-string)
                     (concat "git commit -m \"" it "\"")
                     (shell-command it))
                (shell-command "git push")))
    
    (defun +modern-blog-hugo-start-server ()
      "Run gridsome server if not already running and open its webpage."
      (interactive)
      (with-dir org-hugo-base-dir
                (shell-command "cd " org-hugo-base-dir)
                (unless (get-process blog-hugo-process)
                  (start-process blog-hugo-process nil "hugo" "server"))))
    
    (defun +modern-blog-hugo-end-server ()
      "End gridsome server process if running."
      (interactive)
      (--when-let (get-process blog-hugo-process)
        (delete-process it)))
    

1.5 生成其他的物料

[学习] 1.5.1 插入 plantuml 图片

[学习] 1.5.2 发布 images 项目到 workspace/github.io/assets/images 目录下

[BUG] 1.5.3 发布 css 项目到 workspace/github.io/assets/css 目录下

[学习] 1.6 浏览你的博客!!!

[学习] 1.6.1 启动 hugo , 访问 http://localhost:1313

[学习] 1.6.2 启动 simple-httpd , 访问 http://localhost:8080

[学习] 2 其他工作

2.1 深入打好污染防治攻坚战

2.2 观看新闻联播

2.3 祝贺新华社成立90周年

2.4 ❄ 首次降雪

2.5 制作微信电子相册