Giter VIP home page Giter VIP logo

Comments (7)

lukasgeiter avatar lukasgeiter commented on June 23, 2024

The ... in a .pages file only targets the remaining items in the directory of the .pages file. Try putting the nav block into mkdocs.yml instead.

from mkdocs-awesome-pages-plugin.

ketrab2004 avatar ketrab2004 commented on June 23, 2024

For me ... shows everything, also in subdirectories. And adding a filter like *r* correctly finds everything that has an r in it, also in subdirectories. (but only in the file name itself, not in directories' names)

But putting the nav into mkdocs.yml works great (after adding .md), except now it doesn't order correctly under Documentation for some reason. But it does work correctly for outside of Documentation.

nav:
    - Home: index.md
    - Documentation:
        - Main: documentation/main.md
        - Systems:
            - ... | documentation/*
        - Plugins: documentation/plugins.md
    - Extras: extras.md

resulting sidebar

* Home
* Documentation
    * Plugins
    * Main
    * Systems
* Extras

from mkdocs-awesome-pages-plugin.

lukasgeiter avatar lukasgeiter commented on June 23, 2024

documentation/* doesn't match any files, you would need something like documentation/**. But that's probably also not what you want so you would have to make it ... | flat | documentation/**.

This would be a lot easier if you would use two .pages files. Your navigation structure matches the file structure 1:1 so you only have to tweak the order of the items in the root and under documentation.

from mkdocs-awesome-pages-plugin.

ketrab2004 avatar ketrab2004 commented on June 23, 2024

For me /*, /** and /**/* all work and match the same files.

Also my example nav isn't completely accurate, it is more something like this:

nav:
    - Home: index.md
    - Documentation:
        - Main: documentation/main.md
        - Systems:
            - ... | documentation/systems/*
        - Plugins: documentation/plugins.md
    - ... | other/*
    - Extras: extras.md

But now that I have added the ... | other/* the ordering of everything, not only under Documentation, does not match the nav. I can't really tell on what the order is based.

I haven't yet tried using multiple .pages files, but I don't think that should affect the ordering.

Since the issue topic has moved from rest filter patterns (though I don't really know why it didn't work within the .pages but does in mkdocs.yml) to ordering should I rename the issue?

from mkdocs-awesome-pages-plugin.

lukasgeiter avatar lukasgeiter commented on June 23, 2024

Sure documentation/systems/* works, but before you wrote documentation/*.

The ordering being off likely means that the plugin is not doing anything at all for some reason. But feel free to rename the issue - I don't really mind.

Without all the information it's hard to diagnose what's happening. Could you send me a full example to reproduce your problem?

from mkdocs-awesome-pages-plugin.

ketrab2004 avatar ketrab2004 commented on June 23, 2024

Here is a reproduction example: https://github.com/ketrab2004/awesome-pages-issue-repro

It does use the section/page name and the rest filter pattern correctly, only the ordering is incorrect.

from mkdocs-awesome-pages-plugin.

lukasgeiter avatar lukasgeiter commented on June 23, 2024

Thanks for the example! There is a strange interaction between defining the navigation in mkdocs.yml and using the order option. Once again, I really recommend using separate files.

  1. Remove nav and filename: none from mkdocs.yml
  2. Add .pages in the docs` folder:
nav:
    - index.md
    - documentation
    - other.md
    - extras
  1. Add .pages in the documentation folder:
nav:
    - Main: main.md
    - systems
    - Plugins: plugins.md

from mkdocs-awesome-pages-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.