Commit graph

2227 commits

Author SHA1 Message Date
Newbyte
52b29df01d
Metainfo: Add 0.18.0 (#2402) 2024-01-07 20:22:14 +01:00
Yusuf Cihan
b3c9529089
Add more information about Vercel deployments (#2399)
* Add more information about Vercel

* Change wording and add specify version

* Update vercel.md
2024-01-07 14:19:05 +01:00
Javier Pérez
38199c1255
Update the GitLab Pages documentation (#2384)
* docs: update gitlab-pages.md

* docs: rephrase sentence

* docs: add clarification

* docs: fix formatting

* docs: add link to gitlab docs

* docs: update gitlab-pages-md

* docs: refactor gitlab-pages.md
2023-12-21 12:34:16 +01:00
Olivier Samyn
623756e7e3
fix: set the debian version used to build the Docker image (#2386)
This avoid conflicting GLibc version between the build step and the
distroless cc one.
2023-12-20 14:00:07 +01:00
Vincent Prouillet
974a05d7be Update snapcraft version 2023-12-19 08:42:48 +01:00
Vincent Prouillet
77c87f5e2f Set release date 2023-12-18 23:24:06 +01:00
Vincent Prouillet
e2f5c490bb Update deps 2023-12-18 23:24:06 +01:00
Sergei Gureev
8ba73749b6 fix: taxonomies missing lang in sitemap (#2373) 2023-12-18 23:24:06 +01:00
Vincent Prouillet
f560b48f43 Remove dummy file 2023-12-18 23:24:06 +01:00
Vincent Prouillet
74b06d704d Actually remove code blocks from search index
Closes #2065
2023-12-18 23:24:06 +01:00
Vincent Prouillet
8b18ca018f Update changelog and deps 2023-12-18 23:24:06 +01:00
Sandor Apati
4e0f9413f6 elasticlunr-rs 3.0.2, hu language support (#2151)
Co-authored-by: Sandor Apati <s.apati@mito.hu>
2023-12-18 23:24:06 +01:00
lauren n. liberda
1349947ed3 ignore kate-swp files (#2353) 2023-12-18 23:24:06 +01:00
Erwin Vrolijk
23bd03fdfc Add apple arm (#2324) 2023-12-18 23:24:06 +01:00
Vincent Prouillet
b1f1e64da3 Update deps 2023-12-18 23:24:06 +01:00
Eldred Habert
8fe219a716 Update grass to 0.13 (#2321)
This allows benefitting from some bugfixes (potentially breaking but
better compatibility with the reference Sass impl)
2023-12-18 23:24:06 +01:00
Vincent Prouillet
105257b21a Update changelog 2023-12-18 23:24:06 +01:00
Vincent Prouillet
24304fa9c6 Clippy 2023-12-18 23:24:06 +01:00
Alexander Borsuk
6b0585cf01 Avoid unnecessary checking for already checked links (#2305)
* Fixed "unnecessary mut" warning

* Fixed minor typo

* Use more than 8 threads for links checking if hardware supports it

* Fixed failing azure Linux check

* Avoid unnecessary HTTP requests to the same, already checked links
2023-12-18 23:24:06 +01:00
Óscar
670b88263c fix: suppress highlight language warnings if highlight_code is false (#2287)
The warning about unknown highlight languages was displayed even when
code highlighting was disabled via `markdown.highlight_code = false`.
This commit adds a condition to check this setting before issuing the
warning, effectively suppressing it when code highlighting is disabled.

Issue: #2280
2023-12-18 23:24:06 +01:00
SquirrelHub
8b2b066e64 Add Checking and Force Flag for Directory in Serve Command (#2265)
* Introduce option to force directory when running the serve command

* Update documentation about the force flag on the serve command

* Resolve cargo fmt issue

* Reword new serve flag documentation
2023-12-18 23:24:06 +01:00
Heitor
841b3dfc92 template:feeds: add extra block (#2263)
* template:feeds: add extra block

* add missing >

* Revert "add missing >"

This reverts commit 45c6b9c6eb.

* Revert "template:feeds: add extra block"

This reverts commit 596f7f1e7f.

* Update docs for feed templates
2023-12-18 23:24:06 +01:00
Andrew Langmeier
4430515a02 Add ignored_static to config (#2209)
* Add ignored_static to config

* Make  handle ignored static files correctly

* cargo fmt

* Match on relative path rather than incorrect target path

* path -> partial path for serve static ignore

* remove debug println

* copy static directory if there is no ignored globset

* Update docs

* Deduplicate code with additional Option argument

* cargo fmt
2023-12-18 23:24:06 +01:00
Vincent Prouillet
35aab566f9 Update deps 2023-12-18 23:24:06 +01:00
Vincent Prouillet
9aa5162659 Update edition 2023-12-18 23:24:06 +01:00
Vincent Prouillet
cf99b5a95f Update changelog 2023-12-18 23:24:06 +01:00
Maksym Vatsyk
208c506ec3 Fix LFI in zola serve (#2258)
* use fs canonicalize to prevent path traversal

* fix cargo fmt
2023-12-18 23:24:06 +01:00
Andrew Langmeier
2cd133b9fb Fixes #2250; Error instead of panic when root directory or config file not present (#2262) 2023-12-18 23:24:06 +01:00
Sergio A. Vargas
1de1dd56de Add attributes to base_url link in atom template (#2261)
The `rel` and `type` HTML attributes are needed in the `base_url` (or
`section.permalink`) link so feed aggregators know that's the HTML page
that corresponds to the atom feed.

Note: The RSS template doesn't have this issue.
2023-12-18 23:24:06 +01:00
Heitor
a1ac81681b Atom template authors (#2259)
* templates:atom: add support for multiple authors

Atom 1.0 [0] support multiple `<author>` entries in the feed. This commit
modified the template to generate as many `<author>` as the page's
metadata contains.

[0] https://validator.w3.org/feed/docs/atom.html#recommendedEntryElements

* Test we can have multiple authors in ATOM feeds
2023-12-18 23:24:06 +01:00
William Ouwehand
c18a0c8031 always sort assets by filename (Windows/Linux difference) (#2236)
* sort page.assets by filename

Uses .to_str() to sort files and subfolders.

The .unwrap() may need work or be replaced by unwrap_or_default(). Given
earlier checks in the function it should work however.

* add tests for assets sorting

* fix rustfmt

* use existing loop instead of windows

* also check the non-recursive test

* use .zip() and add assert msg
2023-12-18 23:24:06 +01:00
TheOnlyMrCat
2532198acb Prevent spans crossing line boundaries in class-based code block formatter (#2237)
* Prevent spans crossing line boundaries in class formatter

* Add snapshot tests for classed highlighting
2023-12-18 23:24:06 +01:00
sinofp
22dc32a589 Add support for lazy loading images (#2211)
* Add optional decoding="async" loading="lazy" for img

In theory, they can make the page load faster and show content faster.

There’s one problem: CommonMark allows arbitrary inline elements in alt text.
If I want to get the correct alt text, I need to match every inline event.

I think most people will only use plain text, so I only match Event::Text.

* Add very basic test for img

This is the reason why we should use plain text when lazy_async_image is enabled.

* Explain lazy_async_image in documentation

* Add test with empty alt and special characters

I totaly forgot one can leave the alt text empty.
I thought I need to eliminate the alt attribute in that case,
but actually empty alt text is better than not having an alt attribute at all:
https://www.w3.org/TR/WCAG20-TECHS/H67.html
https://www.boia.org/blog/images-that-dont-need-alternative-text-still-need-alt-attributes
Thus I will leave the empty alt text.

Another test is added to ensure alt text is properly escaped.
I will remove the redundant escaping code after this commit.

* Remove manually escaping alt text

After removing the if-else inside the arm of Event::Text(text),
the alt text is still escaped.
Indeed they are redundant.

* Use insta for snapshot testing

`cargo insta review` looks cool!

I wanted to dedup the cases variable,
but my Rust skill is not good enough to declare a global vector.
2023-12-18 23:24:06 +01:00
Andrew Langmeier
0a9bfa16c2 Hard link serve panic fix (#2210)
* Fix hard link panic and add better error info to std:fs errors

* cargo fmt

* Remove erroneously committed config change

* Remove console import; Use with context to provide additional error info

* improve error wording
2023-12-18 23:24:06 +01:00
Vincent Prouillet
448a941f93 Fix typo in error message 2023-12-18 23:24:06 +01:00
Andrew Langmeier
8e37025729 Add search.index_format into the serialized config (#2165) (#2196)
* Add search into the serialized config (#2165)

* Only expose index_format

* Create config.search struct

* cargo fmt
2023-12-18 23:24:06 +01:00
Jake G
d72ebb1bdb Fix multi-lingual json index (#2197)
* Fix multi-ligual json index

* multi-lingual search Fix cargo fmt
2023-12-18 23:24:06 +01:00
Jeremy Kerr
63054a96d2 templates: add base URL for feed content (#2190)
Relative links in the entry content do not currently have a base URI, so
will be resolved relative to the feed URI:

Given an entry with the content:

    <a href="some-resource.bin">

And URIS of:

 * entry: https://example.org/blog/some-entry/
 * feed:  https://example.org/atom.xml

The link URI will end up as:

    https://example.org/some-resource.bin

rather than the URI that ends up resolved in the rendered page:

   https://example.org/blog/some-entry/some-resource.bin

The atom and RSS formats allow for an xml:base attribute (itself
specified in [1]) to provide a base URI of a subset of a document. This
change adds xml:base attributes to each entry, using the page permalink.

This gives us something equivalent to:

    <entry>
     <content xml:base="https://example.org/blog/some-entry/">
      <![CDATA[
       <a href="some-resource.bin">
      ]]>
     </content>
    </entry>

[1]: https://www.w3.org/TR/xmlbase/

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2023-12-18 23:24:06 +01:00
‏‏Dave
c61e925073 Implement replace_re filter (#2163)
* Implement replace_re filter

* Cargo fmt

* add regex caching

* cargo fmt

* update docs, update unit test

* rename replace_re -> regex_replace
2023-12-18 23:24:06 +01:00
Marcel
c0dd38b234 Speedup "zola check" command by reusing the Client (#2171)
* Reuse Client when checking urls and add timeout for requests
2023-12-18 23:24:06 +01:00
Ever
201d674da1 print error message when no config file found (#2168)
fixed #2195
2023-12-18 23:24:06 +01:00
Vincent Prouillet
18fbbe532a Next version 2023-12-18 23:24:06 +01:00
Vincent Prouillet
d4d0e4b02a Update syntax highlighting recc 2023-12-17 23:47:03 +01:00
Javier Pérez
8276551811
Update syntax-highlighting.md (#2366) 2023-12-09 21:35:57 +01:00
Spencer Scorcelletti
c031cc592c
Update documention for using zola + Cloudflare Pages per advice in https://github.com/cloudflare/pages-build-image/issues/3#issuecomment-1646873666 (#2364) 2023-11-30 23:14:57 +01:00
Vincent Prouillet
2774d4d410
Update themes gallery (#2356)
Co-authored-by: GitHub Action <action@github.com>
2023-11-13 10:29:04 +01:00
Vincent Prouillet
a7ffb3be81
Update themes gallery (#2349)
Co-authored-by: GitHub Action <action@github.com>
2023-11-04 20:03:29 +01:00
One
7d5ce5c230
Document author (#2347)
* Add author to documentation for config.toml

* Add explanation of how author is used for feeds
2023-10-30 19:03:29 +01:00
c-git
152eccc447
Change to updated version of checkout action (#2340) 2023-10-29 19:45:04 +01:00
Olivier Samyn
0b46736aff
Add multi-stage dockerfile build example (#2327)
* Add multi-stage dockerfile build example

* Simplify install instructions, add docker image deployment example
2023-10-21 22:38:17 +02:00