-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
7 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
# Typikon | ||
|
||
**Typikon lets you use markdown to write your online books.** | ||
Typikon lets you use markdown to write your online books. | ||
|
||
--- | ||
|
||
 | ||
[](https://codecov.io/github/auula/typikon) | ||
[](https://github.com/auula/typikon/blob/master/LICENSE) | ||
 | ||
[](https://github.com/auula/typikon/actions/workflows/rust.yml) | ||
[](https://twitter.com/auula_) | ||
|
||
|
||
--- | ||
|
||
A static website rendering tool similar to mdbook and hugo, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools. | ||
## Introduce | ||
|
||
Typikon name derived from [Typikon](https://en.wikipedia.org/wiki/Typikon) Book, the a static website rendering tool similar to mdbook and hugo, but it focuses only on rendering markdown into an online book, and is easier to use than the other tools. | ||
|
||
--- | ||
|
||
## Preview | ||
|
||
<div style="display: flex; justify-content: space-around;"> | ||
<img src="https://img.ibyte.me/a0mt96.png" alt="Alt text" style="width: 400px; height: 300px;"> | ||
<img src="https://img.ibyte.me/e68k6e.png" alt="Alt text" style="width: 400px; height: 300px;"> | ||
</div> | ||
|
||
--- |
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
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,28 @@ | ||
use typikon::{cli::Command, utils::Logger}; | ||
|
||
#[test] | ||
fn test_handle_init_command() { | ||
// Mock args and log | ||
|
||
let mut log = Logger::console_log(); | ||
|
||
// Test handle_init_command | ||
for cmd in &[ | ||
"build".to_string(), | ||
"init".to_string(), | ||
"theme".to_string(), | ||
"help".to_string(), | ||
] { | ||
match Command::from_str(&cmd) { | ||
Command::Build => typikon::cli::handle_build_command(&["build".to_string()], &mut log), | ||
Command::Theme => { | ||
typikon::cli::handle_build_command(&["--get=xxxxxxx.git".to_string()], &mut log) | ||
} | ||
Command::Init => { | ||
typikon::cli::handle_build_command(&["--path=/xxxxx".to_string()], &mut log) | ||
} | ||
Command::Help => typikon::cli::handle_build_command(&["theme".to_string()], &mut log), | ||
Command::Unknown(_) => typikon::cli::out_banner_string(), | ||
} | ||
} | ||
} |