Shortcode processing order

@darshakthakore my response to this post was moved to a separate tips-n-tricks post — Create a custom page TOC ("mini TOC") with Javascript (which I’ve now edited to match an independent tip) — so I’m not sure whether you had a chance to see it. As I had previously written, we’re in the process of implementing an include-file shortcode, and I found that when using our site’s custom JS-based page-TOC (“mini TOC”) implementation (now shared in the tips post), the headings in included files appears in the correct relative location in the in the TOC of the including page. I hope this helps.

Note that you can simplify your readFile include shortcode like this:

{{- printf "<br/>%s<br/>" (readFile (.Get "file")) | markdownify -}}

See my separate Include-file shortcode for including files with shortcode calls and and Include-file shortcode context issues posts for more include-file shortcode observations.