Commit graph

45 commits

Author SHA1 Message Date
Yaroslav d571dea8c3
Per section/subsection feeds (#1128)
* Per section/subsection feeds

* Added `generate_feed` variable to section front matter.
* Generate atom/rss feeds for sections/subsections that have the
`generate_feed` variable set to true (false by default); this works
independent of the `generate_feed` variable in the root `config.toml`
file, however, the name (and template) of the feed file for each section
is the same as `feed_filename` in `config.toml`, just located in the
root of each section.
* Slightly edited `atom.xml` and `rss.xml` so that they include the
section title (if any), and the url of a section, if it's a section
feed.

* Section feeds: tests

* Changed a couple of sections' front matter in order to generate feeds
for them for the test.
* Changed the can_build_feed test in site package to can_build_feeds and
included some assertions to make sure that section feeds are generated
when requested.

* Section feeds: documentation

* Added information about the section front matter variable
`generate_feed` in the section content page.
* Added information about section feeds in the feeds template page.

* Section feeds fix: use section.path for feed path
2020-08-27 20:21:37 +02:00
yanghuidong b9296f7985
Make current_path always start with a slash (#1101)
* Make {section, page}.path always start with a slash

Change tests accordingly

* Fix missing leading/trailing slash in current_path of Taxonomy ("tags") and TaxonomyItem ("some-tag")

* Make {Paginator, Pager}.path always start with a slash

Fix Paginator.path missing trailing slash in from_taxonomy()

Change tests accordingly

* Update documentation regarding current_path now always starting with a slash

* Fix asymptomatic inverted logic in filter() for {section, page}.assets

* Add to 3 integration tests several checks for current_path in different templates

* Add a check for current_path in a paginated index section, "/page/2/"

This requires adding two dummy pages in the content root.

* Fix false passing of test on paginator.last due to URL prefix matching

A string formatting such as {name: value} can help prevent this.
2020-07-29 20:44:09 +02:00
Stan Rozenraukh a89b30073c Section extra -> SitemapEntry (#850) 2020-02-02 17:48:42 -08:00
Tjeu Kayim 75570d041a Skip link checking for URL with prefix in config (#846) 2020-02-02 17:47:01 -08:00
Tjeu Kayim 6149fd17e1 Skip anchor checking for URL with prefix in config (#812)
* cargo fmt & clippy

* Skip anchor checking for URL with prefix in config
2020-02-02 17:45:16 -08:00
Vincent Prouillet 0199017d07 Slugify given slugs as well 2019-08-04 16:17:02 +02:00
Pyry Kovanen 4b43b75d22 Allow ignored_content to support markdown files (#759)
* Allow ignored_content to support markdown files

* Add test for markdown supported ignored_content
2019-08-01 10:18:42 +02:00
Vincent Prouillet cb962f7a64 Add aliases to sections 2019-06-02 20:21:06 +02:00
Vincent Prouillet ec61a57841 Use @/ for internal links rather than ./
Close #686
2019-05-27 14:35:18 +02:00
Vincent Prouillet 974492bb7b Ensure we don't delete root index without
adding back default in rebuild

Fix #620
2019-02-22 21:48:31 +01:00
Vincent Prouillet aee41f279c Fix reload with taxonomies 2018-11-16 23:51:11 +01:00
Vincent Prouillet 41a693a528 Ignore rename of non md files 2018-11-16 16:59:06 +01:00
Vincent Prouillet 20a05da475 Fix bug with pages starting with dates 2018-11-13 00:08:46 +01:00
Vincent Prouillet 59f3e54e4e Add test for nested page_template 2018-11-07 20:48:39 +01:00
Vincent Prouillet 56af4ca7f9 Add page_template to sections
To override all child pages

Closes #397
Tests from PR #434
2018-11-07 19:42:23 +01:00
Vincent Prouillet a3b0f1e103 Add transparent sections
Closes #413
Closes #408
2018-11-06 00:46:13 +01:00
Vincent Prouillet a0da580f87 Do not error on files starting with utf-8 BOM
Close #501
2018-10-29 12:43:53 +01:00
Magnus Hovland Hoff 05b8bb4ac6 Ensure root output directory exists explicitly.
Aliases that have no directory nesting sneakily avoid the code path that ensures the directories exist
2018-10-22 22:17:51 +02:00
Vincent Prouillet d11f4aa56a Do not load markdown files starting with a . 2018-09-13 17:07:14 +02:00
Vincent Prouillet 743f832b2f Fix tests 2018-09-03 17:54:51 +02:00
Vincent Prouillet 5ed489d4f2
Merge pull request #389 from Libbum/pagination
Update pagination for test_site posts
2018-09-02 21:34:16 +02:00
Tim DuBois e99bdd07ac
Update pagination for test_site posts 2018-08-27 21:37:50 +02:00
Nathan Ringo 9df5da4697
Fixes bug with extra syntaxes in non-root section, adds tests. 2018-08-14 02:12:04 -05: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
James Munns fbb57253a3 Add html-alias test 2018-06-25 18:02:07 +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
Vincent Prouillet e40e97711f Some more bits about continue_reading anchor 2018-03-28 17:01:14 +02:00
Vincent Prouillet 972687fd76 Add back mistakenly deleted test file 2018-02-23 18:07:15 +01:00
Vincent Prouillet 10818cd0de Stop trying to load every file as markdown on serve
Closes #235
2018-02-22 16:49:37 +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 c3b525745e Convert project to a workspace 2017-07-01 16:47:41 +09:00
Vincent Prouillet 60e3352b7b Remove tests flakyness
Tags/Categories only work on dates
and tests were assigning them randomly
2017-06-20 21:59:54 +09:00
Vincent Prouillet 6a059d86d0 Add aliases to pages. Fix #86 2017-06-16 23:09:01 +09:00
William Yao 4c9d1e3af7 Add shortcode for Streamable videos (Electric Boogaloo) (#80)
Add shortcode for Streamable video
2017-06-06 12:51:20 +09:00
Vincent Prouillet dbe4a1d517 Move insert_anchor to section and allow left/right 2017-05-22 20:28:43 +09:00
Vincent Prouillet 8711c9a3c0 Change Site::section and fix empty paginated sections 2017-05-12 20:24:44 +09:00
Vincent Prouillet 2d4cba5b2d Make index a section like any other 2017-05-08 19:43:31 +09:00
Vincent Prouillet a3318d4b56 Pagination 2017-05-03 20:00:50 +09:00
Vincent Prouillet b256aaf7d0 Do not append non-sortables pages when not sortable 2017-05-01 15:35:49 +09:00
Vincent Prouillet df51e4d8b6 Add a special section for home page 2017-04-22 14:36:02 +09:00
Vincent Prouillet 04da527e53 Render anchor link 2017-04-10 19:58:44 +09:00
Vincent Prouillet d03974270d Add some default shortcodes 2017-03-29 23:32:40 +09:00
Vincent Prouillet d05a1559d9 Add prev/next hack 2017-03-23 13:10:00 +09:00
Vincent Prouillet 7e496878e5 Sections
Parse _index.md files as sections and render them
2017-03-19 19:20:24 +09:00