Skip to content

Commit fbffe23

Browse files
committed
fix: rename const to avoid collision when sourced from www/serve.nu
1 parent e4d58cc commit fbffe23

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

examples/templates/serve.nu

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
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
44
if $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>

0 commit comments

Comments
 (0)