简体   繁体   中英

Folder within another folder no longer in alphabetical order

I am trying to figure out why a folder I created underneath another folder is no longer in alphabetical order

Here is the layout that I want

Environment
  Overview
  A topic that starts with A
  A topic that starts with C
  A topic that starts with J
  My new folder which starts with K
     K doc 1
     K doc 2

What I get is the K folder right after the Overview. I read about the _category_.json file so I create one at the environment level

{
  "label": "Environment",
  "position": 1
}

In the K folder I created another _category_.json . I used the following:

  "label": "Kibana",
  "position": 2
}

If I remove the position, Kibana goes go the bottom of the list. I have tried entering a position of 6 because of other files but it goes to the second position after the overview.

Just number your files, using a dash - to separate from the filename.

Docusaurus will strip out the number, and keep the position and filename.

Example:

01-a_directory
02-b_directory
03-c_directory
04-d_directory
05-e_directory
06-f_directory

Also, if you number some of your files and others not, the ones that are not numbered will be displayed after the numbered ones.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM