Commit graph

7 commits

Author SHA1 Message Date
Johann
27fb016557 Add tests for YAML error handling 2016-01-16 23:10:12 +01:00
Johann
8bd07225a6 Implement sorting of posts by date (fixes #46)
Posts are now sorted by date by default. Dates have to have the format
`%d %B %Y %H:%M:%S %z`, e.g. `29 May 2016 23:00:00 +0100` to be
successfully parsed. If no dates are provided or the parsing fails, it
falls back to 1970.
2016-01-16 00:41:23 +01:00
Johann
a5d3705c10 Parse front matter using yaml-rust (fixes #27)
This is a backwards-incompatible change, as `@extends` is an invalid
identifier in yaml (specifically the @ part). I changed it to `extends`,
which doesn't seem bad.

This comes together with the changes for supporting datetime properties
and sorting posts by creation date. More implementation details will
follow in later commits.
2016-01-15 22:27:17 +01:00
Alex Burka
ac4eb72469 add test for skipping dotfiles 2015-11-30 20:56:02 -05:00
Johann
a744c345c3 Better error handling (fixes #34)
- Uses liquid 0.2, which does better error handling
- Introduces a cobalt::Error that converts from the different error
  types and enables much conciser and safer code
- Transitions all panics and unwraps to use the new error system
2015-11-25 23:17:32 +01:00
Johann
7b63603e5b Cleaning up
- Removes the old util copy_recursive_filter function in favor of a nice
  iterator approach using walkdir.
- Replaces some instances of to_string with to_owned for performance.
- Some more try!
- deny warnings 😎
2015-11-06 23:51:03 +01:00
Johann
62ce74bad0 Add tests
This commit:
- replaces the walk_dir util function with the walkdir crate to avoid
  some inconveniences
- adds regression/integration tests that run over a set of fixtures and
  compare them to a desired output
- moves the example/ folder into tests/fixtures to create an initial
  testing fixture
- improves the travis configuration e.g. to test and collect code coverage
2015-11-06 21:22:45 +01:00