From 9cd7029ede6ccd4118d4d050b5ee2b1aca057bbf Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Tue, 12 Dec 2023 19:49:58 +0100 Subject: [PATCH] Begin add tags models + Parse file --- src/app/components/mod.rs | 2 +- src/app/models/tag.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/components/mod.rs b/src/app/components/mod.rs index 0250873..2eebd68 100644 --- a/src/app/components/mod.rs +++ b/src/app/components/mod.rs @@ -31,4 +31,4 @@ mod title; pub use title::Title; -pub use mon_parcours::{MonParcours}; \ No newline at end of file +pub use mon_parcours::MonParcours; diff --git a/src/app/models/tag.rs b/src/app/models/tag.rs index dda9a88..403afdc 100644 --- a/src/app/models/tag.rs +++ b/src/app/models/tag.rs @@ -36,6 +36,11 @@ cfg_if::cfg_if! { Self::from_content(content) } + + fn from_default() -> Option { + let path = std::path::Path::new("data_src").join("tags.yml"); + Self::from_path(&path) + } } } }