You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This means we use the chapter title from the meta data to get the chapter slug (for the ToC) and the chapter image directory (for the chapter hero images and figures).
I think we should change these two functions to be based on either:
The md or html filename (ideally at chapter generation so we're not dependent on doing this at runtime and being dependent on the URL which is user supplied data so shouldn't be trusted - at least without verification).
The config - but not sure how to map this (based on the part and chapter number from the meta data?).
I know we've talked about a larger restructure of the config in #561 and even changing how the chapters are generated completely in #634 but we don't seem to be making progress on those so think we need to do something in the short term to address this issue as it prevents viewing the chapters with images in another language (for checking PRs in dev) and will obviously prevent going live with any translations in prod.
My 2 cents: extrapolating the slug from the filename, and using it to build the dirname are common practices in the SSG world, so this seems ok for me, rather that using the translated title.
main.py has the following:
almanac.httparchive.org/src/main.py
Lines 60 to 68 in 7015c95
This means we use the chapter title from the meta data to get the chapter slug (for the ToC) and the chapter image directory (for the chapter hero images and figures).
This does not work if we translate the title as @borisschapira has done for #652 and @SilentJMA did for #539
I think we should change these two functions to be based on either:
I know we've talked about a larger restructure of the config in #561 and even changing how the chapters are generated completely in #634 but we don't seem to be making progress on those so think we need to do something in the short term to address this issue as it prevents viewing the chapters with images in another language (for checking PRs in dev) and will obviously prevent going live with any translations in prod.
@mikegeyser any thoughts?
The text was updated successfully, but these errors were encountered: