Closed paperdigits closed 2 years ago
Doing this should also allow us to package the epub relatively easily, no?
During the epub build, in the currently failed action, hugo is putting each language in its own folder, including English. I'm not sure when it started doing that, but the epub looks like it has no content, even though it made the .epub file.
@paperdigits: for now, for the darktable.org builds of dtdocs we need to build epub and pdf documents without translations. The CI already does this so I would suggest running the same code that the CI does when building.
I think I've fixed the issue with the CI now.
The search is also broken for non-English languages. The correct index.json is created in each language, but we've hard-coded the URL and it points to the English index.json file.
Right now in app.js
we have the following:
// Initialize lunrjs using our generated index file
function initLunr() {
var request = new XMLHttpRequest();
request.open('GET', '{{ "index.json" | absURL }}', true);
lunr.js supports multi-lingual files, as noted here: https://lunrjs.com/guides/language_support.html
I fixed this yesterday and search now works for all languages on gh pages
I think for the epub, we'll just need to copy all the images into place after we build the HTML.
Something like this should work:
find /source -regextype posix-extended -regex '.*(gif|jpg)' \
-exec cp --parents {} /dest \; -print
This works, it just needs to be looped:
cd content && find ./ -regextype posix-extended -regex '.*(gif|jpg|png|svg)' -exec cp --parents {} ../public-epub/de \; -print
This issue has not had any activity in the past 60 days and will be closed in 365 days if not updated.
This is done now
@elstoc mentioned we should render English into its own subdirectory, e.g. en-us, fr-fr, etc etc.
Is this the only way to do this in Hugo? https://gohugo.io/content-management/multilingual/#configure-multilingual-multihost