Leaf bundle resources versus assets resources (quick one)

Going back to this post:

[.Resources.GetMatch not recognizing resource files in bundle]

With this construction for front matter and template


  name = "my.js"
  src = "my.js"

  name = "my.css"
  src = "my.css"
{{ with (.Resources.GetMatch "my.css") }}
{{ .Content }}
{{ end }}

As far as .Resources.GetMatch is concerned, what is the difference between .css files in page bundles or the assets directory?

If for example, there is a file with name.css in assets and the same in a leaf bundle, which one is matched?


.Resources is for Page Bundle only.

resources is for Global Assets only.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.