-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod markdown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mod book_toml; |
29 changes: 29 additions & 0 deletions
29
extensions/scarb-doc/src/docs_generation/markdown/book_toml.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use indoc::formatdoc; | ||
|
||
use crate::AdditionalMetadata; | ||
|
||
#[allow(dead_code)] | ||
pub fn generate_book_toml_content(package_metadata: &AdditionalMetadata) -> String { | ||
formatdoc! { | ||
r#" | ||
[book] | ||
authors = {:?} | ||
language = "en" | ||
multilingual = false | ||
src = "src" | ||
title = "{} - Cairo" | ||
[output.html] | ||
no-section-label = true | ||
[output.html.playground] | ||
runnable = false | ||
[output.html.fold] | ||
enable = true | ||
level = 0 | ||
"#, | ||
package_metadata.authors.clone().unwrap_or_else(|| vec!["<unknown>".to_string()]), | ||
package_metadata.name | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters