From 1fae63c8bd6aefebf97997faee779a216fdf7029 Mon Sep 17 00:00:00 2001 From: hakki Date: Mon, 9 Sep 2024 18:10:47 +0200 Subject: [PATCH] specctra: WIP Logo not working --- build.rs | 4 +++- src/lib.rs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 254a664..992b8c9 100644 --- a/build.rs +++ b/build.rs @@ -2,8 +2,10 @@ include!("src/bin/topola/cli.rs"); use clap::CommandFactory; use clap_mangen::Man; use std::fs::{create_dir_all, File}; -// https://rust-cli.github.io/book/in-depth/docs.html + fn main() -> Result<(), Box> { + std::fs::copy("assets/favicon.ico", "target/doc/logo.ico").expect("Failed to copy crate favicon when building documentation."); + std::fs::copy("assets/logo.svg", "target/doc/logo.svg").expect("Failed to copy crate logo when building documentation."); let cmd = Cli::command(); let man = Man::new(cmd); let folder = "man"; diff --git a/src/lib.rs b/src/lib.rs index 2e0434e..0ef4cff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ +#![doc(html_favicon_url = "logo.ico")] +#![doc(html_logo_url = "logo.png")] #![cfg_attr(not(feature = "disable_contracts"), feature(try_blocks))] pub mod graph;