Custom template for tutorial sections #3082
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR scrapes the webpage for a given tutorial (e.g., https://www.raspberrypi.com/tutorials/build-your-own-weather-satellite-receiving-station/), and then creates a custom section in the documentation that sources in the tutorial description and header image.
Note that it is looking for these two
meta
elements on the linked page (attn: @mudge to let us know if this markup is prone to frequent changes):...though it should degrade gracefully, so if it can't find those it just won't show anything.
@aallan I laid it out card-style, so you should see something like the below, but let me know if you had something else in mind (the card is a clickable link):
Required adoc markup is as follows:
Someone else should definitely test this before we merge (by adding a tutorial section somewhere and then
make serve_html
), since I'm doing something a bit fancy and I'd love to be sure I'm not missing any key instructions or dependencies.