diff --git a/cmd/site/main.go b/cmd/site/main.go index 635c313..da0207d 100644 --- a/cmd/site/main.go +++ b/cmd/site/main.go @@ -10,8 +10,8 @@ import ( "time" "christine.website/cmd/site/internal/blog" - "christine.website/cmd/site/internal/jsonfeed" "christine.website/cmd/site/internal/middleware" + "christine.website/jsonfeed" "github.com/gorilla/feeds" "github.com/povilasv/prommod" "github.com/prometheus/client_golang/prometheus" @@ -194,6 +194,7 @@ func Build() (*Site, error) { Title: item.Title, DatePublished: item.Date, ContentHTML: string(item.BodyHTML), + Tags: item.Tags, }) smi.Add(&sitemap.URL{ diff --git a/cmd/site/internal/jsonfeed/.travis.yml b/jsonfeed/.travis.yml similarity index 100% rename from cmd/site/internal/jsonfeed/.travis.yml rename to jsonfeed/.travis.yml diff --git a/cmd/site/internal/jsonfeed/LICENSE b/jsonfeed/LICENSE similarity index 100% rename from cmd/site/internal/jsonfeed/LICENSE rename to jsonfeed/LICENSE diff --git a/cmd/site/internal/jsonfeed/README.md b/jsonfeed/README.md similarity index 100% rename from cmd/site/internal/jsonfeed/README.md rename to jsonfeed/README.md diff --git a/cmd/site/internal/jsonfeed/jsonfeed.go b/jsonfeed/jsonfeed.go similarity index 100% rename from cmd/site/internal/jsonfeed/jsonfeed.go rename to jsonfeed/jsonfeed.go diff --git a/cmd/site/internal/jsonfeed/jsonfeed_test.go b/jsonfeed/jsonfeed_test.go similarity index 91% rename from cmd/site/internal/jsonfeed/jsonfeed_test.go rename to jsonfeed/jsonfeed_test.go index cd071d7..d345f38 100644 --- a/cmd/site/internal/jsonfeed/jsonfeed_test.go +++ b/jsonfeed/jsonfeed_test.go @@ -2,22 +2,21 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/ -package jsonfeed_test +package jsonfeed import ( "os" "testing" "time" - "christine.website/cmd/site/internal/jsonfeed" "github.com/stretchr/testify/assert" ) -func Test_ParseSimple(t *testing.T) { +func TestParseSimple(t *testing.T) { r, err := os.Open("testdata/feed.json") assert.NoError(t, err, "Could not open testdata/feed.json") - feed, err := jsonfeed.Parse(r) + feed, err := Parse(r) assert.NoError(t, err, "Could not parse testdata/feed.json") assert.Equal(t, "https://jsonfeed.org/version/1", feed.Version) diff --git a/cmd/site/internal/jsonfeed/testdata/feed.json b/jsonfeed/testdata/feed.json similarity index 100% rename from cmd/site/internal/jsonfeed/testdata/feed.json rename to jsonfeed/testdata/feed.json