1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-26 18:51:00 +02:00

fix mdbook redirection table (#1635)

Link `overloading` in Speaker note in URL:
https://google.github.io/comprehensive-rust/hello-world/hello-world.html
is broken.

- broken:
https://google.github.io/comprehensive-rust/hello-world/basic-syntax/functions-interlude.html
(404)
- correct:
https://google.github.io/comprehensive-rust/control-flow-basics/functions.html

The reason why it is broken is below.

Original markdown is here
43474d27d1/src/hello-world/hello-world.md (L36-L37)

```
[overloading](basic-syntax/functions-interlude.md)
```

Page path is `/hello-world/hello-world.html`, so overloading link become
`/hello-world/basic-syntax/functions-interlude.html`, which is 404.

I feel it is better to use redirect to exact path, so I edit `book.toml`
and make link redirect to `/basic-syntax/functions-interlude.html`,
which re-redirect to path `/control-flow-basics/functions.html`


43474d27d1/book.toml (L114)
This commit is contained in:
Masanori Tani
2024-01-04 23:05:49 +09:00
committed by GitHub
parent b1f6851bec
commit 4cb12d0073
2 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ use-boolean-and = true
"exercises/concurrency/elevator.html" = "chat-app.html" "exercises/concurrency/elevator.html" = "chat-app.html"
"generics/closures.html" = "../traits/closures.html" "generics/closures.html" = "../traits/closures.html"
"generics/trait-objects.html" = "../traits/trait-objects.html" "generics/trait-objects.html" = "../traits/trait-objects.html"
"hello-world/basic-syntax/functions-interlude.html" = "../../control-flow-basics/functions.html"
"outros-recursos.html" = "other-resources.html" "outros-recursos.html" = "other-resources.html"
"running-the-course/day-4.html" = "course-structure.html" "running-the-course/day-4.html" = "course-structure.html"
"sintaxe-básica/funções-interlude.html" = "../basic-syntax/functions-interlude.html" "sintaxe-básica/funções-interlude.html" = "../basic-syntax/functions-interlude.html"

View File

@ -34,7 +34,7 @@ Key points:
- Rust is modern with full support for things like Unicode. - Rust is modern with full support for things like Unicode.
- Rust uses macros for situations where you want to have a variable number of - Rust uses macros for situations where you want to have a variable number of
arguments (no function [overloading](basic-syntax/functions-interlude.md)). arguments (no function [overloading](../control-flow-basics/functions.md)).
- Macros being 'hygienic' means they don't accidentally capture identifiers from - Macros being 'hygienic' means they don't accidentally capture identifiers from
the scope they are used in. Rust macros are actually only the scope they are used in. Rust macros are actually only