Commit graph

50 commits

Author SHA1 Message Date
cmal c7156a84f0 Start implementing _index folder for section content/assets 2018-08-08 10:51:40 +02:00
cmal 8473dff23d Implement assets colocation in section 2018-08-07 12:12:12 +02:00
Vincent Prouillet 60a52fd2cc Some intellij reformatting 2018-07-31 15:30:49 +02:00
Daniel Sockwell 77ac196f46 Change populate_next_and_previous_page
Replace `populate_next_and_previous_page` with `populate_siblings`
2018-07-30 22:41:27 -04:00
Daniel Sockwell 97f5065259 Fix formating/typos flaged in code review 2018-07-29 17:03:14 -04:00
Daniel Sockwell c2437cc0eb Remove order and add heavier/later
This commit removes the option to sort by order and also removes
`page.next` and `page.previous` variables.  Instead, pages can be sorted
by two methods `date` and `weight`.  The Tera `reverse` filter will
reverse either of those sorts, so the old `order` behavior can be
achieved by using the `reverse` filter with `weight`.

In place of the `previous`/`next` variables, this commit adds the
`page.earlier`/`page.later` variables (which are set when the page is
sorted by date) and the `page.heavier`/`page.lighter` variables (which
are set when the page is sorted by weight).  These variables have the
advantage of not having confusing semantics when the `reverse` filter is
used.
2018-07-27 23:00:28 -04:00
Vincent Prouillet 1ae0702494
Custom taxonomies (#330) 2018-07-16 10:54:05 +02:00
Vincent Prouillet d47ba4aff0 Rebasing + tweaks 2018-06-25 19:13:21 +02:00
Vojtech Kral a89768dab0 Remove page.images 2018-06-25 18:09:03 +02:00
Vincent Prouillet 8e8cdfeb7f Add year, month and day to page context with a date 2018-06-25 18:06:25 +02:00
Vojtech Kral 77bc526008 imageproc: Fix naming, cleanup 2018-06-25 18:05:49 +02:00
Vojtech Kral 6662014e55 Add image resizing support #225 2018-06-25 18:05:04 +02:00
Vincent Prouillet 860d1f4d1f Indicate which file is failing to render on error 2018-06-25 18:02:07 +02:00
Vincent Prouillet 85e13483eb Use the new shortcode parser 2018-06-25 18:00:05 +02:00
Vincent Prouillet 3e6054a9ac tempdir -> tempfile 2018-06-25 17:57:33 +02:00
Vincent Prouillet 7f48b9bee8 Update more deps and appveyor config 2018-06-22 13:39:29 +02:00
Vincent Prouillet d9dbf4d567 Fix internal links to content dir not working
Closes #275
2018-03-29 14:55:26 +02:00
Vincent Prouillet 9c0dd95bdb Fix theme shortcode not being useable
Closes #272
2018-03-28 21:09:08 +02:00
Tim DuBois c8dfc5156a
Change naming convention 2018-03-27 07:38:04 +02:00
Tim DuBois 0a34184ac5
Anchor tag for summary 2018-03-25 13:05:42 +02:00
Vincent Prouillet 73ddbf7152 Write some docs 2018-03-21 16:18:24 +01:00
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 045e9def21 globset can be a dev-dependency in 'content' 2018-02-25 21:00:47 +00: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 45fc1ee761 Release 0.3.1 2018-02-15 10:41:49 +01: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 11bfd7b2be Tera 0.11 has been released 2018-01-22 15:10:03 +01:00
Vincent Prouillet 1d1ff74d88 Use TOML dates in front-matter rather than strings
Closes #210
2018-01-14 18:04:01 +01:00
Vincent Prouillet bfdc93f948 Cargo update 2017-12-29 19:51:22 +01:00
Vincent Prouillet cfefb45913 Update to Tera 0.11 beta 2017-11-26 10:07:34 +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 f58e416b96 Clippy run 2017-08-31 18:01:26 +09:00
Vincent Prouillet 521b9755f8 Remove local crates Cargo.lock 2017-08-23 19:22:21 +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 3022598649 Add one bench for rendering html of page 2017-07-04 19:55:28 +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