我的基于新 Emacs(和 Ruby)的静态网站生成器

  • Site details: The site is built using a custom static site generator instead of Hugo. It is written in Emacs with Elisp and Ruby.
  • Blogging process: Posts are written/edit in Emacs, stored in sqlite. Ruby generates HTML by getting data from sqlite and using ERB. Rsync sends the files. Emacs can build a post, which calls the Ruby program to rebuild the post page, category page(s), and index page(s).
  • Post management: There is a list of posts in Emacs where one can create new posts (a), edit posts (e), build HTML posts and related taxonomies (r), and rsync the entire site (s). For new posts, if Id is empty, it's a new one. Fields can be filled and the post is saved in the database with C-c C-c.
  • Bookmark handling: There is a dedicated list of bookmarks to publish. Title and host are fetched automatically. One can create a new post with not yet released bookmarks.
  • Image handling: Emacs simplifies image handling. HTML code is inserted automatically. Appropriate sizes are created during post building. Image files are placed in a given folder and Emacs/Ruby/Image Magick handle the rest. Movies are uploaded manually.
  • Code availability: The entire codebase is available at Codeberg for authenticated users.
阅读 9
0 条评论