Skip to content

Commit

Permalink
Fix sitemap api
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sumi-k committed Jan 24, 2024
1 parent 545e665 commit 84d4abe
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
)

//go:embed templates/*.html
//go:embed templates/*.txt
var templateFS embed.FS

var router *gin.Engine
Expand Down
2 changes: 1 addition & 1 deletion sitemap/sitemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (repository *SitemapRepository) GenerateSitemap(c *gin.Context) {
{Loc: baseUrl, Priority: `1`},
}

filePath := ".output/public/path.txt"
filePath := "templates/path.txt"
sitemapUrls, err := repository.addPages(baseUrl, sitemapUrls, filePath)
if err != nil {
log.Error(err)
Expand Down
1 change: 1 addition & 0 deletions sitemap/sitemap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
)

//go:embed templates/career-email-template.html
//go:embed templates/path.txt
var templateFS embed.FS

var repo *SitemapRepository
Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions templates/path.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services
portfolio
contributions
resources
about
contact
android-app-development
ios-app-development
mobile-app-development
thank-you
jobs/thank-you
unsubscribe

0 comments on commit 84d4abe

Please sign in to comment.