Skip to main content

FeedPipe (Part 3)

I was able to work on FeedPipe today. I am still in the early, experimental phase, and no code has been pushed to GitHub yet.

One thing that I worked on is the design of index/feed items. I implemented a module that loads items from YAML and Markdown (CommonMark) files. Metadata is specified in YAML while the main item page content is written in Markdown. Both can be included in a single file, a feature inspired by the yaml_metadata_block extension of Pandoc. Alternatively, separate files can be used.

Currently, only two properties are required in the metadata. The title property must be a string. The revisions property must be a non-empty array of revision objects, which have a time property, a type property (major or minor), and a description property, all strings.

When an item description property is not specified, a description is generated from the title and revisions. Users can specify a string description in cases where the generated description is not wanted.

Users can put any other metadata that they want. The metadata is passed to templates, so the user can access the metadata within the templates. All string values are considered plain text and should be escaped when output.

As an example of the versatility of the current design, users have a few choices for how to implement comments/reviews. They can be implemented in the content in order to provide flexibility as well as Markdown formatting. Alternatively, they can be implemented using metadata and templates, providing a well defined structure.

The current prototype has a modular design that allows for additional implementations. For example, modules could be implemented to support content written in reStructuredText and AsciiDoc in addition to Markdown. I have not decided if that is a good idea or not, however. Perhaps the program would be easier to use without such options. I also hope to avoid Pandoc because of the GPL license as well as the resulting huge executable size.

Author

Travis Cardwell

Published

Tags
Related Blog Entries