For those who want a quick solution:
There is a way to get a output to the console similar to the output from tree, by typing the following command into your terminal:
ls -R YOURFOLDER | grep ':$' | sed -e 's/:$//' -e 's/[^\/]*\//| /g' -e 's/| \([^|]\)/|–– \1/g'
This alternative is mentioned in this documentation: https://wiki.ubuntuusers.de/tree/
Then the output can be copied and encapsuled inside a .md file with code block back tics, like mentioned in Jonathas B.C.'s answer.
But be aware that it also outputs all node modules folders in a node project. And in tree you can do something like
tree -I node_modules
to exlude the node modules folder.