Comments (6)
That was my fault for not looking for the prior discussion of this (I suggested the FR). @squidfunk, how about I show how this can be done in the blog example that I need to pick up again? I'll post the necessary snippets here. @mathisgauthey, do you think it would be ok to have to put the image URL/path into the post meta-data? That is the most flexible option, I think, but requires some work by the post author.
You know what, we'll reopen it, as this has been asked for a few times, so we'll see if others would find it useful as well. We could add functionality that extracts the image and allows for overriding via meta data, but I need to investigate. I'll try to come up with a general solution for this, but in the mean time the absolute simplest solution is #5406 (comment).
One could then think about having a default behavior for handling thumbnails on modified Blog index pages such as using the first image found in the post or reverting to the social card of the post if the plugin is activated.
IMHO, it's a hero image, not a thumbnail 😉 Using the social card image is not really a good idea, IMHO, because it has a completely different purpose. Thus, I'd say:
- Check front matter
- Check source of blog for first encounter, or for an image tagged with the
data-hero
attribute (or similar) - No image
We could also allow to explicitly unset the image by using something like hero: null
. I think those degrees of freedom allow for very precise control and good default behavior. We could also add setting to switch it on/off completely.
from mkdocs-material.
Thanks for suggesting. Duplicate of #5736 (and some other issue I currently can't find). Please use customizations to include thumbnails in posts. It's likely that we eventually add this functionality, but we're still in the collection stage of requirements, so native support for this is not planed yet. It is, however, quite easy to do this functionality yourself.
You can post also ask for more support on our discussion board.
from mkdocs-material.
That was my fault for not looking for the prior discussion of this (I suggested the FR). @squidfunk, how about I show how this can be done in the blog example that I need to pick up again? I'll post the necessary snippets here. @mathisgauthey, do you think it would be ok to have to put the image URL/path into the post meta-data? That is the most flexible option, I think, but requires some work by the post author.
from mkdocs-material.
That was my fault for not looking for the prior discussion of this (I suggested the FR). @squidfunk, how about I show how this can be done in the blog example that I need to pick up again? I'll post the necessary snippets here. @mathisgauthey, do you think it would be ok to have to put the image URL/path into the post meta-data? That is the most flexible option, I think, but requires some work by the post author.
I think it could be a great start thanks !
One could then think about having a default behavior for handling thumbnails on modified Blog index pages such as using the first image found in the post or reverting to the social card of the post if the plugin is activated.
from mkdocs-material.
Related:
from mkdocs-material.
Definitely interested too! For now, I'm using a custom template to achieve this but not relying on blog plugin.
from mkdocs-material.
Related Issues (20)
- Some math equations cannot be rendered correctly HOT 7
- Update Slovak translations HOT 2
- Search bar location in main page HOT 1
- Update Slovak translations - aligned with Czech which is really similar HOT 2
- md-sidebar__scrollwrap has incorrect height HOT 5
- Blog plugin should raise warning, not error when related link target does not exist HOT 3
- Instant Preview w/ Content Tab HOT 7
- Incorrect CSS/JS `link` href in projects with root `site_url` HOT 1
- Incorrect CSS/JS `link` href in projects with root `site_url` HOT 3
- `mkdocs` validation warnings when referencing sub-project file via absolute link HOT 3
- Request - Selecting permalinks automatically copies the linked URL HOT 2
- Default CSS preventing embedded tweets from having transparent borders HOT 20
- Add support for Mike hidden version flag HOT 4
- Recommendation for lists within grids HOT 1
- Page status incorrectly positioned when scrolling navigation sidebar HOT 1
- Front matter meta should override .meta.yml defaults HOT 4
- Blog: `UTF-8` encoding problems on Windows HOT 13
- Filter files based on frontmatter property HOT 3
- Social plugin: crash when all fonts are prefixed with variant HOT 8
- Default scheme colors not used for Social cards when automatic/light dark mode is set HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-material.