Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move doc generation to mkdocs. #2077

Merged
merged 1 commit into from
May 5, 2024
Merged

Move doc generation to mkdocs. #2077

merged 1 commit into from
May 5, 2024

Conversation

mhammond
Copy link
Member

The generated "content" (ie, .html layout, #refs etc) is the same as generated by mdbook - all old links should be unchanged.

The other theme etc generated stuff is obviously very different; mkdocs using the 'material' theme.

This is a step toward #2016, although no actual versioning happens here. Note also that I haven't yet tested the CI deploy code fully (although I have manually checked the commands listed should all work correctly in the docker image listed) - so there's a chance some followups will be necessary if I screwed this up.

Rendered version: https://mhammond.github.io/uniffi-rs

@mhammond mhammond requested review from badboy and bendk April 22, 2024 14:20
@mhammond mhammond requested a review from a team as a code owner April 22, 2024 14:20
Copy link
Contributor

@bendk bendk left a comment

Choose a reason for hiding this comment

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

The docs look good to me, I'd say they're overall an improvement. The one thing I like about the old docs is that the TOC is just a static list rather than dynamically expanded with the disclosure arrows. Is it possible to do that with mdbook?

That's pretty nit-picky though. If this makes versioning easier then I'm all for the change.

@mhammond
Copy link
Member Author

mhammond commented Apr 23, 2024

The one thing I like about the old docs is that the TOC is just a static list rather than dynamically expanded with the disclosure arrows.

heh - I guess beauty truly is in the eye of the beholder - I prefer them to be closed by default - it makes the docs seem "less busy" to my eye :)

Is it possible to do that with mdbook?

I'm not sure - I'll have a look, but FWIW, I think that this would actually be a feature of the theme rather than of mkdocs. I haven't tweaked the theme much at all, but maybe https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#navigation-tabs is close to that? Or maybe https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#navigation-expansion? Too many options :) https://squidfunk.github.io/mkdocs-material/customization/ describes some of the things you can do via templates etc too, but that seems more complicated.

@bendk
Copy link
Contributor

bendk commented Apr 23, 2024

I don't feel strongly at all about the styling. If more people care, then maybe we could do majority vote. If not, I think you should get the say since you're doing the work.

@Sajjon
Copy link
Contributor

Sajjon commented Apr 23, 2024

Looks great!

Is it possible to get more colorful code highlighting?

Screenshot 2024-04-23 at 20 15 10

Would be so much easier to read with more code highlight :)

@mhammond
Copy link
Member Author

Is it possible to get more colorful code highlighting?

I made a small attempt here - see

uniffi-rs/mkdocs.yml

Lines 18 to 21 in b0c9637

# XXX - not getting highlighting in, eg, ```rust``` blocks???
# tried this :(
# markdown_extensions:
# - codehilite
- but I'm erring on the side of just landing this without it, which might help others help work out why it's not working :)

The generated "content" (ie, .html layout, #refs etc) is the same as
generated by mdbook - all old links should be unchanged.

The other theme etc generated stuff is obviously very different;
mkdocs using the 'material' theme.
@mhammond mhammond merged commit e98f98a into mozilla:main May 5, 2024
5 checks passed
@mhammond mhammond deleted the mkdocs branch May 5, 2024 18:42
@mhammond mhammond mentioned this pull request May 13, 2024
11 tasks
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.

3 participants