Skip to content
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

Split excerpt into archive_excerpt and overlay_excerpt #1429

Closed
1 of 5 tasks
dvhart opened this issue Dec 31, 2017 · 5 comments
Closed
1 of 5 tasks

Split excerpt into archive_excerpt and overlay_excerpt #1429

dvhart opened this issue Dec 31, 2017 · 5 comments

Comments

@dvhart
Copy link
Contributor

dvhart commented Dec 31, 2017

  • This is a question about using the theme.
  • This is a feature request.
  • I believe this to be a bug with the theme.
    • I have updated all gems with bundle update.
    • I have tested locally with bundle exec jekyll build.

Environment informations

  • Minimal Mistakes version: 4.8.1+
  • GitHub Pages hosted: yes

Expected behavior

The "excerpt" is used in at least 2 unique ways:

  1. archive summary (archive-single)
    a) archive grid (e.g. related)
    b) recent posts (e.g. home)
  2. header overlay (page__hero)

At least in my case, I'm looking for different things for 1 and 2 above, and was looking for a way to kill the excerpt from the header overlay, while keeping it for the archive summary. I didn't find a way, so I ultimately just commented it out of page__hero.

https://dvhart.github.io/2015/04/05/wannabee-it-guy-kid-friendly-networking.html

screen shot 2017-12-31 at 11 03 31 am

I think it would be useful to split excerpt into overlay_excerpt and archive_excerpt, both of which default to excerpt, but can be independently overridden. Existing users wouldn't need to change anything as overriding excerpt would apply to both new fields. In my case I would set 'overlay_excerpt: ""' in defaults in my _config.yml, and leave archive_excerpt.

Another option might be to create a boolean for overlay_excerpt which just toggles if the excerpt is displayed in in the overlay header. This would be less flexible, but probably less invasive.

@dvhart
Copy link
Contributor Author

dvhart commented Dec 31, 2017

The site wide boolean solution seems pretty minimally invasive, just the following to page__hero.html:

-      {% if page.excerpt %}
+      {% if page.excerpt and site.overlay_excerpt %}

And adding overlay_excerpt: (true|false) to _config.yml

@dvhart
Copy link
Contributor Author

dvhart commented Dec 31, 2017

If the above is acceptable, I can prepare a PR and update the documentation accordingly at the same time.

@dvhart
Copy link
Contributor Author

dvhart commented Dec 31, 2017

One last thought for now. page.header.overlay_excerpt as a boolean is even better. More flexibility, no more invasive.

@mmistakes
Copy link
Owner

mmistakes commented Dec 31, 2017

So to clarify you're looking for a way to disable excerpts when using an image overlay? And not a way to specify different text for overlay excerpt and archive excerpts?

The later is a complexity I'm not sold on. But using a boolean to disable overlay excerpts seems simple enough.

@dvhart
Copy link
Contributor Author

dvhart commented Dec 31, 2017

Yes, for my purposes, the simple boolean is plenty. I'm currently using 'page.header.overlay_excerpt: false' and added that to the conditional in page__hero.html. Adding it to the default in the theme _config.yml to true I think would complete the feature and maintain existing behavior. If you're OK with this, I'll prepare the patch, docs, and PR.

@mmistakes mmistakes mentioned this issue Mar 8, 2018
2 tasks
kkunapuli pushed a commit to kkunapuli/kkunapuli.github.io that referenced this issue May 30, 2019
Make excerpts optional in header overlay

Some posts and some header images don't lend themselves well to
displaying the excerpt in the overlay. Make this optional by
introducting a new boolean variable:

`page.header.show_overlay_excerpt`

Set it to implicitly default to `true` so existing users are unaffected by
testing explicitly for "!= false".

This can be enabled globally for a site by changing the default to `false`
in the local _config.yml, or per page by specifying the value in front
matter.

Document show_overlay_excerpt variable

* Add show_overlay_excerpt variable to the Header Overlay field documentation table.

Close mmistakes#1429
sumeetmondal pushed a commit to sumeetmondal/sumeetmondal.github.io that referenced this issue Sep 10, 2019
Make excerpts optional in header overlay

Some posts and some header images don't lend themselves well to
displaying the excerpt in the overlay. Make this optional by
introducting a new boolean variable:

`page.header.show_overlay_excerpt`

Set it to implicitly default to `true` so existing users are unaffected by
testing explicitly for "!= false".

This can be enabled globally for a site by changing the default to `false`
in the local _config.yml, or per page by specifying the value in front
matter.

Document show_overlay_excerpt variable

* Add show_overlay_excerpt variable to the Header Overlay field documentation table.

Close mmistakes#1429
jchwenger pushed a commit to jchwenger/jchwenger.github.io that referenced this issue May 5, 2023
Make excerpts optional in header overlay

Some posts and some header images don't lend themselves well to
displaying the excerpt in the overlay. Make this optional by
introducting a new boolean variable:

`page.header.show_overlay_excerpt`

Set it to implicitly default to `true` so existing users are unaffected by
testing explicitly for "!= false".

This can be enabled globally for a site by changing the default to `false`
in the local _config.yml, or per page by specifying the value in front
matter.

Document show_overlay_excerpt variable

* Add show_overlay_excerpt variable to the Header Overlay field documentation table.

Close mmistakes#1429
okitem pushed a commit to okmalls/okmalls.github.io that referenced this issue Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants