Няма описание

blog.yaml 3.8KB

    title: A test blog reverse: true output: blog.html --- - title: pacman -Qo $(ls -1t --time=atime /usr/bin | tail -n30) content: Find infrequently used binaries on your system. `ls --time=atime` is the key here, it uses the access time instead of the modification time, which is the default. date: "2016-09-20" tags: [tip] type: shell - title: XOXO Festival videos (2012-2015) url: https://www.youtube.com/user/xoxofest/videos content: Unfortunately, the ones for 2016 are missing. I'm not sure if there will be video, I haven't found anything official so far. date: "2016-09-24" type: link - url: file:///home/lu/m/pictures/inspiration/empartridge-anything.jpg content: By [@empartridge](http://empartridge.tumblr.com). tags: [cute, art, inspiration, homestuck] type: image - url: file:///home/lu/m/musique/DRALMS/Shook/05 - Shook.mp3 content: Shook, by [DRALMS](https://dralms.bandcamp.com/). date: "2016-09-25" type: song - title: Introduction content: | `blog` is a tiny tool that generates your (link)blog. It takes a [YAML](https://yaml.org) file as input, and produces a single HTML file on stdout, which you could then upload to your server, place on your Desktop, or pass along to friends. `blog` is not meant to be a feature-rich program. It does the bare minimum necessary to host a blog with different post types, and not more. Whichever additional features you need you can add to your version of it. ## How to use it All posts are written in a single file `blog.yaml`, which contains a list of entries. The most basic post type is `text`, written as follows: - title: An example post content: You can use *Markdown* here... Optionally you can specify a `date` field. If `content` starts with a non-alphabetic character, you need to start the value with a vertical bar `|`: - title: Special characters... content: | *This* post starts with a special character. There are a few other types of posts: * `shell`, similar to text, but `title` is a shell command * `link`, with an additional `url` field * `image`, where `url` is the source of an image * `song`, where `url` is the source of the song * `video`, where `url` is a link to a YouTube video With the exception of the `shell` type, `title` and `content` are optional. date: "2016-09-25" tags: - author:lu - tutorial type: text - url: https://www.youtube.com/watch?v=yLuOzNeHw5I content: Lights, by Archive. type: video - title: There are tags now! content: | You can now tag articles. Any kind of string is allowed, have some fun with it... :) Use them as follows: - # attributes as usual tags: [fancy, tags, "stuff:with-interesting!-characters"] Or alternatively: - # as usual tags: - fancy - tags - "stuff:with-interesting!-characters" tags: [tags, feature, announcement, "author:lu"] date: 2016-09-26 type: text - title: Filters! (More of them) content: | Let's write more filters. Apart from the `tag` filter that we already have. Some ideas: - `title`: filter by text occurring in the title - `post`: filter a specific post by id (or multiple?) - `type`: filter by post type All of them will work similar to the existing `tag` filter, i.e. they can be used as links and will appear in the history. If we want to be fancy, we might implement combining filters using `and`. date: 2016-09-26 tags: [ideas, feature, "author:lu"] type: text - url: file:///home/lu/m/video/films/Over The Garden Wall/OtGW-S01E01.mp4 type: video - url: https://vimeo.com/channels/everyframeapainting/156455111 type: video