Diffstat (limited to 'internal/b2')
| -rw-r--r-- | internal/b2/client.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/b2/client.go b/internal/b2/client.go index d712736..7b745a8 100644 --- a/internal/b2/client.go +++ b/internal/b2/client.go @@ -3,7 +3,6 @@ package b2 import ( "context" "fmt" - "slices" "strings" "time" @@ -35,7 +34,6 @@ func NewB2Client(cfg *config.B2Config) (*B2Client, error) { type BlogPage struct { Link string FileName string - Lang string Metadata *frontmatter.Metadata } @@ -76,9 +74,6 @@ func (c *B2Client) Scan(prefix string) ([]*BlogPage, error) { nameParts := strings.Split(linkParts[len(linkParts)-1], ".") fileName := strings.Join(nameParts[:len(linkParts)-1], ".") - tags := strings.Split(attrs.Info["tags"], ",") - slices.Sort(tags) - filePaths = append(filePaths, &BlogPage{ Link: obj.Name(), FileName: fileName, @@ -88,7 +83,7 @@ func (c *B2Client) Scan(prefix string) ([]*BlogPage, error) { ActionDate: attrs.Info["action-date"], PublishedTime: publishedTime, Thumbnail: attrs.Info["thumbnail"], - Tags: tags, + Tags: strings.Split(attrs.Info["tags"], ","), Geolocation: attrs.Info["geolocation"], }, }) |