GithubHelp home page GithubHelp logo

include-yy / egh0bww1 Goto Github PK

View Code? Open in Web Editor NEW
4.0 0.0 0.0 343.97 MB

source code of include-yy's blog

Home Page: https://egh0bww1.com

License: Creative Commons Attribution Share Alike 4.0 International

CSS 1.46% JavaScript 0.82% Emacs Lisp 1.36% Scheme 0.35% Python 0.03% Org 95.88% Racket 0.10%

egh0bww1's Introduction

egh0bww1 — include-yy’s blog

Welcome to include-yy’s blog source.

本博客使用了 Emacs 的 org-mode 导出功能,将 Org 文件导出为 HTML 文件。虽然 Github 支持 Org 文件渲染,前往网页也许能够获取更好的阅读体验。

https://egh0bww1.com — Home :: include-yy

如何构建本博客

请确保 git 已安装并可在 Emacs 内使用,然后执行以下步骤:

请使用以下命令安装 ox-w3ctryynt

M-x package-vc-install https://github.com/include-yy/ox-w3ctr RET
M-x package-vc-install https://github.com/include-yy/yynt     RET
  1. 打开 yy.el,在 buffer 中通过 C-c C-e (elisp-eval-region-or-buffer) 对整个 buffer 求值
  2. 执行命令 M-x yynt-export-build 并在弹出的 minibuffer 中选择 *t* 来构建整个博客
  3. (可选)执行命令 M-x yynt-publish-build 并在弹出的 minibuffer 中选择 *t* 来发布整个博客到 blog-build 目录

在执行第 2 步后可在与 org 源文件同位置看到生成的 HTML 文件,第 3 步是可选的,它会将生成的 HTML 和相关的资源复制到 blog-build 目录。

关于本博客

博客的目录结构

博客目录如下:

  • assets/*/* 一些全局资源
  • posts/*/* 发布的文章
  • republish/*/* 一些转载的文章
  • projecteuler/* 一些简单 projecteuler 题解
  • index.org 博客主页 Org 源文件
  • 404.org 404 页面源文件
  • robots.txt Robots 文件
  • tags.eld 包含所有 TAG 的数据文件
  • yy.el 构建工具代码

Problems 1 to 100 provide a wealth of helpful introductory teaching material and if you are able to respect our requirements, then we give permission for those problems and their solutions to be discussed elsewhere.

https://projecteuler.net/about

博客的 postsprojecteuler 部分使用 CC-BY-SA 4.0。如果您有任何问题,欢迎通过 issue 与我交流。

文章的格式

一篇博客应该包含以下头信息:

  • #+TITLE: name 文章的标题
  • #+DATE: [YYYY-MM-DD HH:MM][YYYY-MM-DD HH:MM]--[YYYY-MM-DD HH:MM] ,表示文章的创建时间或创建时间加上完成时间
  • #+FILETAGS: tags 文章的 TAG,当前只允许一个
  • #+DESCRIPTION: ... 对文章内容的介绍,这部分用于生成 RSS 的 <description>

对于 republish 和 projecteuler 也是类似的头结构,不过一般我们不用手写,直接使用以下函数创建新的 post, repostprojecteuler

  • yynt/yy-create-draft ,在 drafts 目录交互式创建新的 posts 草稿
  • yynt/yy-create-repost ,在 republish 目录交互式创建新的 repost 项目
  • yynt/yy-create-euler ,在 projecteuler 目录交互式创建新的 euler 项目

TAG 管理

所以 posts 文章的 TAG 都存储在 /tags.eld 中,格式大致如下:

("math" "c" "win32" "lisp" "gossip" "git" "emacs" "elisp" "blog" "rescript" "tr" "orgmode")

通过 yynt/yy--post-read-tagsyynt/yy--post-write-tags 我们可以对这个文件中的 TAGS 进行读写,不过一般不需要使用这样低层的函数,而是以下这些,它们会提供用于选择 TAG 的 minibuffer:

  • yynt/yy-post-add-tags 向 TAG 文件中添加新的 TAG
  • yynt/yy-post-delete-tags 从 TAG 文件中删除某 TAG
  • yynt/yy-post-insert-tag 在当前位置插入某个 TAG

一些参考资料

egh0bww1's People

Contributors

include-yy avatar

Stargazers

 avatar Eli avatar  avatar Hongyu Zhang avatar

egh0bww1's Issues

rss?

wow, first issue
can you add rss to your blog so I can subscribe?
your blog is of really high quality

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.