Commit graph

342 commits

Author SHA1 Message Date
Orson Peters
84d057fa1e Reduced cachebust fingerprint to be more reasonable (#2074)
* Reduced cachebust fingerprint to be more reasonable.
2023-02-16 20:49:03 +01:00
Vincent Prouillet
608837cddf Clippy + 1.63 2023-02-16 20:49:03 +01:00
Vincent Prouillet
e12b766e2c Fmt + change min version 2023-02-16 20:49:03 +01:00
Vincent Prouillet
fcbb21abca Replace libsass by grass
Closes #1535
Closes #2022
2023-02-16 20:49:03 +01:00
Felix Zwettler
d0b80654d1 add preserve_dotfiles_in_output configuration option (#1985) 2023-02-16 20:49:03 +01:00
Sosthène Guédon
3430d948f7 Fix needless_borrow warnings 2023-02-16 20:49:03 +01:00
Sosthène Guédon
f877835ed3 Site: fix clippy warnings 2023-02-16 20:49:03 +01:00
Sosthène Guédon
faf00d1047 Fix clippy::derive_partial_eq_without_eq 2023-02-16 20:49:03 +01:00
Soso
405dda6722 Cargo fmt (#2009)
* Run cargo fmt

* Add cargo fmt --check to pipeline
2023-02-16 20:49:03 +01:00
Sosthene
7000f787b3 Search json index (#1998)
* search: Add support for a JSON index

* docs: Document JSON index for search

* docs: Use lazy-loaded JSON index

* Add elasticlunr prefix to search engine format configuration

This will be useful if support for more search libraries are added in the future
2023-02-16 20:49:03 +01:00
Jeremy Barbosa
bedc6d7148 Minify embedded css and js with additional lib flags (#1922) 2023-02-16 20:49:03 +01:00
n-tux-tmp
baa473ceea add get_hash function (#1962)
Co-authored-by: Newbyte <newbie13xd@gmail.com>
Co-authored-by: n-tux-tmp <n-tux-tmp@example.com>
Co-authored-by: n-tux-tmp <n-tux-tmp@noreply.example.org>
2023-02-16 20:49:03 +01:00
Eric Scouten
5fb0867b3a Get term fn (#1964)
* Add new `get_taxonomy_term` global function

* Update per @Keats feedback to make `page_count` available all the time.
2023-02-16 20:49:03 +01:00
Vincent Prouillet
584de3adaf Remove logging 2022-08-14 16:08:48 +02:00
Nick Darnell
3fde41b6e5 The Glob library does not work correctly on windows. This changes the approach to use the normal WalkDir crate, and the Globset crate instead to find the filter. This new code correctly compiles sass files across platforms now. (#1950) 2022-08-14 16:08:48 +02:00
Tristam MacDonald
93d61cdf72 remove string manipulation of paths (#1941)
* remove string manipulation of paths
2022-08-14 16:08:48 +02:00
Vincent Prouillet
3fa855267e Ensure homepages get their translations filled 2022-07-15 18:00:55 +02:00
Vincent Prouillet
0d4c2e813f Fix some bugs + cargo fmt 2022-07-12 00:09:38 +02:00
Vincent Prouillet
bf7dbfeaae Update pinned rustc version 2022-07-10 16:54:00 +02:00
Vincent Prouillet
342569a92a Update deps 2022-07-10 16:31:09 +02:00
Vincent Prouillet
cec65d0fa7 Stop printing invalid files in dirs
Too many invalid stuff like emacs files
2022-06-23 20:56:42 +02:00
Vincent Prouillet
4da81eb17e Fix feed location for taxonomies not in the default language 2022-06-13 22:34:47 +02:00
Vincent Prouillet
094900777b Do not assume themes are present for CSS export
Closes #1884
2022-06-10 20:54:21 +02:00
bemyak
49b310764a
Always follow symlinks (#1883) 2022-06-09 21:47:52 +02:00
Vincent Prouillet
76b0b5f5dd Clippy 2022-05-11 22:34:36 +02:00
Vincent Prouillet
1a3b783120 DRY up the external link checking a bit 2022-05-11 22:31:54 +02:00
Michael Clayton
6240ed5469
add link_checker settings for external_level and internal_level (#1848)
* add external_level and internal_level

* remove unnecessary debug derive on LinkDef

* clarify doc comment about link check levels

* simplify link checker logging

* add missing warn prefix

* simplify link level logging, remove "Level" from linklevel variants

* remove link level config from test site

* switch back to using bail! from get_link_domain

* move console's deps to libs

* remove unnecessary reference

* calling console::error/warn directly

* emit one error, or one warning, per link checker run

* various link checker level changes

* add docs about link checker levels

* remove accidentally committed test site

* remove completed TODO
2022-05-11 21:54:34 +02:00
Vincent Prouillet
beb93f2b0a Expose backlinks 2022-05-08 14:10:29 +02:00
Vincent Prouillet
a958305e58 Clone Zola Tera instance for Markdown filter 2022-05-06 22:16:56 +02:00
Vincent Prouillet
bdbe73e23e Clippy 2022-05-02 23:05:08 +02:00
Vincent Prouillet
df9061b5a0 Avoid cloning components when rendering feed 2022-05-02 23:01:57 +02:00
Vincent Prouillet
a297b11f2a More efficient sitemap building 2022-05-02 22:51:01 +02:00
Vincent Prouillet
bad0127c9f
Build taxonomies as pages are added (#1841) 2022-05-02 16:51:46 +02:00
Vincent Prouillet
3a0800c702 Pass content_path to populate_library 2022-04-27 22:27:19 +02:00
Vincent Prouillet
84951d39e3 Allow taxonomies to not be rendered
Closes #1750
2022-04-27 21:11:42 +02:00
Vincent Prouillet
27a200bb4e Some more refactoring 2022-04-26 23:13:27 +02:00
Vincent Prouillet
9ab1bf2e4e
Re-organise content and remove slotmap indirection level (#1827) 2022-04-26 20:51:04 +02:00
Michael Clayton
92e80b5451
apply skip_prefixes before parsing external link domain (#1833)
* apply skip_prefixes before parsing external link domain

* log number of links skipped by skip_prefixes
2022-04-26 20:07:50 +02:00
Vincent Prouillet
c11ae6ef28
Use anyhow (#1816)
Also fixes #1783
2022-04-01 21:37:38 +02:00
Vincent Prouillet
40d7208493 Refactoring rendering tests 2022-03-03 12:41:19 +01:00
Sam Vente
dde3531fd9
Make sure that zola serve/build can start from anywhere inside dir tree (#1761)
* Make sure that zola serve/build can start from anywhere inside dir tree

* make clippy and rustfmt a bit happier

* replace unecessary if-else with unwrap_or and display which path could not get canonicalized if it fails at startup

* canonicalize config_path to avoid crash when config.toml changes
2022-03-03 12:35:29 +01:00
southerntofu
fb347c2e02
Bugfix check links i18n (close #1694) (#1780)
* Treat _index.LANG.md as section, not page (close #1694)
Display more advanced information in case of a future crash here

* Add link to translated local section in test_site_i18n to catch #1694
It appears linking to another translated page does not trigger the bug,
but linking to a section within the same (translated) page does.

* Allow (and test for) homepage internal links in broken link detection

Co-authored-by: southerntofu <southerntofu@thunix.net>
2022-02-26 21:56:33 +01:00
Vincent Prouillet
ae3a8b802e Add libs subcrate (#1747)
* Add libs subcrate

* Remove last direct lazy_static usage

* Update pinned ci version

* Update deps
2022-02-14 11:08:40 +01:00
Phil Lord
5190b5eba5 Add heuristic checking for HTML anchors (#1716)
* Add heuristic checking for HTML anchors

Previously only anchors specified or generated in markdown could be
linked to, without complaint from the link checker. We now use a
simple heuristic check for `name` or `id` attributes.

Duplicate code has been refactored and all XML anchor checks updated
to use regex rather than substring match.

* Fix regexp and refactor
2022-01-23 14:33:51 +01:00
Vincent Prouillet
22dcfb963e Test config.title in integration tests 2021-12-07 21:46:44 +01:00
Vincent Prouillet
51784aa60f Handle naked anchor link for internal links
Closes #1676
2021-12-03 23:30:32 +01:00
BezPowell
35359fb312
Add generic template fallbacks to taxonomies (#1651)
* Split checking for theme template off into separate function

Allows to check for fallbacks elsewhere in the code, without attempting to actually render the template.

* Add template fallback checking to taxonomy pages.

* Add template fallback checking to paginated taxonomies

Requires passing additional arguments to Paginator::from_taxonomy, which may not be desirable.

* Update documentation to reflect taxonomy template fallbacks.

* Update generic taxonomy template names.

* Make check_template_fallbacks() return &str.

* Add tests for check_template_fallbacks
2021-11-29 09:54:16 +01:00
Vincent Prouillet
637b00547a
Shortcodes (#1640)
* Next version

* Added tests for shortcode insertion

* Added TOC tests

* Added test for #1475 and #1355

* Basic internal / external links tests

* Added integration test

* Added pseudocode and started on logos

* Logos parsing for shortcodes

* Fixed string literal parsing

Moved string literal parsing to a new lexer in order to have greater
control of control characters which are parsed. This fixes the bug that
was present in the `string_from_quoted` function and also moves the
`QuoteType` to be in the `ArgValueToken`.

* Moved string literal logic to seperate module

* Added square bracket notation for variables

* Error handling rewritten

Remove the Result from the `fetch_shortcodes` function. Added proper
messages within the internal parsing.

* Reorganized and documented the shortcode submodule

* Added all logic for ShortcodeContext spans

* Added working insertion code for MD files

* Made functions generic over Markdown or HTML

* Add check for embedding bodies

* Structure of main function clear

* Added test for `new_with_transforms` function

* It runs!

* Added the code for handling p-ed html shortcodes

* Removed placeholders in markdown function

* Adjusted integration tests

* fetch_shortcodes now also returns a string

* Start of HTML insertion

* Kinda working everything

* Loading of shortcodes and builtins

* Fix tests

* Some missed fixes

* Tweaks + fmt

* Remove string literal handling

* Fix benches

* Grab shortcode def only once per site

* Fix benches

* Rewrite of parser

* Fix tests

* Add test for #1655

* Re-enable integration test

* Add test for #1601

* Add test for #1600

* Add test for #1500

* Add test for #1320

* Fix test on windows?

Co-authored-by: Gijs Burghoorn <g.burghoorn@gmail.com>
2021-11-19 20:31:42 +01:00
Vincent Prouillet
2e884e06cb Remove duplicate call to load syntax/themes 2021-09-13 21:13:51 +02:00
David
23064f57c8
Support custom syntax highlighting themes (#1499)
Related to #419

Gruvbox tmTheme added to test_site, it is taken from
https://github.com/Colorsublime/Colorsublime-Themes (MIT licensed)
2021-09-13 21:08:48 +02:00