fixed graph command by ignoring changelog file

This commit is contained in:
2026-02-26 19:11:36 +01:00
parent 5190291b30
commit be47059b32

View File

@@ -20,7 +20,9 @@ impl WikiGraph {
let mut entries = tokio::fs::read_dir(&docs_dir).await?; let mut entries = tokio::fs::read_dir(&docs_dir).await?;
while let Some(entry) = entries.next_entry().await? { while let Some(entry) = entries.next_entry().await? {
let path = entry.path(); let path = entry.path();
if path.extension().and_then(|s| s.to_str()) == Some("toml") { if path.extension().and_then(|s| s.to_str()) == Some("toml")
&& path.file_name().and_then(|s| s.to_str()) != Some("_changelog.toml")
{
let content = tokio::fs::read_to_string(&path).await?; let content = tokio::fs::read_to_string(&path).await?;
let config: WikiConfig = toml::from_str(&content) let config: WikiConfig = toml::from_str(&content)
.with_context(|| format!("Failed to parse {:?}", path))?; .with_context(|| format!("Failed to parse {:?}", path))?;