Skip to content

Commit 49a6093

Browse files
committed
front_matter: skip serializing empty aliases
1 parent 68e4b2d commit 49a6093

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: crates/front_matter/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub struct FrontMatter {
3232
pub description: Option<String>,
3333
/// Used for `releases/X.XX.X` redirects and ones from the old URL scheme to
3434
/// preserve permalinks (e.g. slug.html => slug/).
35-
#[serde(default)]
35+
#[serde(default, skip_serializing_if = "Vec::is_empty")]
3636
pub aliases: Vec<String>,
3737
/// Moved to the `extra` table.
3838
#[serde(default, skip_serializing)]

0 commit comments

Comments
 (0)