The tests are now operating in a more standard use case thanks to the
ability to easily setup. The are running in the CWD rather than all the
paths artifically being set.
Fixes#381
Features
* Provide context on errors (good enough for #136)
* Implement basic `compact` support
Bug Fixes
* `date_in_tz` can't parse cobalt's dates
* Improve value coercion practices
* Every `Value` is now treated as a string.
* Whole numbers are now preserved.
* Whole numbers can convert to fractional numbers but not the other way
around.
* You can convert a fractional number to a whole number using the
filters `round`, `ceil`, or `floor`.
* Operations on only whole numbers preserve their whole number nature.
* for tag ranges, indexing, etc only accept whole numbers
Fixes#136
BREAKING CHANGES: There might be minor behavior changes form the coercion
changes.
Fixes#349
BREAKING CHANGE:
Frontmatter `published_date` switched from "29 December 2016 15:20:21
-0700" to "2016-12-29 15:20:21 -0700".
`cobalt migrate` should handle this for you.
The `.cobalt.yml` format should be more forward looking now, not
breaking users in the face of new featurs being added.
Features this uncovers
- Default the frontmatter for pages and posts
Fixes#199
BREAKING CHANGE: `.cobalt.yml` format change. Run `cobalt migrate` to
convert your site to the new format. Please backup first in case there
is an issue.
Originally, I hid the conversions as a hack. This is making the
conversions to non-legacy harder, so removing it.
I temporarily disabled tests until #334
A previous commit make the `dest` config flag relative to the config
file. This also impacted `--destination`. This would be unexpected, so
we now track separately the config's dest and the overridden dest so we
can properly track what they should be relative to.
This is a step towards #284.
When moving the post-processing into the builder, I went ahead and
implemented the link semantics talked about in #216. This causes a
minor change to output. RSS and jsonfeed's links to the main website
will not have a trailing slash which no one should notice.
This is an attempt to try to simplify things until someone has a use
case for it.
What are the problems with custom folders?
- Less confusing to users. When giving the user a choicem, we should be
able to describe why they might want to make that choice.
- Less to test
- No semantic problems to worry about.
- What should be the behavior for a non-`_`-prefixed folder
- What should be the behavior for deeply nesting particularly with the
above question mixed in at random points.
The configuration was dumped to `.rustfmt.toml`, so hopefully people can
also use newer versions of rustfmt.
The config was not updated to also include the latest style RFCs just
out of laziness.
- Provide more error context (like which file failed to parse).
- Restored logging of command failures (removed in split)
- Restored logging of successful commands (removed in split)
This is mostly a refactoring but with the impact that `page.path` now
returns a non-exploded path.
BREAKING CHANGES: `page.path` now returns the non-exploded path.
Upgrade notes:
- notify: Debouncing was added but have not yet switched to it because of
the extra work to extract the relevant path
Dependencies that were held back:
- assert_cli: See killercup/assert_cli#30 and killercup/assert_cli#31
- rss: Seems they turned off XML escaping. Didn't have time to research
this.
* Don't render documents without `extends` twice
`liquid_escaped` test case was red before the fix:
`tests/fixtures/liquid_escaped/not-extends.liquid` renders invalid
liquid markup, so cobalt used to panic when it rendered this document
twice.
* Move lines in `Document::as_html` to improve readability
* Reorganize the code for rendering documents
This doesn't change flow, that's just a prerequisite for adding
excerpts.
* Add excerpts test fixture based on a vanilla `cobalt new` project
* Add several posts with different kinds of excerpts to `excerpts` fixture/target
* Add .liquid posts to fixture/target
* Split front matter using an improved regex
The default excerpt separator is \n\n. If the linefeed after "---" is a
part of content, a document starting from one blank line will have an
empty excerpt.
\r is there because they use both \r and \n on Windows.
* Add jekyll-like excerpts to posts
It doesn't make sense to add excerpts to other documents as they are not
injected to rendering context like "posts" is. So we won't do it to save
some CPU time.
* Cache layouts to avoid repeated fs calls and memory allocations
Fixes#120 (we don't need to use mutex here because crossbeam has been
removed in #146).
* Add draft support (fixes#121)
* Add documentation for drafts
* Add support for draft front matter attributes
* Run rustfmt
* Draft related debug messages