Skip to content

Commit 4bdf9a6

Browse files
authored
feat: add cot v0.6 docs (#81)
1 parent b058940 commit 4bdf9a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+43
-3
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
[submodule "syntax-highlighting/sublime_toml_highlighting"]
1414
path = syntax-highlighting/sublime_toml_highlighting
1515
url = https://github.com/jasonwilliams/sublime_toml_highlighting.git
16+
[submodule "docs/v0.6"]
17+
path = docs/v0.6
18+
url = https://github.com/cot-rs/cot.git

cot-site-common/src/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,13 @@ mod utils;
33
pub use utils::{Version, VersionError};
44

55
pub const MASTER_VERSION: &str = "master";
6-
pub const LATEST_VERSION: &str = "v0.5";
7-
pub const ALL_VERSIONS: &[&str] = &[MASTER_VERSION, "v0.5", "v0.4", "v0.3", "v0.2", "v0.1"];
6+
pub const LATEST_VERSION: &str = "v0.6";
7+
pub const ALL_VERSIONS: &[&str] = &[
8+
MASTER_VERSION,
9+
LATEST_VERSION,
10+
"v0.5",
11+
"v0.4",
12+
"v0.3",
13+
"v0.2",
14+
"v0.1",
15+
];

cot-site-macros/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ pub fn md_page(input: TokenStream) -> TokenStream {
1212

1313
let MdPageInput { prefix, link } = syn::parse2(input).unwrap();
1414

15-
let md_page = md_pages::parse_md_page(&format!("docs/{prefix}"), &link, &prefix);
15+
let path_prefix = if prefix.is_empty() {
16+
"docs/".to_string()
17+
} else {
18+
format!("docs/{prefix}/docs")
19+
};
20+
let md_page = md_pages::parse_md_page(&path_prefix, &link, &prefix);
1621
md_pages::quote_md_page(&md_page).into()
1722
}
1823

0 commit comments

Comments
 (0)