Fix some output paths to match the way I'm structuring the info in Hugo

This commit is contained in:
Óscar M. Lage 2024-10-09 21:14:25 +02:00
parent 801fb461ca
commit 48fd96763d
3 changed files with 8 additions and 4 deletions

View File

@ -16,6 +16,10 @@ OBSIDIAN_MUSIC_FILE=/path/to/your/obsidian/music.yml.md
OBSIDIAN_SERIES_FILE=/path/to/your/obsidian/series.yml.md OBSIDIAN_SERIES_FILE=/path/to/your/obsidian/series.yml.md
# Other directories # Other directories
MARKDOWN_OUTPUT_DIR=output/markdown MARKDOWN_OUTPUT_BOOKS_DIR=output
IMAGES_OUTPUT_DIR=output/images 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 TEMPLATES_DIR=templates

View File

@ -69,7 +69,7 @@ func FetchImagesFromFanart(ID int) (posterURL, backgroundURL string, logoURL str
} }
func DownloadImage(url, slug, imageType string) error { 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 { if err := utils.CreateDirIfNotExists(imageDir); err != nil {
return err return err
} }

View File

@ -94,7 +94,7 @@ func ProcessMovies(movies []Movie) error {
func generateMovieMarkdown(movie Movie) error { func generateMovieMarkdown(movie Movie) error {
templatePath := filepath.Join(os.Getenv("TEMPLATES_DIR"), "movie.md.tpl") 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 { if err := utils.CreateDirIfNotExists(outputDir); err != nil {
return err return err
} }