justjohnd / carmelitas

Carmelita's restaurant site
1 stars 0 forks source link

Cannot change paths to supporting files for subdirectories auto-generated by gulp-html-i18n #54

Open justjohnd opened 4 years ago

justjohnd commented 4 years ago

Problem Statement:

Suggested Solution Use Panini's built in {{root}} helper to create a relative path anywhere in the site: image 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: image image Result All paths update to:

  1. http://localhost:9999/: "../"
  2. http://localhost:9999/index.html: "../"
  3. http://localhost:9999/en-US/index.html: "../"
    • 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 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/

justjohnd commented 4 years ago

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