refreshing pages & look and feel a bit
hopefully the new :folder: and :page: icons help you navigate the hobby corners better
This commit is contained in:
parent
7720c9df0b
commit
d968da10a0
24 changed files with 453 additions and 204 deletions
|
@ -160,7 +160,13 @@ async fn sandbox(State(state): State<Arc<Server>>) -> Response {
|
|||
|
||||
async fn branch(RawQuery(named_id): RawQuery, State(state): State<Arc<Server>>) -> Html<String> {
|
||||
if let Some(named_id) = named_id {
|
||||
if let Some(&branch_id) = state.treehouse.branches_by_named_id.get(&named_id) {
|
||||
let branch_id = state
|
||||
.treehouse
|
||||
.branches_by_named_id
|
||||
.get(&named_id)
|
||||
.copied()
|
||||
.or_else(|| state.treehouse.branch_redirects.get(&named_id).copied());
|
||||
if let Some(branch_id) = branch_id {
|
||||
let branch = state.treehouse.tree.branch(branch_id);
|
||||
if let Source::Tree { input, tree_path } = state.treehouse.source(branch.file_id) {
|
||||
let file_path = state.target_dir.join(format!("{tree_path}.html"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue