diff options
author | Devon Sawatsky <novedevo@gmail.com> | 2024-12-17 23:07:13 -0800 |
---|---|---|
committer | Devon Sawatsky <novedevo@gmail.com> | 2024-12-17 23:07:13 -0800 |
commit | ac4b97aaa1bf246d369952e502df9d9dd7bbd466 (patch) | |
tree | 259d0495d7b807ca88392a3751fa7f6a6c74d4d2 /src | |
parent | 5401674797d35d8f95a37a62b2858a3673bf1261 (diff) | |
download | awake-ac4b97aaa1bf246d369952e502df9d9dd7bbd466.tar.gz awake-ac4b97aaa1bf246d369952e502df9d9dd7bbd466.zip |
cat
Diffstat (limited to 'src')
-rwxr-xr-x | src/fs.rs | 2 | ||||
-rwxr-xr-x | src/main.rs | 6 | ||||
-rwxr-xr-x | src/markup.rs | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/fs.rs b/src/fs.rs index 8266053..e8044a0 100755 --- a/src/fs.rs +++ b/src/fs.rs @@ -114,7 +114,7 @@ impl Deref for PathResolution { impl fmt::Display for PathResolution { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", *self) + write!(f, "{}", self.deref()) } } diff --git a/src/main.rs b/src/main.rs index acf0dc5..0ddbb51 100755 --- a/src/main.rs +++ b/src/main.rs @@ -213,6 +213,7 @@ async fn send_template( webpath: Webpath, settings: Settings, ) -> Result<Response, RuntimeError> { + tracing::trace!("sending template"); let template_stem = templated.frontmatter.get("template").expect("no template"); let template_name = Utf8PathBuf::from(format!("{template_stem}.html")); let template_path = settings.template_dir.join(template_name); @@ -234,6 +235,7 @@ async fn send_template( template.set("title", title); + tracing::trace!("doing opengraph stuff!"); if let Some(og_description) = templated.frontmatter.get("description") { let og_title = title; let og_url = format!("https://{}{}", &settings.hostname, webpath); @@ -260,6 +262,7 @@ async fn send_template( variables!(template, og_title, og_url, og_description, og_site_name); } + tracing::trace!("stylin'!"); // styles the templated stuff wants let style_pattern = template.get_pattern("styles").unwrap(); for style in templated.frontmatter.get_many("style") { @@ -268,6 +271,7 @@ async fn send_template( template.set_pattern(pat); } + tracing::trace!("poppin'!"); // path to the file for navigation let mut path: Vec<&str> = webpath.webcanon.iter().collect(); // we don't want the directory/filename itself @@ -312,6 +316,7 @@ async fn send_template( } } + tracing::trace!("starting published block"); 'published: { if let Some(mut published_pattern) = template.get_pattern("published") { let publish_date_result = templated @@ -335,6 +340,7 @@ async fn send_template( } } } + tracing::trace!("finished published block"); // insert the page content itself let markedup = markup::process(&templated.content); diff --git a/src/markup.rs b/src/markup.rs index a1516f4..289bc1f 100755 --- a/src/markup.rs +++ b/src/markup.rs @@ -146,6 +146,7 @@ impl State { } pub fn process(raw: &str) -> String { + tracing::trace!("processing!"); let mut state = State::default(); for line in raw.lines() { |