You’re not saying what’s problematic with that part, and what error messages, or what doesn’t happen like you envisioned it.
Neither do you show/indicate what you expect out of the tp.file.content split operations. Do you intend for the aliases to be based upon the current file’s content somehow?
In short, it’s hard to help when you don’t explain the full use case, and what’s currently happening.
Thanks for pointing out the problem, here’s another attempt to make it more understandable. The tp.file.content.split gets a certain part from the text of the file, as my file always starts with the same structure. I want to add that part as aliases in the front matter. When I run the snippet, I get the following error in the console:
This won’t work until all your files will have attribute ‘tags’. Consider adding empty ‘tags’ attribute to files without tags, or add some check if file has this attribute