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

start: cleanup nav #3941

Merged
merged 3 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions content/docs/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,10 @@
"children": [
{
"slug": "data-management",
"label": "Data Management",
"source": "data-management/index.md",
"children": [
{
"label": "Data and Model Access",
"slug": "access"
},
{
"label": "Data Pipelines",
"slug": "pipelines"
},
"data-and-model-access",
"data-pipelines",
Copy link
Contributor Author

@jorgeorpinel jorgeorpinel Sep 14, 2022

Choose a reason for hiding this comment

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

  • Significantly simplifies this section of sidebar.json.
  • Updates 2 URL paths so they match page titles (good for SEO, best practice).

Copy link
Contributor

Choose a reason for hiding this comment

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

Removing source from things might break the "Edit on GitHub" links unless we update the sidebar logic to better accept them. Might not, but we need to make sure to check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm thanks for letting me know @rogermparent. I did not know that (probably something we can improve on in the engine...) I'll reinstate the sources for now ⏳

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unless we update the sidebar logic to better accept them

iterative/gatsby-theme-iterative#77

Might not, but we need to make sure to check

P.s. I did check and the button links were broken indeed (in the review app).

Copy link
Contributor

Choose a reason for hiding this comment

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

The button on the review app were broken because the link generated based on master/main tree. I checked by changing the path to current branch tree and it's working.

The logic is intact to link the file source using a simple string slug. And, the source field is also getting populated accordingly.
Screen Shot 2022-09-14 at 15 32 52

Copy link
Contributor

@rogermparent rogermparent Sep 14, 2022

Choose a reason for hiding this comment

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

That would be the case for some of them, but the result of the logic on some nested items, for example docs/start, render the link as https://github.com/iterative/dvc.org/blob/main/content/docs/start.md where the file is actually at https://github.com/iterative/dvc.org/blob/main/content/docs/start/index.md. We can likely just make a change that assumes source-less files are at index.md and that'd be all we need to support 90+% of source-less cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well I already rolled this back for now. Feel free to take it to iterative/gatsby-theme-iterative#77 😬

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, I checked on the rolled-back version of the preview app.

Yes, we do need to define the source for items with index.md.

{
"label": "Metrics, Parameters, and Plots",
"slug": "metrics-parameters-plots"
Expand All @@ -60,14 +53,8 @@
},
{
"slug": "experiments",
"label": "Experiments",
"source": "experiments/index.md",
"children": [
{
"label": "Visualization",
"slug": "visualization"
}
]
"children": ["visualization"]
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions content/docs/start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Now you're ready to DVC!
DVC's features can be grouped into functional components. You can explore them
in two independent trails:

### Data Management Trail
### Data Management

- [**Data and model versioning**](/doc/start/data-and-model-versioning) (try
this next) is the base layer of DVC for large files, datasets, and machine
Expand All @@ -69,7 +69,7 @@ in two independent trails:
be attached to pipelines. These let you capture, navigate, and evaluate ML
projects without leaving Git. Think "Git for machine learning".

### Experiments Trail
### Experimentation

- [**Experiments**](/doc/start/experiments) enable exploration, iteration, and
comparison across many ML experiments. Track your experiments with automatic
Comment on lines -72 to 75
Copy link
Contributor Author

@jorgeorpinel jorgeorpinel Sep 14, 2022

Choose a reason for hiding this comment

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

Should we call this trail something else? Maybe "Machine Learning Experimentation" ?

Expand Down
18 changes: 9 additions & 9 deletions redirects-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@
"^/doc/install/plugins(/.*)?$ /doc/install/ide-plugins$1",

"^/doc/get-started(/.*)?$ /doc/start",
"^/doc/start/data-versioning$ /doc/start/data-and-model-versioning",
"^/doc/start/data-access$ /doc/start/data-and-model-access",
"^/doc/start/data-and-model-versioning(/.*)?$ /doc/start/data-management$1 302",
"^/doc/start/data-and-model-access(/.*)?$ /doc/start/data-management/access$1 302",
"^/doc/start/data-pipelines(/.*)?$ /doc/start/data-management/pipelines$1 302",
"^/doc/start/metrics-parameters-plots(/.*)?$ /doc/start/data-management/metrics-parameters-plots$1 302",
"^/doc/start/sharing-data-and-model-files$ /doc/start/data-and-model-versioning#storing-and-sharing 302",
"^/doc/start/data-versioning$ /doc/start/data-management",
"^/doc/start/data-and-model-versioning(/.*)?$ /doc/start/data-management 302",
"^/doc/start/sharing-data-and-model-files$ /doc/start/data-management#storing-and-sharing 302",
"^/doc/start/data-access$ /doc/start/data-management/data-and-model-access",
"^/doc/start/data-and-model-access(/.*)?$ /doc/start/data-management/data-and-model-access 302",
"^/doc/start/data-pipelines(/.*)?$ /doc/start/data-management/data-pipelines 302",
"^/doc/start/metrics-parameters-plots(/.*)?$ /doc/start/data-management/metrics-parameters-plots 302",
Comment on lines -41 to +47
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated and simplified redirects as well (using final locations for previous 301 ones, plus fortunately many were 302s so we can change those any time).

"^/doc/tutorial(/.*)?$ /doc/start",
"^/doc/tutorials(/.*)? /doc/start",
"^/doc/tutorials/get-started(/.*)?$ /doc/start",

"^/doc/tutorials/versioning(/.*)?$ /doc/use-cases/versioning-data-and-models/tutorial",
"^/doc/use-cases/versioning-data-and-model-files/tutorial$ /doc/use-cases/versioning-data-and-models/tutorial",
"^/doc/tutorials(/.*)? /doc/start",

"^/doc/use-cases/data-and-model-files-versioning/?$ /doc/use-cases/versioning-data-and-models",
"^/doc/use-cases/versioning-data-and-model-files/?$ /doc/use-cases/versioning-data-and-models",
"^/doc/use-cases/shared-development-server$ /doc/use-cases/fast-data-storage-layer#example-shared-development-server",
Expand Down