Is there a way to represent a directory tree in a Github README.md?

后端 未结 14 1823
庸人自扰
庸人自扰 2020-12-22 17:03

In my Githubs repos documentation I want to represent a directory tree structure like this:

\"enter

14条回答
  •  -上瘾入骨i
    2020-12-22 17:37

    Simple tree command will do the job. For example: tree -o readme.md will print the tree structure of your current working directory and write it to readme.md. Then open readme.md file in one of text editor like Sublime and wrap its content within a pair of triple backticks (```).

    FYI: you might have to brew install tree in OSX if it's not already installed. In Linux and Windows it should just work fine. Also in windows you might have to replace hyphen with forward slash.

    I hope this helps.

提交回复
热议问题