Commit graph

21 commits

Author SHA1 Message Date
Vincent Prouillet bcf42a0c10 The wonders of serde default, take 2 2018-03-20 18:42:42 +01:00
Vincent Prouillet 00729581f9 Break sorting ties by a-z ordering
Closes #259
2018-03-17 18:08:02 +01:00
Vincent Prouillet b3b2527c5d TIL about serde default 2018-03-12 20:11:03 +01:00
Vincent Prouillet 1e25117887 Fix date serializing in extra section of pages
Closes #238
2018-03-01 14:49:34 +01:00
Philip Daniels 3e1221064b Filter ignored content in page.rs.
* Add ignored_content to the Config structure.
* Use the GlobSet crate to parse the glob patterns into a matcher, which
  is created once at program initialization. If there are no patterns in
  ignored_content, an empty globber is created, which excludes no files.
  This is consistent with the existing behaviour of Gutenberg, before
  this feature was added.
* Bail if there are any errors in the glob patterns.
* Add a call to the globber in page.rs to actually do the filtering.
* Update documentation.

A note on the Config structure
------------------------------
* I had to remove the PartialEq derive from the Config structure as it
  does not work for the GlobSet type. No harm is done, Config does not
  need to be PartialEq anyway, since there is no need to sort Configs.
* The implementation follows the pattern of the existing config settings
  in that it uses an Option<...>. This would appear unnecessary, in that
  an empty vec could be used as the default, but it appears to be needed
  by the TOML parsing. A better approach would be to use a separate
  SerializableConfig and map to/from a Config struct. This would also
  allow the elimination of most, if not all, of the other Options in
  the Config structure, but that ought to be another PR.
2018-02-25 15:15:51 +00:00
Vincent Prouillet 16f658c70c Move test_site and turn rebuild.rs into a component 2018-01-29 18:40:12 +01:00
Vincent Prouillet b73ff48482 Fix not compiling on nightly
Fix #215
2018-01-24 13:21:48 +01:00
Vincent Prouillet 1d1ff74d88 Use TOML dates in front-matter rather than strings
Closes #210
2018-01-14 18:04:01 +01:00
Jeff Parsons ca99bb0204 Expose to templates whether or not a page is draft
Useful if you are, e.g., generating an index of blog posts.
2017-11-01 14:30:09 +11:00
Vincent Prouillet 791fbe685b Add page and section components 2017-10-31 16:41:31 +01:00
Vincent Prouillet f26b9d53bd url -> path in page front-matter 2017-10-04 09:35:37 +09:00
Vincent Prouillet a24851790c Fix bug with colocated folders 2017-10-04 09:23:25 +09:00
Vincent Prouillet dee1dbe667 Working on site
And some tweaks as I write the docs
2017-09-29 15:37:58 +09:00
Vincent Prouillet f11cc6abb4 Serialize page & section paths is, without leading slash 2017-09-26 17:21:08 +09:00
Vincent Prouillet 2d97786e67 Add back drafts 2017-09-25 18:55:43 +09:00
Vincent Prouillet c77cc9b170 First draft of theme support 2017-08-23 19:17:24 +09:00
Vincent Prouillet b3d002f54d Clippy run 2017-07-11 22:51:02 +09:00
Vincent Prouillet 3cb4641f1f Remove sections for index page and clean up pager 2017-07-06 18:51:36 +09:00
Vincent Prouillet 0b38568015 Previous behaviour of populate was correct so reverting back to it 2017-07-05 12:04:00 +09:00
Vincent Prouillet 37af36186a Improve sorting speed 2017-07-04 18:33:58 +09:00
Vincent Prouillet c3b525745e Convert project to a workspace 2017-07-01 16:47:41 +09:00