I'm fiddling a bit around with the "isPreviewImage" feature (more on that in a different issue, maybe) and I tried out the "Clear Cache" command. After restarting VS Code and opening the dashboard, all preview images are gone and will only be rebuilded if I open up the posts one by one and save it again (STRG-S under Windows) without changes.
I'm fiddling a bit around with the "isPreviewImage" feature (more on that in a different issue, maybe) and I tried out the "Clear Cache" command. After restarting VS Code and opening the dashboard, all preview images are gone and will only be rebuilded if I open up the posts one by one and save it again (STRG-S under Windows) without changes.
<!-- github-sync-id:1861239404 -->
My current preview image is configured like we talked about in https://github.com/estruyf/vscode-front-matter/issues/257 and I'm running Front Matter (v9.1.5937226-beta BETA)
<!-- github-comment-id:1687990596 -->
All files are now available for FRONTMATTER. Open up in VS Code und see if dashboard has preview images. If not, open up one post and press STRG-S (Save under Windows). Preview image will now be rendered in dashboard.
Oh yeah ... sry
1. Clone: https://github.com/kristofzerbe/kiko.io
All files are now available for FRONTMATTER. Open up in VS Code und see if dashboard has preview images. If not, open up one post and press STRG-S (Save under Windows). Preview image will now be rendered in dashboard.
<!-- github-comment-id:1688085153 -->
Could be that the pages were still processing in the background. As some versions ago we changed this logic.
A couple of versions ago, we processed it on the dashboard load, but now it gets processed in the background and cached.
Let me know if it would happen again.
Could be that the pages were still processing in the background. As some versions ago we changed this logic.
A couple of versions ago, we processed it on the dashboard load, but now it gets processed in the background and cached.
Let me know if it would happen again.
<!-- github-comment-id:1688096337 -->
Hi Elio ... yesterday only a few preview images where rendered and after another CLEAR CACHE no longer one on several different machines (local and virtual).
You said the images are cached? Where? Maybe I can try to delete the cache manually...
Hi Elio ... yesterday only a few preview images where rendered and after another CLEAR CACHE no longer one on several different machines (local and virtual).
I currently try to make FM Dashboard to my main tool on writing for my blog. Here's my latest config:
https://github.com/kristofzerbe/kiko.io/blob/master/frontmatter.json
You said the images are cached? Where? Maybe I can try to delete the cache manually...
<!-- github-comment-id:1692988071 -->
---slug:Top-10-Pens-of-Jon-Kantnertitle:Top 10 Pens of Jon Kantnersubtitle:date:2023-05-08 15:34:15photograph:file:D50_1577.jpgname:Floral Magic XIVlink:https://500px.com/photo/1068126744socialmedia:/static/images/social-media/Top-10-Pens-of-Jon-Kantner.png---
Notice the socialmedia image path; if it was relative (as configured), it should be: ../../../static/images/social-media/404-Page-in-Hexo-for-GitHub-Pages.png.
Now, I noticed an issue with combining the settings when using Hexo. The CMS integrated support for Hexo in the past to reference images. Due to that, it causes us to skip the setting and fall back to the Hexo configuration. This will be fixed.
Now, once this is fixed, it should correctly add the paths as ../../../static/images/social-media/404-Page-in-Hexo-for-GitHub-Pages.png, although this is not your preferred outcome I believe.
In your case, you need a path to start with /static/images/, which requires configuring the frontMatter.content.publicFolder as an empty string. Once you apply this, all the previews start loading again.
I just checked, and it is because of some incorrect configuration and SSG/CMS assumptions. You configured the public folder as follows:
```json
{
"frontMatter.content.publicFolder": {
"path": "static",
"relative": true
}
}
```
However, your articles with a preview image do not include a relative path from the original content. For example, I will take this page: https://github.com/kristofzerbe/kiko.io/blob/867c5dc7c33a7903a478ce4abaff98787fc77153/source/_posts/2023/Top-10-Pens-of-Jon-Kantner.md
It contains the following front matter:
```yaml
---
slug: Top-10-Pens-of-Jon-Kantner
title: Top 10 Pens of Jon Kantner
subtitle:
date: 2023-05-08 15:34:15
photograph:
file: D50_1577.jpg
name: Floral Magic XIV
link: https://500px.com/photo/1068126744
socialmedia: /static/images/social-media/Top-10-Pens-of-Jon-Kantner.png
---
```
Notice the `socialmedia` image path; if it was relative (as configured), it should be: `../../../static/images/social-media/404-Page-in-Hexo-for-GitHub-Pages.png`.
Now, I noticed an issue with combining the settings when using Hexo. The CMS integrated support for Hexo in the past to reference images. Due to that, it causes us to skip the setting and fall back to the Hexo configuration. *This will be fixed*.
Now, once this is fixed, it should correctly add the paths as `../../../static/images/social-media/404-Page-in-Hexo-for-GitHub-Pages.png`, although this is not your preferred outcome I believe.
In your case, you need a path to start with `/static/images/`, which requires configuring the `frontMatter.content.publicFolder` as an empty string. Once you apply this, all the previews start loading again.
<!-- github-comment-id:1693077634 -->
I think on changing the preview to my original photo, which the social media image is based on, because actually I have a lot of drafts and the latter is only generated during build for ready posts.
As I have configured my contentType as follows and the photograph.file just helds the files NAME (like 'xyz.jpg') ...
I think on changing the preview to my original photo, which the social media image is based on, because actually I have a lot of drafts and the latter is only generated during build for ready posts.
As I have configured my ``contentType`` as follows and the ``photograph.file`` just helds the files NAME (like 'xyz.jpg') ...
```
"frontMatter.taxonomy.contentTypes": [
...
{
"title": "Photograph",
"name": "photograph",
"type": "fields",
"fields": [
{
"title": "File",
"name": "file",
"type": "image",
"isPreviewImage": true
},
{
"title": "Name",
"name": "name",
"type": "string",
"single": true
},
{
"title": "Link",
"name": "link",
"type": "string"
},
{
"title": "Social Media",
"name": "socialmedia",
"type": "image",
"default": "{{sm}}"
}
]
},
...
]
```
... it should work with following ``publicFolder`` setting, as I have the photo with the proper file name in the TABLET folder too, right?
```
"frontMatter.content.publicFolder": {
"path": "static/photos/tablet",
"relative": true
}
```
<!-- github-comment-id:1693131140 -->
Found a little inconvenience, that you may be able to help with:
In my process, I need the header image name multiple times, but when I configure FM as follows, I see the image itself in the dashboard, but not the name:
If I configure FILE as a string, I see the name, but not the image in the dashboard. I guess because isPreviewImage requires mandatory type image, right?
The question is why? I would love to configure the files name as string and see the image in the dashboard.
Hi Elio ... me again :)
Found a little inconvenience, that you may be able to help with:
In my process, I need the header image name multiple times, but when I configure FM as follows, I see the image itself in the dashboard, but not the name:
```
{
"title": "File",
"name": "file",
"type": "image",
"isPreviewImage": true
}
```
If I configure FILE as a string, I see the name, but not the image in the dashboard. I guess because ``isPreviewImage`` requires mandatory type ``image``, right?
```
{
"title": "File",
"name": "file",
"single": true,
"type": "string",
"isPreviewImage": true
}
```
The question is why? I would love to configure the files name as string and see the image in the dashboard.
<!-- github-comment-id:1695266506 -->
@kristofzerbe isPreviewImage only works in combination with the image field. The file field is used for linking other files than images, or if you want to add various types of data to your content.
@kristofzerbe `isPreviewImage` only works in combination with the `image` field. The `file` field is used for linking other files than images, or if you want to add various types of data to your content.
<!-- github-comment-id:1695270216 -->
Closing this as a stale issue, as there hasn't been any activity on it for a long time. If this is still a problem with the latest version of Front Matter CMS, feel free to reopen it (or create a new issue) and we'll take another look. Thanks!
Closing this as a stale issue, as there hasn't been any activity on it for a long time. If this is still a problem with the latest version of Front Matter CMS, feel free to reopen it (or create a new issue) and we'll take another look. Thanks!
<!-- github-comment-id:6438495729 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I'm fiddling a bit around with the "isPreviewImage" feature (more on that in a different issue, maybe) and I tried out the "Clear Cache" command. After restarting VS Code and opening the dashboard, all preview images are gone and will only be rebuilded if I open up the posts one by one and save it again (STRG-S under Windows) without changes.
My current preview image is configured like we talked about in https://github.com/estruyf/vscode-front-matter/issues/257 and I'm running Front Matter (v9.1.5937226-beta BETA)
What are the steps to reproduce it?
Oh yeah ... sry
All files are now available for FRONTMATTER. Open up in VS Code und see if dashboard has preview images. If not, open up one post and press STRG-S (Save under Windows). Preview image will now be rendered in dashboard.
Strange ... A minute ago I cleared cache again and the dashboard has filled the preview files immediatly...!?
Thank you Elio for always responding so quickly 👍🏼
Could be that the pages were still processing in the background. As some versions ago we changed this logic.
A couple of versions ago, we processed it on the dashboard load, but now it gets processed in the background and cached.
Let me know if it would happen again.
Hi Elio ... yesterday only a few preview images where rendered and after another CLEAR CACHE no longer one on several different machines (local and virtual).
I currently try to make FM Dashboard to my main tool on writing for my blog. Here's my latest config:
https://github.com/kristofzerbe/kiko.io/blob/master/frontmatter.json
You said the images are cached? Where? Maybe I can try to delete the cache manually...
I just checked, and it is because of some incorrect configuration and SSG/CMS assumptions. You configured the public folder as follows:
However, your articles with a preview image do not include a relative path from the original content. For example, I will take this page: https://github.com/kristofzerbe/kiko.io/blob/867c5dc7c33a7903a478ce4abaff98787fc77153/source/_posts/2023/Top-10-Pens-of-Jon-Kantner.md
It contains the following front matter:
Notice the
socialmediaimage path; if it was relative (as configured), it should be:../../../static/images/social-media/404-Page-in-Hexo-for-GitHub-Pages.png.Now, I noticed an issue with combining the settings when using Hexo. The CMS integrated support for Hexo in the past to reference images. Due to that, it causes us to skip the setting and fall back to the Hexo configuration. This will be fixed.
Now, once this is fixed, it should correctly add the paths as
../../../static/images/social-media/404-Page-in-Hexo-for-GitHub-Pages.png, although this is not your preferred outcome I believe.In your case, you need a path to start with
/static/images/, which requires configuring thefrontMatter.content.publicFolderas an empty string. Once you apply this, all the previews start loading again.I think on changing the preview to my original photo, which the social media image is based on, because actually I have a lot of drafts and the latter is only generated during build for ready posts.
As I have configured my
contentTypeas follows and thephotograph.filejust helds the files NAME (like 'xyz.jpg') ...... it should work with following
publicFoldersetting, as I have the photo with the proper file name in the TABLET folder too, right?ahh ... got it running with this:
Hi Elio ... me again :)
Found a little inconvenience, that you may be able to help with:
In my process, I need the header image name multiple times, but when I configure FM as follows, I see the image itself in the dashboard, but not the name:
If I configure FILE as a string, I see the name, but not the image in the dashboard. I guess because
isPreviewImagerequires mandatory typeimage, right?The question is why? I would love to configure the files name as string and see the image in the dashboard.
@kristofzerbe
isPreviewImageonly works in combination with theimagefield. Thefilefield is used for linking other files than images, or if you want to add various types of data to your content.Closing this as a stale issue, as there hasn't been any activity on it for a long time. If this is still a problem with the latest version of Front Matter CMS, feel free to reopen it (or create a new issue) and we'll take another look. Thanks!