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
As far as I can tell, a preprocessor is not executed on the data in SUMMARY.md. If that is true, can be change this somehow?
My usecase for this is to support translations via a mdbook preprocessor. However, if the preprocessor doesn't have access to the outline, it cannot translate it 😄
A simple work-around for me is to translate all the Markdown files (including SUMMARY.md) manually via an external script. However, it would be nice to have the whole thing integrated with mdbook.
The text was updated successfully, but these errors were encountered:
Preprocessors should be able to modify the summary from the sections array. IIRC, all the information of the summary (such as the chapter names) are stored within. You won't be able to modify the file as a whole.
Oh, cool, I'll take a look at that. I was looking at the BookItem enum and that only seems to give me the headers between the chapters — not the actual chapters from the sidebar.
Ah, I got it now! I need to translate the name field in Chapter. The updated name is used in the sidebar. I do have access to this from a BookItem::Chapter.
Hi there,
As far as I can tell, a preprocessor is not executed on the data in
SUMMARY.md
. If that is true, can be change this somehow?My usecase for this is to support translations via a mdbook preprocessor. However, if the preprocessor doesn't have access to the outline, it cannot translate it 😄
A simple work-around for me is to translate all the Markdown files (including
SUMMARY.md
) manually via an external script. However, it would be nice to have the whole thing integrated with mdbook.The text was updated successfully, but these errors were encountered: