Vincent Prouillet
b3b2527c5d
TIL about serde default
6 years ago
Vincent Prouillet
1e25117887
Fix date serializing in extra section of pages
Closes #238
6 years ago
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.
6 years ago
Vincent Prouillet
16f658c70c
Move test_site and turn rebuild.rs into a component
6 years ago
Vincent Prouillet
1d1ff74d88
Use TOML dates in front-matter rather than strings
Closes #210
6 years ago
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.
7 years ago
Vincent Prouillet
791fbe685b
Add page and section components
7 years ago
Vincent Prouillet
f26b9d53bd
url -> path in page front-matter
7 years ago
Vincent Prouillet
a24851790c
Fix bug with colocated folders
7 years ago
Vincent Prouillet
f11cc6abb4
Serialize page & section paths is, without leading slash
7 years ago
Vincent Prouillet
2d97786e67
Add back drafts
7 years ago
Vincent Prouillet
c77cc9b170
First draft of theme support
7 years ago
Vincent Prouillet
c3b525745e
Convert project to a workspace
7 years ago
Vincent Prouillet
1f1fc3f454
Remove section from page context
7 years ago
Vincent Prouillet
414457ed92
Get assets of page only if file is named index.md
7 years ago
Vincent Prouillet
e76ee7ae4a
Pass section in context when rendering a page if there is one
7 years ago
Vincent Prouillet
c3986b701a
Add table of contents support
7 years ago
Vincent Prouillet
2d949249c3
Add trailing slash to paths and permalinks. Fix #85
7 years ago
Vincent Prouillet
dbe4a1d517
Move insert_anchor to section and allow left/right
7 years ago
Vincent Prouillet
26159609d2
Add a rendering module
7 years ago
Vincent Prouillet
be784bbaa3
Refactor taxonomies
Fix #66
7 years ago
Vincent Prouillet
056bf55881
Add a FileInfo struct to hold some common data about the files
7 years ago
Vincent Prouillet
b2c3adff37
Move page tests inside content mod
7 years ago
Vincent Prouillet
4f27dc2f18
Move find_content_components to content mod
7 years ago
Vincent Prouillet
c35b76406e
Move stuff around a bit more
7 years ago
Vincent Prouillet
07f11755d6
Create a content mod
7 years ago
Vincent Prouillet
09d5e74a65
Smarter rebuild on content change
Fix #59
7 years ago
Vincent Prouillet
299c3c8b22
Separate Page and Section front matter into 2 structs
Fix #61
7 years ago
Vincent Prouillet
c989ab607c
Add orphan in print notice and fix orphan with assets and url
7 years ago
Vincent Prouillet
2d4cba5b2d
Make index a section like any other
7 years ago
Vincent Prouillet
a3318d4b56
Pagination
7 years ago
Vincent Prouillet
6e9a9eaa1f
Fix prev/next
7 years ago
Vincent Prouillet
b256aaf7d0
Do not append non-sortables pages when not sortable
7 years ago
Vincent Prouillet
a0b70bfc7e
Allow sorting pages by order and date
Closes #14, #43
7 years ago
Vincent Prouillet
74be6d9c15
Add asset list in file not name index.md error message
7 years ago
Vincent Prouillet
1c9e078154
Clippy run
7 years ago
Vincent Prouillet
73feb41e17
Add missing fields to serialization
Also use Option for Page::summary
Close #38
7 years ago
Vincent Prouillet
7aeebcc981
Add current_url and current_path
To every templates, useful when doing
navigation to know which link is currently
active
7 years ago
Vincent Prouillet
a6b8caf6de
Add shortcodes
7 years ago
Vincent Prouillet
a02d50c22a
Add some colours
7 years ago
Vincent Prouillet
58208df35a
Move highlight decision into the markdown_to_html fn
7 years ago
Vincent Prouillet
d05a1559d9
Add prev/next hack
7 years ago
Vincent Prouillet
9af85ba3e4
Pick highlighting theme from config
7 years ago
Vincent Prouillet
f63ec475eb
Add categories and tags to sitemap
7 years ago
Vincent Prouillet
cd70aac065
Clippy run
7 years ago
Vincent Prouillet
7e496878e5
Sections
Parse _index.md files as sections and render them
7 years ago
Vincent Prouillet
dde9af3efd
Copy assets found in content folders
7 years ago
Vincent Prouillet
eaa09999fe
Clippy run
7 years ago
Vincent Prouillet
2d26bf038c
Force refresh on content/template change and various fixes
7 years ago
Vincent Prouillet
4406b16007
Detect whether the page needs highlighting
7 years ago