rust-unofficial / patterns

A catalogue of Rust design patterns, anti-patterns and idioms
https://rust-unofficial.github.io/patterns/
Mozilla Public License 2.0
7.84k stars 354 forks source link

add site url #334

Closed MarcoIeni closed 1 year ago

MarcoIeni commented 1 year ago

From the docs:

site-url: The url where the book will be hosted. This is required to ensure navigation links and script/css imports in the 404 file work correctly, even when accessing urls in subdirectories. Defaults to /. If site-url is set, make sure to use document relative links for your assets, meaning they should not start with /.

Example of the mdbook guide here.

I just tested our "404" page and it doesn't look good. Maybe after merging this it will work!

simonsan commented 1 year ago

Have you checked on a self-hosted test-page in your repo if this doesn't break any links etc.? (not on my PC and doing it remotely doesn't work for me in this moment)

MarcoIeni commented 1 year ago

I've recorded this after running mdbook serve

https://user-images.githubusercontent.com/11428655/209300520-47b44f81-564e-47d8-815e-ff2f08da1485.mp4

simonsan commented 1 year ago

Nice, thank you! 👍🏽