Closed lorezyra closed 1 year ago
To add an image, you can click or hover over the image menu and click on the +
icon or insert image to markdown
(which would need a better description).
Okay... Now that I see that I must click the "ellipsis" button, I see that it does insert the img:
parameter. However, now it doesn't use the same pathway.
Expected:
img: /2022/0926/Life_生活/20-powerful-visuals-about-psychology-life/AdobeStock_267678616_Maslows-needs-pyramid.svg
Got:
img: /source/_posts/Life_生活/20-powerful-visuals-about-psychology-life/AdobeStock_267678616_Maslows-needs-pyramid.svg
I might suggest a better UI to make that more obvious. Not everyone is going to take the time to read the docs thoroughly. The UI should make the UX as "simple" as possible.
@lorezyra I agree, think that there are other places where our UX can be enhanced. Hopefully we'll get someone on board that can pick up this task and comes with new approaches.
About your image and it's path. Are you using page bundles? A folder per blog post? If not, how do you structure your content?
Probably this will be better:
What do you think?
That, or have a big "button" on the preview when user inevitably clicks on the image/video.
@lorezyra I agree, think that there are other places where our UX can be enhanced. Hopefully we'll get someone on board that can pick up this task and comes with new approaches.
About your image and it's path. Are you using page bundles? A folder per blog post? If not, how do you structure your content?
I'm not using page bundles exactly... However, the folder structure of my site is more like this:
├── package-lock.json
├── package.json
├── scaffolds
│ ├── draft.md
│ ├── fb.md
│ ├── page.md
│ ├── post.md
│ └── temp.md
├── _config.yml
├── source
│ ├── _data
│ │ ├── calendar.json
│ │ ├── facebook.yml
│ │ ├── github.yml
│ │ ├── instagram.yml
│ │ ├── linkedin.yml
│ │ ├── pinterest.yml
│ │ ├── quora.yml
│ │ ├── reddit.yml
│ │ ├── social.yml
│ │ └── twitter.yml
│ ├── _drafts
│ │ ├── Adobe contract cancellation surprise - fucker
│ │ │ ├── Screen Shot 2022-09-25 at 0.43.28.png
│ │ │ └── Screen Shot 2022-09-25 at 0.44.15.png
│ │ └── Adobe contract cancellation surprise - fucker.md
│ ├── _posts
│ │ ├── Fun_楽しい物
│ │ │ ├── 300-meter-water-slide-is-set-to-unfold-in-Japan
│ │ │ │ └── screen-shot-2015-02-05-at-5-14-30-pm.png.webp
│ │ │ ├── 300-meter-water-slide-is-set-to-unfold-in-Japan.md
│ │ │ ├── 3D-printer-company-asks-clients-not-to-clone-printers
│ │ │ │ └── 10438611_979595022061509_7106094427834826322_n.jpg
│ │ │ ├── 3D-printer-company-asks-clients-not-to-clone-printers.md
│ │ │ ├── Aliens-have-already-landed
│ │ │ │ └── 983630_626170507468821_4744341381714397990_n_626170507468821.jpg
│ │ │ ├── Aliens-have-already-landed.md
│ │ │ ├── American-Twintail
│ │ │ │ └── 10925507_10153052390324320_1894536358567800005_o.jpg
│ │ │ ├── American-Twintail.md
Basically, the page and the article's assets (images, files, video, etc.) are kept with the same name. For example:
/2015/0205/Fun_楽しい物/300-meter-water-slide-is-set-to-unfold-in-Japan/
/2015/0205/Fun_楽しい物/300-meter-water-slide-is-set-to-unfold-in-Japan/{image.png | video.mp4)
NOTE: I'm thinking to change the URI scheme to drop the implied date. So, this will likely change the URL pattern, but the folder structure will remain the same (on my MacBookPro).
That is an interesting structure. Typically a SSG uses page bundles where a folder includes the markdown file and related images.
For example:
├── source
│ ├── _posts
│ │ ├── Fun_楽しい物
│ │ │ ├── American-Twintail
│ │ │ │ └── 10925507_10153052390324320_1894536358567800005_o.jpg
│ │ │ │ └── index.md
Is this something specific to Hexo or your setup?
In FM, it can:
image: 10925507_10153052390324320_1894536358567800005_o.jpg
.If it is not 1 or 2, it will take the relative path from the project, which happened in your case.
If this is specific to Hexo, we'll have to bring better support for it. One thing I can think about is making the images relative to the _posts
folder.
This is a HEXO feature. https://hexo.io/docs/asset-folders defines it better. I have the _config.yml
parameter post_asset_folder: true
set.
post_asset_folder: true
marked:
prependRoot: true
postAsset: true
Ok, so for HEXO, once defined as a framework for FM, we'll check the _config.yml
file, and see if the post_asset_folder
to true
.
Thanks! I think with this information we can make it happen. I'll create a separate issue for this.
I almost wished that FM could read my _config.yml
file and adjust FM's config.😎🤖
I almost wished that FM could read my
_config.yml
file and adjust FM's config.😎🤖
That would be the ultimate goal but would require a lot of work to align with all SSGs. Hopefully at some point we can have this.
Describe the bug Can't add photo from Media to post. Media opens and I'm able to navigate to the image, but after clicking the image, the FM panel says: Continue in the media dashboard to select the image you want to insert... I don't see an insert button. Nor does selecting the image do anything other than display a larger version of the image.
To Reproduce Steps to reproduce the behavior:
Expected behavior Image should have been inserted to the post's frontmatter
Screenshots From post, add image:
Attempt to select image to insert:
Insert fails. Only see larger preview:
Desktop (please complete the following information):
Additional context Config file
.frontmatter.json
: