Upgrade gb-asm-tutorial to use mdbook 0.5#172
Conversation
This commit updates the various unpublished crates in the repo to be set up according to the new requirements imposed by mdbook 0.5. In addition, it updates the build and deploy workflow to account for these changes as well. As part of this update, the theme/index.hbs had to be updated to work with some syntax changes made for mdbook 0.5. The biggest change was the update to "font-awesome", which required changes to where were having the font awesome icons show up on web pages as well.
|
@avivace the |
|
I read a bit more through #193, and I think it'd be helpful if @OnStarPrograms / @avivace could further confirm the intention the CSS in that PR. Is the goal to display the contents of all the "answers" throughout the tutorial, while also hiding the "Answer (click me)" text? If so, the current implementation only does that for |
|
@mtthgn On the print version everything should be 'expanded', I believe that was the idea of that PR (and the correct rationale, imo). So displaying all questions and all answers |
There was a previous attempt at ensuring that answers were present on the page when printing. This commit brings that functionality back, and ensure that details are open by taking advantage of the `beforeprint` event.
|
@avivace thanks for the clarification! I've simplified the CSS and added a bit of javascript to ensure that always occurs. Unfortunately there's no way to guarantee they're in an open state for printing without javascript at the moment. |
This PR makes a number of changes, all necessary to address breaking changes introduced in mdBook 0.5:
preprocandi18n-helperscrates now depend on mdbook-preprocessor. As part of 0.5 the mdbook crate was broken down into components.PreProcessortrait slightly changed. Thesupports_renderfunction now returns aResult<bool>instead of merely abool: Addoptionalfield for preprocessors rust-lang/mdBook#2797get_preprocessorwas removed, so I had to usegetinstead: Remove toml as a public dependency rust-lang/mdBook#2773renderercrate now depend onmdbook-rendererandmdbook-html. This one is mostly just updatingusenames.{{#previous}}and{{#next}}handlebars statements to the new syntax: Replace navigation helpers with objects rust-lang/mdBook#2794As part of this update, the theme/index.hbs had to be updated to work with some syntax changes made for mdbook 0.5. The style looked pretty off in my browser (no header nav, sidebar doesn't adjust width, content alignment at certain breakpoints is off), so I would appreciate someone double checking on this front. I'm not sure if this is akin to how pandocs need to be served differently than
mdbook serve, or if something actually broke. Looking at the currently deployed docs, the reason for a custom theme is not immediately apparent to me.Edit by @avivace:
Note: The PR is still in draft pending restoration of the custom theme's localization-related customizations, which appear to have broken as part of the theme/index.hbs update.
Closes #134