Skip to content

Commit 0cd8067

Browse files
committed
fix: Correct category output path in production
1 parent 90029a8 commit 0cd8067

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

layout/styles/category.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@
9696
}
9797
}
9898

99-
.back-link {
100-
text-decoration: underline;
101-
font-size: 1rem;
102-
font-weight: 600;
103-
line-height: 1.5;
104-
}
99+
// .back-link {
100+
// text-decoration: underline;
101+
// font-size: 1rem;
102+
// font-weight: 600;
103+
// line-height: 1.5;
104+
// }
105105
}
106106
}
107107
}

main.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ func main() {
207207
linkURL = filepath.ToSlash(filepath.Join("/", "posts", fmt.Sprintf("%s.html", slugifiedPath)))
208208
}
209209

210+
fmt.Println(linkURL)
211+
210212
categoriesData = append(categoriesData, CategoryInfo{
211213
Name: c, // "Go"
212214
URL: linkURL, // "/posts/go.html"
@@ -658,13 +660,7 @@ func main() {
658660
CurrentURL: "/posts",
659661
}
660662

661-
var outputFilePath string
662-
if appEnv == "production" {
663-
outputFilePath = filepath.Join(categoryPostDir, lib.SlugifyPath(category), "index.html")
664-
os.MkdirAll(filepath.Join(categoryPostDir, lib.SlugifyPath(category)), 0755)
665-
} else {
666-
outputFilePath = filepath.Join(categoryPostDir, fmt.Sprintf("%s.html", lib.SlugifyPath(category)))
667-
}
663+
var outputFilePath = filepath.Join(categoryPostDir, fmt.Sprintf("%s.html", lib.SlugifyPath(category)))
668664

669665
outputFile, err := os.Create(outputFilePath)
670666
if err != nil {

0 commit comments

Comments
 (0)