jekyll: keep paragraph of reading time and use include#15218
Conversation
✅ Deploy Preview for docsdocker ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
thaJeztah
left a comment
There was a problem hiding this comment.
LGTM, but left one suggestion we could try
| <p><em class="reading-time">Estimated reading time: {{ words | divided_by:180 }} minutes</em></p> | ||
| {%- endif -%} | ||
| {%- endunless -%} | ||
| <p>{%- include read_time.html -%}</p> |
There was a problem hiding this comment.
I guess alternatively, we could add a style for block quotes immediately following a H1;
h1+blockquote {
margin-top: 24px;
}There was a problem hiding this comment.
Yes but looks like the <blockquote> is conditional?: https://github.com/docker/docker.github.io/blob/72a3a45c0e09a7c101d66dca13c7fae3916c96f3/_layouts/docs.html#L28
Maybe add a new css class to https://github.com/docker/docker.github.io/blob/72a3a45c0e09a7c101d66dca13c7fae3916c96f3/_layouts/docs.html#L26
|
Let's get this one in, will see to enhance this with #15218 (comment) in a follow-up. |
While working on #15194 I found out there was no proper spacing after the title of some pages:
Looking at the layout it seems it was done on purpose to handle the estimated reading time of page so rendering looks right:
This PR now keeps the paragraph even if the estimated reading time is not rendered so we are consistent across pages:
I also found out that this block was duplicated and available as an include in https://github.com/docker/docker.github.io/blob/f540f58541b02236262f93272790b706c2c48b24/_includes/read_time.html so switch to the include instead.
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com