jekyll风格到pandoc风格的转换(Transform)

fujohnwang

2013-03-10


两种思路

  1. 直接新起一个应用
    • 托管服务器是主要问题
    • 可以顺便玩玩Playframework
      • 新Post的发布方式
        • 手动本地执行pandoc转换
          • 定时扫描或者使用Java7+的WatchService使新Post可被访问
        • 服务器端实时部署和转换
          • linux下应该有pandoc,not a problem
          • 比较理想的方式
      • 不方便的地方
        • 不管是哪一种,如果post相关的资源多, 部署上传稍微会有些繁琐,单个文件最简单,但是特殊情况
  2. 在现有github page的基础设施上改造
    • 旧有Posts的迁移流程梳理
      • jekyll template metadata extraction (store for later usage)
      • jekyll markdown to pandoc markdown transformation
        • YAML Front Header to pandoc markdown header
        • paragraph adjustment
      • pandoc markdown to 1st-stage html
      • 1st-stage html to 2nd-stage html
        • add YAML Front Header back but without part of the headers before,say permalink
        • resource paths adjustment
      • 其它工作
        • 调整layout模版
        • 调整index.html模版
    • 新Posts发布流程
      • draft markdown document in pandoc markdown syntax
      • transform pandoc markdown document to html
        • including 1st-stage and 2nd-stage html transformation
        • 第一阶段转换区别于就有Posts转换的是,需要根据当前日期生成目标文件名,旧有的Posts转换前,文件名中已经包含了相应日期
    • 其他说明
      • 因为有些文档写完后不想以博客的形式向外发布,所以,新的post采用本地转换然后人工决定发布与否的方式,源码与github page项目分离, 只发布最终转换后的html文档
      • 结合使用了DNSPod和Github Page的DNS服务和设置
      • pandoc转换采用了自定义的template
      • 添加了google站具相应监控

Why I feels so fucked-me in this process?

wandering among solutions that all can help have this thing done, all tried, all quit but finally turn to scala, the one I am familier with and also would like to write code in it, although I know some other tools are more proper.


>>>>>> 更多阅读 <<<<<<


欢迎加入「福强私学」

跨越2190个日夜,始终坚持“实践 + 原创”打造的715125字专属知识库,囊括了(但不限于)从职场、技术、管理与商业等多个板块的内容。

  • 一个ChatGPT触达不到的地方
  • 一个带你超越AI/人工智能的地方
  • 一个与你一起成长的地方

https://afoo.me/kb.html


开天窗,拉认知,订阅「福报」,即刻拥有自己的全模态人工智能。

订阅「福报」