Commit graph

1840 commits

Author SHA1 Message Date
bemyak
49b310764a
Always follow symlinks (#1883) 2022-06-09 21:47:52 +02:00
bemyak
8029cf891a
Fix taxonomy current path (#1882)
* Fix current_path and current_url for taxonomies

* Fix language duplication in get_url fn
2022-06-09 21:47:03 +02:00
bemyak
6989eb73ab
Fix clippy lint warnings (#1888) 2022-06-04 20:29:33 +02:00
Matt Ickstadt
e9e6cadc6c
Update to elasticlunr-rs 3.0.0 (#1873) 2022-06-03 23:25:42 +02:00
Jake G
ed296d72a1
Your message (#1880) 2022-06-03 22:44:29 +02:00
Laurențiu Nicola
a385dbae29
Add rel="alternate" to Atom post links (#1868)
This improves compatibility with some readers, e.g. Miniflux, which otherwise don't detect these.
2022-05-21 23:28:58 +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
2291c6e9c3 Fix tests 2022-05-10 22:33:57 +02:00
Colin Dean
f7f5545bdc
Enables setting base-url to / for relative URLs in serve mode (#1853)
Having to change the base URL to whatever ngrok URL was provisioned for
me was frustrating. This patch enables setting it to `/`, which will
then make the `get_url()` function simply return `/`.
2022-05-10 22:04:40 +02:00
Vincent Prouillet
beb93f2b0a Expose backlinks 2022-05-08 14:10:29 +02:00
Vincent Prouillet
413a68d8b2 Fix tests 2022-05-06 22:55:29 +02:00
Vincent Prouillet
e0043a7351 Ignore section with render=false when looking for path collisions
Closes #1656
2022-05-06 22:45:05 +02:00
Vincent Prouillet
a958305e58 Clone Zola Tera instance for Markdown filter 2022-05-06 22:16:56 +02:00
Vincent Prouillet
ee8de20a6e Update syntect 2022-05-05 23:41:06 +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
a0630efb76 Rename links utils mod 2022-05-02 22:07:47 +02:00
Vincent Prouillet
e8b04bb11a Serialize transparent field in section front-matter
Closes #1840
2022-05-02 21:55:43 +02:00
Vincent Prouillet
bad0127c9f
Build taxonomies as pages are added (#1841) 2022-05-02 16:51:46 +02:00
Ken "Elf" Mathieu Sternberg
77eb9fef9b
Create pull request/add yaml to load data (#1842)
* Add YAML to formats supported by load_data()

A fairly trivial addition; JSON and YAML are handled so similarly
that this was a matter of copying the JSON-relevant handlers and
editing the copies to handle YAML as well.  The test file was
literally generated with 'json2yaml'.

The documentation has been updated to indicate that load_data() now
handles YAML code.

The CHANGELOG has been updated as well.

* After checking, I found that it's generally agreed the mime type is still application/x-yaml.

* Update comment, unify library importing.

I noticed one more place where the list of formats was supported,
and added YAML to that list.

I noticed that there's a singular place to load the `libs::` crate,
and unified by importing of serde_yaml in that place.
2022-04-29 20:22:02 +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
844576e32e Remove unused deps thanks to cargo-machete 2022-04-27 19:49:57 +02:00
Michael Clayton
44b2f99ab8
fix typo in zola init (#1836) 2022-04-26 23:42:16 +02:00
Vincent Prouillet
27a200bb4e Some more refactoring 2022-04-26 23:13:27 +02:00
Vincent Prouillet
6851ade642 Print path on metadata call failure 2022-04-26 22:38:00 +02:00
Vincent Prouillet
c14b1fa746 Remove duplicate code 2022-04-26 22:27:20 +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
Luís Fonseca
896ea596fd
rename extra_highligh_themes to extra_syntaxes_and_themes (#1828)
extra_highligh_themes does not exist
2022-04-17 19:38:24 +02:00
Vincent Prouillet
c11ae6ef28
Use anyhow (#1816)
Also fixes #1783
2022-04-01 21:37:38 +02:00
Vincent Prouillet
62a0e7b1fd Update deps 2022-03-23 10:00:55 +01:00
Vincent Prouillet
dfecf8075f
Try to change windows image for CI (#1807) 2022-03-21 10:43:52 +01:00
Spencer Scorcelletti
a13d41b47c
Allow load_data to take a literal (#1794) (#1794)
* Add `literal` as a new entry for `data source`, to be used by the `load_data` function

* Add tests to the module for plain text, json, xml, toml, and csv

* Update error messaging to include literal as a potential choice

* Update site documentation to include instructions for using `load_data` with a literal
2022-03-21 10:15:24 +01:00
Michael Clayton
336a2716e0
switch from chrono to time (#1790)
* switch from chrono to time

* remove some unused time features

* get utc offset before threading begins
2022-03-20 22:01:01 +01:00
Vincent Prouillet
75d9e5a1e1 Fix zola init 2022-03-18 17:45:10 +01:00
Vincent Prouillet
1f5a524c12 Load extra themes even with theme=css
Closes #1775
2022-03-15 11:32:32 +01:00
Vincent Prouillet
2feda3ec61 Update deps 2022-03-04 21:36:35 +01:00
doomy
88e0624f11
Added XML support for load_data (#1769)
Co-authored-by: doomy <2640792-_doomy@users.noreply.gitlab.com>
2022-03-04 21:28:08 +01:00
Vincent Prouillet
a67370b8d8 Update pulldown_cmark 2022-03-04 00:16:48 +01: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
3dde2ce562 Update netlify deploy docs 2022-02-15 20:56:38 +01:00
Sam Vente
fd052252f7 fix crash in build.rs when installing from source on linux (#1760) 2022-02-14 11:08:40 +01:00
Michael Clayton
a13279ea39 ignore links to '#' (#1756) 2022-02-14 11:08:40 +01:00
liushuyu
821fa38bc1 build: include metadata in Windows binary (#1735) 2022-02-14 11:08:40 +01:00