Skip to content

feat: support model introduced in v0.5.+#5

Merged
ngyewch merged 1 commit intongyewch:mainfrom
loicsikidi:feat/migrate-to-v0.5.x
Feb 22, 2026
Merged

feat: support model introduced in v0.5.+#5
ngyewch merged 1 commit intongyewch:mainfrom
loicsikidi:feat/migrate-to-v0.5.x

Conversation

@loicsikidi
Copy link
Copy Markdown
Contributor

fixes #4

Note: v0.5.+ of mdbook introduces a list of breaking changes in
preprocesor's model. This commit sync each change accordingly.
Comment thread model.go
// deprecated: since v0.5.0 of mdbook, Multilingual field has been removed
Multilingual bool `json:"multilingual,omitempty"`
Language string `json:"language,omitempty"`
TextDirection string `json:"text-direction,omitempty"`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread model.go
CreateMissing bool `json:"create_missing"`
UseDefaultPreprocessors bool `json:"use_default_preprocessors"`
ExtraWatchDirs []string `json:"extra_watch_dirs,omitempty"`
BuildDir string `json:"build-dir,omitempty"`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread model.go
}

// GetItems returns the list of book items
func (b *Book) GetItems() []*BookItem {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allow to support both versions in a seamless manner

@ngyewch
Copy link
Copy Markdown
Owner

ngyewch commented Feb 22, 2026

Nice, thanks!

@ngyewch ngyewch merged commit f7f4d83 into ngyewch:main Feb 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support mdbook >= v0.5.0

2 participants