google / google/comprehensive-rust

Add structured data to generated pages

Open
#1,142 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
Rust
Stars
33.4k
Forks
2.1k
Avg merge
1d 3h
Merged PRs (30d)
10

Description

We should look into adding [structured data](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data) to the generated HTML.

I imagine this could be metadata about each page:

- title, though this is probably covered fine with the `title` element,
- when was the page last changed (look this up in Git),
- place in the page hierarchy,

It seems there is special vocabulary available which might be interesting for us:

- [Breadcrumb](https://developers.google.com/search/docs/appearance/structured-data/breadcrumb): to show the parent pages
- [Course](https://developers.google.com/search/docs/appearance/structured-data/course): we might be able to distinguish between [Rust Fundamentals](https://google.github.io/comprehensive-rust/welcome-day-1.html), [Rust in Android](https://google.github.io/comprehensive-rust/android.html), [Bare-Metal Rust](https://google.github.io/comprehensive-rust/bare-metal.html), and [Concurrency in Rust](https://google.github.io/comprehensive-rust/concurrency.html).
- [Sitelinks search box](https://developers.google.com/search/docs/appearance/structured-data/sitelinks-searchbox): we can perhaps get a search box which leads straight to a `mdbook` search.

How to do this? Likely with a new mdbook preprocessor which can inject the data into the publishing pipeline.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.