lukasgeiter / mkdocs-awesome-pages-plugin

An MkDocs plugin that simplifies configuring page titles and their order
MIT License
453 stars 35 forks source link

arranging issue when a directory name have a no alphabet #10

Closed computerphilosopher closed 4 years ago

computerphilosopher commented 4 years ago

I classify documents by version number.

but build is failed when arrange entry have only numbers,

failed case

arrange:
    - 1.11-(latest)
    - 1.12
TypeError: Expected "arrange" attribute to be a list of strings - got <class 'list'> 

success case

arrange:
    - 1.11-(latest)
    - 1.12-(develop)
lukasgeiter commented 4 years ago

YAML treats valid numbers as number therefore 1.12 is parsed as a number. To force a string, write it in quotes (single or double quotes):

arrange:
    - 1.11-(latest)
    - "1.12"
computerphilosopher commented 4 years ago

it works. thank you for answering.