Skip to main content

euv_docs/
lib.rs

1//! euv-docs
2//!
3//! Cross-platform documentation viewer and static site generator powered by
4//! euv and euv-ui, parsing Markdown and YAML frontmatter into native UI scenes
5//! or static HTML/JSON bundles.
6
7mod generator;
8mod model;
9mod parser;
10mod viewer;
11
12#[cfg(test)]
13#[path = "../tests/mod.rs"]
14mod tests;
15
16pub use {generator::*, model::*, parser::*, viewer::*};
17
18pub(crate) use parser::{
19    deduplicate_slug, heading_level_num, load_doc_site_excluding, section_sort_rank,
20    should_skip_dir, slugify,
21};
22
23#[cfg(test)]
24use std::env;
25use std::{
26    borrow::Cow,
27    collections::{BTreeMap, BTreeSet, HashMap},
28    f32::consts::{FRAC_PI_2, PI, TAU},
29    ffi::{OsStr, OsString},
30    fmt::{self, Write},
31    fs::{self, DirEntry},
32    io::{self, Error, ErrorKind},
33    iter::Peekable,
34    mem::take,
35    path::{Components, Path, PathBuf},
36    str::Chars,
37};
38
39use {
40    chrono::Utc,
41    euv::*,
42    euv_ui::*,
43    lombok_macros::{Data, Getter, New},
44    pulldown_cmark::{
45        Alignment, BlockQuoteKind, CodeBlockKind, CowStr, Event, HeadingLevel, Options, Parser,
46        Tag, TagEnd,
47    },
48    serde::{Deserialize, Serialize},
49    serde_json::{to_string, to_string_pretty},
50    serde_yaml::from_str,
51};