File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- const script_dir = path self | path dirname
1+ const templates_dir = path self | path dirname
22
33# Seed store topics from disk files when --store is enabled
44if $HTTP_NU . store != null {
5- open ($script_dir | path join topics/page.html) | .append page.html
6- open ($script_dir | path join topics/ base. html) | . append base. html
7- open ($script_dir | path join topics/nav.html) | .append nav.html
5+ open ($templates_dir | path join topics/page.html) | .append page.html
6+ open ($templates_dir | path join topics/ base. html) | . append base. html
7+ open ($templates_dir | path join topics/nav.html) | .append nav.html
88}
99
1010{|req|
1111 match $req.path {
12- "/ file" => { {name: " World " } | .mj ($script_dir | path join page.html) }
12+ "/ file" => { {name: " World " } | .mj ($templates_dir | path join page.html) }
1313 " /topic" => { {name: "World"} | .mj --topic "page.html" }
1414 _ => {
1515 {} | .mj --inline '<h1>Templates</ h1>
You can’t perform that action at this time.
0 commit comments