about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/fs.rs2
-rwxr-xr-xsrc/main.rs6
-rwxr-xr-xsrc/markup.rs1
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() {