'EJS partials/components

If I have the following directory structure, is it possible to be able to render partials within partials, basically like creating a view setup that is not to dissimilar to react components (that's how I see it anyway)

- server
  - views
    - partials
      - components
          component-1.ejs
          component-2.ejs
      blog.ejs
      navbar.ejs
      footer.ejs
  home.ejs
  contact.ejs

So within my home page I have a partial blog.ejs and within that partial I would like to have component-1.ejs

I have tried a variety of permutations but am always faced with the error Error: Could not find the include file

home.ejs

<div class="example">
  <% include partials/blog %>
</div>

blog.ejs

<div class="another-example">
  <% include components/component-1 %>
</div>

Is this kind of rendering possible with EJS ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source