westerndevs / western-devs-website

Hexo blog implementation for WesternDevs
https://www.westerndevs.com
2 stars 6 forks source link

Include Post Assets in Source #206

Open davidwesst opened 6 years ago

davidwesst commented 6 years ago

Goal is to include images and other assets along with the post itself.

Possible Hexo-based Solutions

Tasks

davidwesst commented 6 years ago

I think both of these cause problems. More specifically:

kbaley commented 6 years ago

With Global Folders, can we subdivide them by year? E.g. /source/images/2018.

I watched the video on post asset folders and it doesn't seem too difficult. The {% asset_img %} syntax looks straightforward and there are other options for referencing them via asset_link and asset_path.

I'm not keen on having a set of folders alongside the posts though. The _posts folder is already a pretty healthy size. Not really a deal breaker though.

davidwesst commented 6 years ago

I suppose it's not much of an issue, considering people that cross post (like @dpaquette) host their images externally and would continue to do so with the original markdown syntax.

Problem only comes in if we want to cross post the markdown to other sites, as the plugin syntax isn't standard and would need to be corrected.

kbaley commented 6 years ago

From what I can tell, the standard ![]() syntax should still work with post asset folders. You may still have to update image paths though.

davidwesst commented 6 years ago

It works, as long as you're only using the post images on the post page. If we started using post images on other pages, let's say the home page, where we list the latest posts then it would cause issue.

Use case example is if we have featured images that we use when listing the posts.

Not an issue now, but something to consider.