Fix some output paths to match the way I'm structuring the info in Hugo
This commit is contained in:
parent
801fb461ca
commit
48fd96763d
@ -16,6 +16,10 @@ OBSIDIAN_MUSIC_FILE=/path/to/your/obsidian/music.yml.md
|
||||
OBSIDIAN_SERIES_FILE=/path/to/your/obsidian/series.yml.md
|
||||
|
||||
# Other directories
|
||||
MARKDOWN_OUTPUT_DIR=output/markdown
|
||||
IMAGES_OUTPUT_DIR=output/images
|
||||
MARKDOWN_OUTPUT_BOOKS_DIR=output
|
||||
MARKDOWN_OUTPUT_GAMES_DIR=output
|
||||
MARKDOWN_OUTPUT_MOVIES_DIR=output/watching
|
||||
MARKDOWN_OUTPUT_MUSIC_DIR=output
|
||||
MARKDOWN_OUTPUT_SERIES_DIR=output
|
||||
IMAGES_OUTPUT_DIR=_assets
|
||||
TEMPLATES_DIR=templates
|
||||
|
@ -69,7 +69,7 @@ func FetchImagesFromFanart(ID int) (posterURL, backgroundURL string, logoURL str
|
||||
}
|
||||
|
||||
func DownloadImage(url, slug, imageType string) error {
|
||||
imageDir := os.Getenv("IMAGES_OUTPUT_DIR")
|
||||
imageDir := filepath.Join(os.Getenv("MARKDOWN_OUTPUT_MOVIES_DIR"), os.Getenv("IMAGES_OUTPUT_DIR"))
|
||||
if err := utils.CreateDirIfNotExists(imageDir); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ func ProcessMovies(movies []Movie) error {
|
||||
|
||||
func generateMovieMarkdown(movie Movie) error {
|
||||
templatePath := filepath.Join(os.Getenv("TEMPLATES_DIR"), "movie.md.tpl")
|
||||
outputDir := os.Getenv("MARKDOWN_OUTPUT_DIR")
|
||||
outputDir := os.Getenv("MARKDOWN_OUTPUT_MOVIES_DIR")
|
||||
if err := utils.CreateDirIfNotExists(outputDir); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user