intermodal/bin/gen/src/config.rs
Casey Rodarmor 1cb1178672
Create FAQ
Add an FAQ section to the book. Include information about how to use
imdl with `fzf --preview`.

type: documentation
fixes:
- https://github.com/casey/intermodal/issues/397
2020-04-19 23:19:29 -07:00

21 lines
491 B
Rust

use crate::common::*;
const PATH: &str = "bin/gen/config.yaml";
#[derive(Debug, Deserialize)]
pub(crate) struct Config {
pub(crate) changelog: BTreeMap<String, Metadata>,
pub(crate) examples: Vec<Example>,
pub(crate) packages: Vec<Package>,
pub(crate) references: Vec<ReferenceSection>,
pub(crate) faq: Vec<FaqEntry>,
}
impl Config {
#[throws]
pub(crate) fn load(root: &Path) -> Config {
let file = File::open(root.join(PATH))?;
serde_yaml::from_reader(file)?
}
}