mirror of
https://github.com/zyllian/zyllian.github.io.git
synced 2025-05-09 18:16:43 -07:00
Build to docs directory
This commit is contained in:
parent
1c706726c1
commit
fcfecfc8c9
4 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
||||||
base_url: "https://zoey.dev"
|
base_url: "https://zoey.dev"
|
||||||
title: zoey.dev
|
title: zoey.dev
|
||||||
description: "Zoey's site."
|
description: "Zoey's site."
|
||||||
|
build: ../docs
|
||||||
|
|
|
@ -22,6 +22,8 @@ pub struct SiteConfig {
|
||||||
pub title: String,
|
pub title: String,
|
||||||
/// The site's description? Not sure if this will actually be used or not
|
/// The site's description? Not sure if this will actually be used or not
|
||||||
pub description: String,
|
pub description: String,
|
||||||
|
/// The site's build directory. Defaults to <site>/build if not specified.
|
||||||
|
pub build: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Struct for the front matter in templates. (nothing here yet)
|
/// Struct for the front matter in templates. (nothing here yet)
|
||||||
|
@ -143,7 +145,10 @@ struct SiteBuilder<'a> {
|
||||||
impl<'a> SiteBuilder<'a> {
|
impl<'a> SiteBuilder<'a> {
|
||||||
/// Creates a new site builder.
|
/// Creates a new site builder.
|
||||||
pub fn new(site: &'a Site, local_mode: Option<String>) -> Self {
|
pub fn new(site: &'a Site, local_mode: Option<String>) -> Self {
|
||||||
let build_path = site.site_path.join("build");
|
let build_path = match &site.config.build {
|
||||||
|
Some(build) => site.site_path.join(build),
|
||||||
|
_ => site.site_path.join("build"),
|
||||||
|
};
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
matter: Matter::new(),
|
matter: Matter::new(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue