Background: I have a multi-host multilingual site. English and Japanese, each built to their own GitHub Pages repo.
I set up separate static
directories to support localized images.
The Issue: The localized images are displayed correctly in localhost, but when I build the site, the default English image is used on the Japanese site.
The Setup: Here is some info about the setup:
Directory structure:
├── archetypes
├── bin
├── config
├── content
├── public
├── resources
├── static
├── static_en
├── static_ja
└── themes
Here are the two images:
static_ja
└── images
└── icons
└── logo.svg
static_en
└── images
└── icons
└── logo.svg
Here is the config structure:
config
├── _default
│ ├── config.toml
│ ├── languages.toml
│ └── menus
│ ├── config.en.toml
│ └── config.ja.toml
├── development
│ ├── config.toml
│ └── languages.toml
└── production
└── config.toml
The global setting is in config/_default/config.toml
:
staticDir = "static"
The localized settings are in config/_default/languages.toml
:
[en]
contentDir = "content/en"
languageName = "English"
weight = 1
title = "Site Name EN"
baseurl = "https://example.com/"
staticDir2 = "static_en"
[ja]
contentDir = "content/ja"
languageName = "日本語"
weight = 2
title = "Site Name JA"
baseurl = "https://example.co.jp"
staticDir2 = "static_ja"
Can you think of what would cause the English image to be used in the built Japanese site?