Commit graph

288 commits

Author SHA1 Message Date
Vincent Prouillet
fc808f2aa8 Some clippy fixes 2021-04-07 22:13:15 +02:00
Vincent Prouillet
187bc30f00 Serializing lang aware configs 2021-04-07 22:13:15 +02:00
Vincent Prouillet
86b42fc1ab Move taxonomies to language options dict 2021-04-07 22:13:15 +02:00
Bram Neijt
ba8939b240
If it's a directory, serve index.html instead (#1426) 2021-04-07 21:47:15 +02:00
Jade
958ec2a758
Add CORS header (#1382)
I was having an issue with `zola serve` where the browser was not
fetching fonts on account of it not sending a CORS header with the
fonts
2021-03-17 09:11:02 +01:00
Marco Tolk
5964fc192c
fixes #1401 (#1404)
Co-authored-by: Marco Tolk <marco@marcotolk.com>
2021-03-11 19:47:42 +01:00
Kristofor Salmin
9487b6fab8
Fix serve command when used with config option (#1385)
* Fix serve command when used with config option

* Use current config path instead of extension to detect change kind

* Fix serve command tests
2021-03-04 19:51:33 +01:00
Vincent Prouillet
51644a79e3 Handle random jetbrains temp files 2021-02-28 22:30:56 +01:00
Christopher Poenaru
d4db249997
add force arg long switch to CLI (#1362) 2021-02-18 17:53:40 +01:00
Chiu-Hsiang Hsu
d734b1723c
Fix "serve" subcommand for URL encoded static files (#1351) 2021-02-13 13:07:01 +01:00
Vincent Prouillet
cf86e93986 Fix dir renaming not picked up by zola serve
Fix #1324
2021-02-02 21:31:29 +01:00
southerntofu
347208f24e serve command respects mime types (closes #1308) 2021-01-15 21:36:07 +01:00
Vincent Prouillet
ccad454922 Percent decode paths on zola serve 2021-01-07 19:16:31 +01:00
Vincent Prouillet
c4260e091d Update hyper
Not by me: https://github.com/getzola/zola/pull/1246
Can't be arsed to figure out the issue I had with cherry-picking
the commit and submodules.
Originally merged on master by mistake
2021-01-05 22:06:55 +01:00
Aidiakapi
358446a65f
Escape path for live reload. Fix #1247. (#1266)
zola serve's live reload feature used to fail on Windows due to the path
separator (`\`) to not being escaped.
2020-12-23 10:37:05 +01:00
Vincent Prouillet
657905ed6e Remove watch-only 2020-12-22 21:35:15 +01:00
Vincent Prouillet
26b8ec66ac Only watch sass if folder exists
Closes #1249
2020-12-14 22:23:00 +01:00
Vincent Prouillet
047ce32efd Clippy 2020-12-14 20:43:31 +01:00
Vincent Prouillet
94634fe87d Move markdown config to its own section in config.toml 2020-12-14 20:43:31 +01:00
Takayuki Nakata
575c38f9c8 Support output_dir in config.toml 2020-12-14 20:42:55 +01:00
Vincent Prouillet
94c016521c Fix zola serve 2020-09-28 09:36:16 +02:00
Vladislav Nikonov
ada6710c99
Fixed serve command failure caused by tokio-related issue (#1183) 2020-09-25 11:01:14 +02:00
Vincent Prouillet
366e5c426f Avoid panics when binding addresses 2020-09-22 12:22:26 +02:00
WhizSid
41e436f331
serve command exiting when web socket port is already in use (#1179)
* Handled web socket port used issue

* Lint
2020-09-22 11:59:57 +02:00
Vincent Prouillet
b313c97ceb Fix slugified taxonomies rendering
Closes #1177
2020-09-22 09:46:22 +02:00
John-John Tedro
f9ae897190 Use platform-neutral path comparison for in-memory serving (fixes #1169) (#1175)
This introduces `relative-path`, a crate I've written for the specific
purpose of providing platform-neutral operations over paths the same way
they are used in URLs.

This means that `///hello///` == `/hello`, which should do the same as
the existing stripping minus the platform-specific path separators
causing the [bug being referenced](#1169).
2020-09-22 09:46:22 +02:00
Tim Visée
c27f749a86 Fix #1165, improve situation for compile_sass errors (#1166)
* Update compile_sass docs, this is just for sass files in site root

* Improve file watch error, question whether the target exists
2020-09-22 09:46:22 +02:00
René Ribaud
5bf1687fa7
Use trim_start_matches instead of strip_prefix (#1156)
- This allow to not bump the pinned version to 1.45.0.
- Change this, despite trim_start_matches returns a &str and not an Option, which I
  like less.
2020-09-03 10:47:48 +02:00
René Ribaud
5ec3a9ca65
Strip unc if it exists, fix #1110 #1129 (#1151)
* Strip unc if it exists, fix #1110

* Bump pinned version to 1.45.2

* Bump to minimum version required.

- https://github.com/getzola/zola/pull/1129#discussion_r480172320

* Add unc comments and a required test

* Fix typo in rust pinned version

* Fix types not ok
2020-09-01 11:48:42 +02:00
Vincent Prouillet
278cc82fc7
Change zola serve to load HTML from memory instead of disk (#1114)
* Change zola serve to load HTML from memory instead of disk

* Be smart about assets copying

* Be a tiny bit smarter on template changes

* Add zola serve --fast
2020-08-16 18:39:04 +02:00
southerntofu
b003a47d54
Support relative links for root directory (fix #1028) (#1106)
* serve command works from another working directory

* Root dir path is expanded (canonicalized) for relative links (#1028)

* Simplify watchers code

* Only watch sass/themes folders when they are enabled in config

Co-authored-by: southerntofu <southerntofu@thunix.net>
2020-07-29 20:08:25 +02:00
Vincent Prouillet
5fe1036a1d Extract some Tera logic out of site/lib.rs 2020-07-24 23:46:27 +02:00
Vincent Prouillet
9be7bc074d Extract sass code out of site/lib.rs 2020-07-24 23:46:27 +02:00
Vincent Prouillet
d7a557f0b8 Update livereload.js 2020-07-24 23:46:27 +02:00
Per Lundberg
530f918955
Add --force/-f flag to init, for creation in non-empty dir (#1065) 2020-06-18 21:15:46 +02:00
Vincent Prouillet
ade442a487 clippy + fmt + fix toml dates in extra arrays
Closes #1048
2020-06-18 21:12:46 +02:00
Tymoteusz Wiśniewski
974ae167a8
Make path to config.toml independent from root dir (#1023)
fixes #1022
2020-05-23 11:55:45 +02:00
Vincent Prouillet
0d5fefd446 Update image to 0.23 2020-02-10 20:48:52 +01:00
Vincent Prouillet
ac3ced828b
Multiple slugification strategies (#929) 2020-02-05 09:13:14 +01:00
Vincent Prouillet
be149646f6 Update livereload.js 2020-02-02 17:48:43 -08:00
ethereal
94445ae745 Add --root global argument. Fixes #899. (#932) 2020-02-02 17:48:43 -08:00
Sam Ford
2966adbe4e Migrate serve command to hyper (#904)
hyper is already included in Zola due to the reqwest dependency (used
in the link_checker and templates components). Replacing Actix with
hyper in the serve command reduces the number of dependencies and
slightly improves build times and binary size.
2020-02-02 17:48:43 -08:00
Vincent Prouillet
adee654f30 Print remove_dir_all error on ctrl-c 2020-02-02 17:48:43 -08:00
Sam Ford
658e8a3a66 Update livereload.js to v3.1.0 (#891) 2020-02-02 17:48:43 -08:00
Sam Ford
e804f907b2 Use Rust 2018 edition (#885) 2020-02-02 17:48:43 -08:00
Ryan Riginding
94b49dad09 fix(init): handle already existing path (#815)
* fix(init):  handle already existing path

* chore: add tests
2020-02-02 17:45:16 -08:00
Christopher Vittal
319985add4 Reset color after writing message in colorize
Presently when you `^C` in `zola serve` it is painted with the same
color as the previous message. This PR always ensures to reset the color
in colorize, before writing the newline.
2020-02-02 17:44:38 -08:00
Vincent Prouillet
b396a1bc20 Add --drafts flag + rustfmt 2019-08-24 22:23:08 +02:00
Ever
4fff7508ba ADD: reload when themes change (#771)
* ADD: reload when themes change

close #713

* MOD: test can_detect_kind_of_changes
2019-08-24 19:05:02 +02:00
Vincent Prouillet
f0c48b8a14 Add some more text to zola init
Closes #773
2019-08-13 20:16:09 +02:00