-
Notifications
You must be signed in to change notification settings - Fork 8.1k
jekyll: keep paragraph of reading time and use include #15218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
usha-mandya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
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