more doc comments

This commit is contained in:
glyph 2021-11-26 11:08:59 +02:00
parent 9b6c43a951
commit 061611d09d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#![warn(missing_docs)]
//! # nyf
//!
//! _glyph's static site generator_
@ -20,7 +22,7 @@
//! `./site` directory (preserving the sub-directory structure). The contents of the `<h2>`
//! element are spliced into the `[[ title ]]` tag of the base HTML template for each
//! sub-directory template.
//!
use std::{fs, io, path::Path};
// define the path for the template directory
@ -28,6 +30,7 @@ const TEMPLATE_DIR: &str = "./templates";
// define the path for the generated site output
const SITE_DIR: &str = "./site";
/// Run (with the) `nyf`.
pub fn run() -> Result<(), &'static str> {
// read the base html template to a string
let base = format!("{}/base.html", TEMPLATE_DIR);

View File

@ -1,5 +1,7 @@
use std::process;
/// Begin the `nyf` run. Catch any application errors, print them to `stderr` and return an error
/// exit code (`1`).
fn main() {
if let Err(e) = nyf::run() {
eprintln!("{}", e);