Skip to content

Commit

Permalink
[site] make more mobile friendly
Browse files Browse the repository at this point in the history
Our navigation looked a bit off on mobile -- mobile and top-level tabs don't
seem to go well. Instead, just put everything on the left for now.
  • Loading branch information
sunshowers committed Oct 8, 2024
1 parent 67f1aae commit cd02fa2
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 39 deletions.
66 changes: 31 additions & 35 deletions site/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ theme:
name: material
custom_dir: overrides
features:
- navigation.tabs
- navigation.sections
- navigation.indexes
- navigation.footer
- navigation.instant
- navigation.instant.progress
Expand Down Expand Up @@ -67,60 +65,58 @@ hooks:
- overrides/hooks/shortcodes.py

nav:
- Home:
- index.md
- "Installation":
- "Pre-built binaries": docs/installation/pre-built-binaries.md
- docs/installation/from-source.md
- docs/installation/updating.md
- index.md
- "Getting started":
- "Pre-built binaries": docs/installation/pre-built-binaries.md
- docs/installation/from-source.md
- docs/installation/updating.md
- "Platform-specific notes":
- docs/installation/windows.md
- docs/installation/macos.md
- docs/installation/release-urls.md
- changelog.md
- Usage:
- "Using nextest":
- docs/running.md
- docs/listing.md
- docs/reporting.md
- "Features":
- docs/features/retries.md
- docs/features/slow-tests.md
- "Features":
- docs/features/retries.md
- docs/features/slow-tests.md
- "More features":
- docs/features/leaky-tests.md
- docs/features/target-runners.md
- "Features for CI":
- docs/ci-features/archiving.md
- "Partitioning/sharding runs": docs/ci-features/partitioning.md
- "Filterset DSL":
- docs/filtersets/index.md
- "About filtersets": docs/filtersets/index.md
- "DSL reference": docs/filtersets/reference.md
- Configuration:
- docs/configuration/index.md
- docs/configuration/per-test-overrides.md
- "Integrations":
- "Overview": docs/integrations/index.md
- docs/integrations/test-coverage.md
- "Miri interpreter": docs/integrations/miri.md
- docs/integrations/criterion.md
- "cargo-mutants": docs/integrations/cargo-mutants.md
- Configuration:
- "Configuring nextest": docs/configuration/index.md
- docs/configuration/per-test-overrides.md
- "More configuration":
- "Specifying platforms": docs/configuration/specifying-platforms.md
- "Environment variables": docs/configuration/env-vars.md
- "Minimum versions": docs/configuration/minimum-versions.md
- "Heavy tests": docs/configuration/threads-required.md
- "Mutual exclusion and rate-limiting": docs/configuration/test-groups.md
- docs/configuration/setup-scripts.md
- Machine-readable output:
- docs/machine-readable/index.md
- Machine-readable output:
- "About output formats": docs/machine-readable/index.md
- "JUnit support": docs/machine-readable/junit.md
- "More formats":
- "Test and binary lists": docs/machine-readable/list.md
- "JUnit support": docs/machine-readable/junit.md
- docs/machine-readable/libtest-json.md
- "Integrations":
- docs/integrations/index.md
- docs/integrations/test-coverage.md
- "Miri interpreter": docs/integrations/miri.md
- docs/integrations/criterion.md
- "cargo-mutants": docs/integrations/cargo-mutants.md
- "Stability policy":
- docs/stability/index.md
- "Design":
- docs/design/how-it-works.md
- docs/design/custom-test-harnesses.md
- Benchmarks:
- docs/benchmarks/index.md
- "Crates.io": "https://crates.io/crates/cargo-nextest"
- "Stability policy": docs/stability/index.md
- "Design":
- docs/design/how-it-works.md
- docs/design/custom-test-harnesses.md
- "Benchmarks": docs/benchmarks/index.md
- changelog.md

markdown_extensions:
# Python Markdown
Expand Down
4 changes: 4 additions & 0 deletions site/src/docs/benchmarks/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
icon: material/speedometer
---

# Benchmarks

Nextest's [execution model](../design/how-it-works.md) generally leads to faster test runs than Cargo. How much faster depends on the specifics, but here are some general guidelines:
Expand Down
6 changes: 5 additions & 1 deletion site/src/docs/configuration/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Configuration
---
icon: material/tune
---

# Configuring nextest

cargo-nextest supports repository-specific configuration at the location `.config/nextest.toml` from the Cargo workspace root. The location of the configuration file can be overridden with the `--config-file` option.

Expand Down
4 changes: 4 additions & 0 deletions site/src/docs/filtersets/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
icon: material/account-filter
---

# Filterset DSL

Nextest supports a domain-specific language (DSL) for choosing sets of tests called **filtersets** (formerly **filter expressions**). The DSL is inspired by, and is similar to, [Bazel query](https://bazel.build/docs/query-how-to) and [Mercurial revsets](https://www.mercurial-scm.org/repo/hg/help/revsets).
Expand Down
4 changes: 4 additions & 0 deletions site/src/docs/integrations/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
icon: material/vector-combine
---

# Integrations with other tools

A number of other tools in the Rust ecosystem have integrated with nextest. Some of the more prominent ones are:
Expand Down
6 changes: 5 additions & 1 deletion site/src/docs/machine-readable/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Machine-readable output
---
icon: material/message-processing-outline
---

# Machine-readable output formats

Nextest provides a number of ways to obtain output suitable for consumption by other tools or infrastructure.

Expand Down
4 changes: 4 additions & 0 deletions site/src/docs/stability/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
icon: material/ship-wheel
---

# Stability policy

This section contains information on how cargo-nextest will evolve in a backwards-compatible way over time.
Expand Down
5 changes: 3 additions & 2 deletions site/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Nextest
title: Home
description: A next-generation test runner for Rust.
icon: material/home
---

# cargo-nextest
Expand All @@ -17,7 +18,7 @@ Welcome to the home page for **cargo-nextest**, a next-generation test runner fo
- **[Up to 3× as fast](docs/benchmarks/index.md) as cargo test.** Nextest uses a [state-of-the-art execution model](docs/design/how-it-works.md) for faster, more reliable test runs.
- **Identify [slow](docs/features/slow-tests.md) and [leaky](docs/features/leaky-tests.md) tests.** Use nextest to detect misbehaving tests, identify bottlenecks during test execution, and optionally terminate tests if they take too long.
- **Filter tests using an embedded language.** Use powerful [filtersets](docs/filtersets/index.md) to specify granular subsets of tests on the command-line, and to enable [per-test overrides](docs/configuration/per-test-overrides.md).
- **Configure [per-test settings](docs/configuration/per-test-overrides.md)**. [Automatically retry](docs/features/retries.md#per-test-overrides) subsets of tests, mark them as [heavy](docs/configuration/threads-required.md), or [run them serially](docs/configuration/test-groups.md).
- **Configure [per-test settings](docs/configuration/per-test-overrides.md)**. [Automatically retry](docs/features/retries.md#per-test-settings) subsets of tests, mark them as [heavy](docs/configuration/threads-required.md), or [run them serially](docs/configuration/test-groups.md).
- **Designed for CI.** Nextest addresses real-world pain points in continuous integration scenarios:
- Use **[pre-built binaries](docs/installation/pre-built-binaries.md)** for quick installation.
- Set up CI-specific **[configuration profiles](docs/configuration/index.md)**.
Expand Down
1 change: 1 addition & 0 deletions site/src/theme/css/extra.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:root {
--md-status--experimental: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 19a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1c0-.21-.07-.41-.18-.57L13 8.35V4h-2v4.35L5.18 18.43c-.11.16-.18.36-.18.57m1 3a3 3 0 0 1-3-3c0-.6.18-1.16.5-1.63L9 7.81V6a1 1 0 0 1-1-1V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1v1.81l5.5 9.56c.32.47.5 1.03.5 1.63a3 3 0 0 1-3 3H6m7-6 1.34-1.34L16.27 18H7.73l2.66-4.61L13 16m-.5-4a.5.5 0 0 1 .5.5.5.5 0 0 1-.5.5.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5Z"></path></svg>');
--md-primary-fg-color: #045;
--md-primary-fg-color--dark: #045;
}

.md-status--experimental::after {
Expand Down

0 comments on commit cd02fa2

Please sign in to comment.