merodi
A markdown-based static site generator.
git clone https://git.pi66.xyz/merodi
About | Files | Commits | Refs | License
fix: use correct build mode for output path
Author: pi66
Date: 2026-09-18 18:02
commit: cd18ad5b
Stat
| M | src/core/build/compile/main.go | 3 | +1 | -2 |
Diff
diff --git a/src/core/build/compile/main.go b/src/core/build/compile/main.go
index 75cf061..c9f0314 100644
--- a/src/core/build/compile/main.go
+++ b/src/core/build/compile/main.go
@@ -15,7 +15,6 @@ import (
type Compile struct {
State *state.State
- Mode config.Mode
Jinja JinjaEngine
}
@@ -62,7 +61,7 @@ func (self *Compile) resolveHTMLPath(mdPath string) (string, error) {
return "", err
}
destDir := self.State.Config.Tree.DraftDest
- if self.Mode == config.Release {
+ if self.State.Lua.Build.Mode == config.Release {
destDir = self.State.Config.Tree.ReleaseDest
}
...
Show all
Show less
diff --git a/src/core/build/compile/main.go b/src/core/build/compile/main.go
index 75cf061..c9f0314 100644
--- a/src/core/build/compile/main.go
+++ b/src/core/build/compile/main.go
@@ -15,7 +15,6 @@ import (
type Compile struct {
State *state.State
- Mode config.Mode
Jinja JinjaEngine
}
@@ -62,7 +61,7 @@ func (self *Compile) resolveHTMLPath(mdPath string) (string, error) {
return "", err
}
destDir := self.State.Config.Tree.DraftDest
- if self.Mode == config.Release {
+ if self.State.Lua.Build.Mode == config.Release {
destDir = self.State.Config.Tree.ReleaseDest
}
...
diff --git a/src/core/build/compile/main.go b/src/core/build/compile/main.go
index 75cf061..c9f0314 100644
--- a/src/core/build/compile/main.go
+++ b/src/core/build/compile/main.go
@@ -15,7 +15,6 @@ import (
type Compile struct {
State *state.State
- Mode config.Mode
Jinja JinjaEngine
}
@@ -62,7 +61,7 @@ func (self *Compile) resolveHTMLPath(mdPath string) (string, error) {
return "", err
}
destDir := self.State.Config.Tree.DraftDest
- if self.Mode == config.Release {
+ if self.State.Lua.Build.Mode == config.Release {
destDir = self.State.Config.Tree.ReleaseDest
}