Is the assets folder structure purely convention?

a pretty basic question, but: is the assets folder purely a naming convention thing?, as in, not actually used by Jekyll in anyway, but a sort of standard structure…perhaps used by several plugins, themes, ‘n such

i ask because i’ve seen images and img, css and stylesheets, _assets and assets, and so on… and if this keeps going on, it can become quite messy… :frowning:

heck, i’ve even seen _posts and posts, _pages and pages, and so on too… but, i believe in this case, the defaults are with the underscore prefix: _

Folder named assets are first-class objects within theme-gems.
The namesake at source only gets importance if the site uses such a theme-gem because the assets in the theme-gem can only be overridden with matching path at source.

Folder named _assets gets first-class status only if the site is using the jekyll-assets or a similar plugin that is explicit about the name.

Apart from the above scenarios, assets and _assets have no particular meaning to Jekyll as of v4.2.x.

1 Like

ahhhh ok, so: just have to make sure it’s the same as the theme’s folder name, in the case of overriding it. gotchya

i didn’t know about the jekyll-assets plugin, but yeah, that’s a pretty great example of the problem without naming conventions, as even the docs use assets with without the underscore… nothing big though, surely can set the path everywhere it’s used…

wow thanks. Sorry about making issues on GitHub earlier. I didn’t discover this discussions site until later. :confused: i def should’ve asked here.

it’s just generally hard for me to understand how jekyll overrides stuff. Like, it took a bit to understand that the theme’s config file wasn’t used as a base, in a kinda inheritance way. And then to understand GitHub Pages uses v3.9, not v4.0, in which this changed. Similarly, i had to discover the hard way that GitHub Pages uses old themes… :confused:

now i’m trying to figure out if i should or shouldn’t override the gemfile (and config file) in the project folder (not theme), when i add a plugin!