-
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.
commit-id:b5f6227b --- **Stack**: - #1464 - #1463 - #1462 - #1461 ⬅⚠️ *Part of a stack created by [spr](https://github.com/ejoffe/spr). Do not merge manually using the UI - doing so may have unexpected results.*
- Loading branch information
1 parent
aa7866f
commit ebccab9
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