Skip to content

Commit e7b5c6e

Browse files
committed
refactor: page dir to content, parser to content/
1 parent 0160d0a commit e7b5c6e

31 files changed

Lines changed: 55 additions & 55 deletions

README.org

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@
686686
"fmt"
687687

688688
"github.com/honmaple/snow/builder/hook"
689-
"github.com/honmaple/snow/builder/page"
689+
"github.com/honmaple/snow/builder/content"
690690
"github.com/honmaple/snow/builder/theme"
691691
"github.com/honmaple/snow/config"
692692
)
@@ -699,7 +699,7 @@
699699
return "test"
700700
}
701701

702-
func (testHook) Page(page *page.Page) *page.Page {
702+
func (testHook) Page(page *content.Page) *content.Page {
703703
fmt.Println(page.Title)
704704
return page
705705
}

builder/builder.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"fmt"
66
"sync"
77

8+
"github.com/honmaple/snow/builder/content"
9+
"github.com/honmaple/snow/builder/content/parser"
810
"github.com/honmaple/snow/builder/hook"
9-
"github.com/honmaple/snow/builder/page"
10-
"github.com/honmaple/snow/builder/parser"
1111
"github.com/honmaple/snow/builder/static"
1212
"github.com/honmaple/snow/builder/theme"
1313
"github.com/honmaple/snow/config"
@@ -46,7 +46,7 @@ func Build(conf config.Config) error {
4646
bs := make(Builders, 0)
4747

4848
for _, langc := range conf.Languages {
49-
bs = append(bs, page.NewBuilder(*langc, parser.New(*langc), th, hs.PageHooks()))
49+
bs = append(bs, content.NewBuilder(*langc, parser.New(*langc), th, hs.PageHooks()))
5050
bs = append(bs, static.NewBuilder(*langc, th, hs.StaticHooks()))
5151
}
5252
return bs.Build(context.Background())

builder/cli.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"github.com/honmaple/snow/utils"
1313
"github.com/urfave/cli/v2"
1414

15-
_ "github.com/honmaple/snow/builder/parser/html"
16-
_ "github.com/honmaple/snow/builder/parser/markdown"
17-
_ "github.com/honmaple/snow/builder/parser/orgmode"
15+
_ "github.com/honmaple/snow/builder/content/parser/html"
16+
_ "github.com/honmaple/snow/builder/content/parser/markdown"
17+
_ "github.com/honmaple/snow/builder/content/parser/orgmode"
1818

1919
_ "github.com/honmaple/snow/builder/hook/assets"
2020
_ "github.com/honmaple/snow/builder/hook/encrypt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package page
1+
package content
22

33
import (
44
"path/filepath"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package page
1+
package content
22

33
import (
44
"context"
@@ -10,7 +10,7 @@ import (
1010
"sync"
1111
"time"
1212

13-
"github.com/honmaple/snow/builder/parser"
13+
"github.com/honmaple/snow/builder/content/parser"
1414
"github.com/honmaple/snow/builder/theme"
1515
"github.com/honmaple/snow/builder/theme/template"
1616
"github.com/honmaple/snow/config"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package page
1+
package content
22

33
import (
44
"strings"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package page
1+
package content
22

33
import (
44
"github.com/spf13/viper"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package page
1+
package content
22

33
type (
44
Hook interface {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package page
1+
package content
22

33
import (
44
"strconv"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package page
1+
package content
22

33
import (
44
"path/filepath"

0 commit comments

Comments
 (0)