Commit graph

8 commits

Author SHA1 Message Date
Zanie Blue
f107406727
Generate CLI reference for documentation (#5685)
Loosely based on [Cargo's
format](https://github.com/rust-lang/cargo/blob/master/src/doc/src/commands/cargo-build.md)

<img width="896" alt="Screenshot 2024-08-01 at 9 44 03 AM"
src="https://github.com/user-attachments/assets/7c016bb3-2b54-46af-8ea8-ce82e07a0e30">

Future work includes:

- Grouping options
- Enforcing some sort of specific command ordering
- Showing possible values for enums
- Adding "long_about" to commands for more context
2024-08-01 16:04:16 +00:00
Zanie Blue
b0e37859ed
Bold active nav links for accessibility (#5673)
Before
<img width="412" alt="Screenshot 2024-07-31 at 3 47 38 PM"
src="https://github.com/user-attachments/assets/d95ebb62-079b-4e20-964c-9876b5978e4c">
After
<img width="412" alt="Screenshot 2024-07-31 at 3 47 21 PM"
src="https://github.com/user-attachments/assets/a658d46a-3eeb-4f00-8952-d4c1dd91afe6">
2024-07-31 16:16:48 -05:00
Zanie Blue
0c680824ca
Omit the nav bar title when it has no use (#5316)
Turns out this is needed for navigation on mobile, but useless on larger
screens.

Closes #5130

<img width="1551" alt="Screenshot 2024-07-22 at 5 47 49 PM"
src="https://github.com/user-attachments/assets/2173549e-e65d-4691-be83-5e3bf0191dd5">
<img width="1551" alt="Screenshot 2024-07-22 at 5 48 02 PM"
src="https://github.com/user-attachments/assets/81012ba8-ce85-4276-8ffa-5c7ef556c389">
<img width="1551" alt="Screenshot 2024-07-22 at 5 48 08 PM"
src="https://github.com/user-attachments/assets/ecf8fcd7-e5d4-45c4-8d46-d09d91a8bbe9">
2024-07-31 10:08:22 -05:00
eth3lbert
89947681d1
Improve copy of console command examples (#5397)
## Summary

This PR improves the copy of the console command example by:

- Preventing the selection of generic prompts and generic output
- Lazily setting copy content by leveraging intersection observer

Most of the changes are inspired by
https://github.com/opensafely/documentation/pull/1461

Some other useful refs:
- https://github.com/squidfunk/mkdocs-material/issues/3647
-
https://mkdocstrings.github.io/recipes/#prevent-selection-of-prompts-and-output-in-python-code-blocks

Resolves #5355

## Test Plan

- 
  ``` shell-session
  mkdocs serve -f mkdocs.public.yml
  ``` 
- Navigate to http://localhost:8000/uv/first-steps/#viewing-the-version
- Try clicking the copy button
- Try copying by selecting the content

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-07-31 14:52:02 +00:00
Zanie Blue
3822a43560
Fix blurring from nav title box shadow (#5374)
Fixes blur noted in https://github.com/astral-sh/uv/pull/5316 but
doesn't drop the title entirely.
https://github.com/astral-sh/uv/pull/5316 is my preferred design, if the
implementation was cost-free.


<img width="1259" alt="Screenshot 2024-07-23 at 3 53 48 PM"
src="https://github.com/user-attachments/assets/6f9b828b-884f-447d-8508-ba4023152e2f">

(nothing to see at the rest of the breakpoints >1220)

<img width="1259" alt="Screenshot 2024-07-23 at 3 53 56 PM"
src="https://github.com/user-attachments/assets/b892cd76-cd91-4e78-b8c8-58e16a8b1130">
2024-07-23 17:33:57 -05:00
Zanie Blue
499b035c8e
Increase padding between each nav section (#5373)
<img width="1259" alt="Screenshot 2024-07-23 at 3 46 45 PM"
src="https://github.com/user-attachments/assets/dae4df4e-cea3-41a2-842c-652b4f9ca014">
<img width="1259" alt="Screenshot 2024-07-23 at 3 46 53 PM"
src="https://github.com/user-attachments/assets/b0751c4b-80bb-4344-816c-e23d5e45f0e4">
<img width="1259" alt="Screenshot 2024-07-23 at 3 46 57 PM"
src="https://github.com/user-attachments/assets/1cea6223-2757-49a0-9b87-1961f9bbd17b">
<img width="1259" alt="Screenshot 2024-07-23 at 3 47 10 PM"
src="https://github.com/user-attachments/assets/a41061c6-f198-45ca-91b6-423f46375089">
2024-07-23 17:31:12 -05:00
Zanie Blue
49ea4a7a91
Reduce spacing between nav items (#5310)
**Before**
<img width="1475" alt="Screenshot 2024-07-22 at 3 56 46 PM"
src="https://github.com/user-attachments/assets/a9c6b929-0569-45a6-9840-d49d955dd55a">

--------

**After**
<img width="1475" alt="Screenshot 2024-07-22 at 3 56 38 PM"
src="https://github.com/user-attachments/assets/98c85e03-fe62-4894-99f6-a49293eacf0b">
2024-07-23 11:50:00 -05:00
Charlie Marsh
e61a221fef
Migrate from MdBook to MkDocs (#5062)
## Summary

We want to have consistency between the Ruff and uv documentation for
the upcoming release. We don't love the Ruff docs, but we'd rather have
consistency and then work towards improving them both, rather than have
two very-different documentation sites that both have weaknesses.

The setup here is simpler than in Ruff as: (1) we don't yet generate any
docs from Rust and (2) we don't try to reuse the README in the uv
documentation (which adds a lot of complexity in Ruff). So the change
here is mostly a 1-to-1 port to MkDocs.

## Test Plan

![Screenshot 2024-07-14 at 9 49
15 PM](https://github.com/user-attachments/assets/8bfb5b06-08ff-4329-b368-d9087b78996e)
2024-07-15 22:22:07 +00:00