I thought about something like {{< cloakemail {{ os.ReadFile "email.txt" }} >}} in my content, but I can’t find a way to pass the result of os.ReadFIle to the shortcode
You can only pass strings, booleans, and integers as parameters in a shortcode code. You could pass the file name and do the os.ReadFile bit within the shortcode.
You can only pass strings, booleans, and integers as parameters in a shortcode code
but doesn’t os.ReadFile return a string ?
You could pass the file name and do the os.ReadFile bit within the shortcode.
Is there a way to encapsulate their shortcude rather than modifying it ? (For example by calling their shortcode inside my own ?)
I don’t really mind modifying their directly, but I would like not to if possible
You are trying to pass template code, not a string.
Override the theme’s shortcode by placing a copy in the layouts/shortcodes directory in the root of your project. That’s how you override any theme file.