gulp-html-i18n generates subdirectories for language files inside /dist on build (ex.: dist/en-US, dist/ja, etc.)
All pages use Panini and access the default.html layout for header. Inside header path to css (and other files in assets) is "./assets/..."
Because the language files are in a subdirectory, they can't access the files in "./"
Suggested Solution
Use Panini's built in {{root}} helper to create a relative path anywhere in the site:
Link to helper description: https://get.foundation/emails/docs/panini.htmlResult
{{root}} does not seem to appear on any of the file subdirectories
Suggested Solution
Define the path section inside the yaml file that assign variables to the language-specifc file via "gulp-html-i18n" package:
Result
All paths update to:
Note: Default language set to English, which is why index.html populates with "../", but where is "./" coming from in (1)?
What is difference between (1) and (2) above? Which is the root?
All pages load on local browser, however when deployed the link to css file in the root is broken.
How do I decouple index.html from the language files OR have assets/en-US/index.html load initiallySuggested Solution Revmoed defaultLang property from gulpfile
Removal of defaultLang: 'en-US' from gulpfile results in "Cannot GET /index.html" on load. Original files under /assets are not compiled, only language files.
Creating an absolute path (assigned by variable) solved the problem!
Note that relative paths between pages must be maintained to keep navigation inside the appropriate language directory
Problem Statement:
gulp-html-i18n generates subdirectories for language files inside /dist on build (ex.: dist/en-US, dist/ja, etc.)
All pages use Panini and access the default.html layout for header. Inside header path to css (and other files in assets) is "./assets/..."
Because the language files are in a subdirectory, they can't access the files in "./"
Suggested Solution Use Panini's built in {{root}} helper to create a relative path anywhere in the site: Link to helper description: https://get.foundation/emails/docs/panini.html Result {{root}} does not seem to appear on any of the file subdirectories
Suggested Solution Define the path section inside the yaml file that assign variables to the language-specifc file via "gulp-html-i18n" package: Result All paths update to:
All pages load on local browser, however when deployed the link to css file in the root is broken.
How do I decouple index.html from the language files OR have assets/en-US/index.html load initially Suggested Solution Revmoed defaultLang property from gulpfile
Suggested Solution Create absolute path and assign by in language yaml file. path: https://justjohnd.github.io/carmelitas/