Comments (7)
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.
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.
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.
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.
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.
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.
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.
- Remove
nav
andfilename: none
frommkdocs.yml
- Add
.pages in the
docs` folder:
nav:
- index.md
- documentation
- other.md
- extras
- Add
.pages
in thedocumentation
folder:
nav:
- Main: main.md
- systems
- Plugins: plugins.md
from mkdocs-awesome-pages-plugin.
Related Issues (20)
- [BUG] HOT 1
- Is it possible to hide a single file from nav? HOT 10
- issue with material for mkdocs when using navigation.prune HOT 3
- folder level .pages nav not working when top level .pages nav has sub-sections? HOT 2
- Installation was successful, but MKDOCS server spits out the error "plugin is not installed" HOT 11
- Version 2.9.2 regression in `.pages` handling HOT 3
- support for imported repositories (multirepo plugin) HOT 5
- Can nav be sorted by date? HOT 3
- conda-forge distribution
- Full custom nav for pages in a directory HOT 1
- Deep `.pages.` files not respected HOT 3
- does not work in combination with monorepo HOT 6
- Possible to build full nav in directory? HOT 4
- An absolute path to '/...' is included in the 'nav' configuration, which presumably points to an external HOT 6
- Hide pages but still show left navigation? HOT 2
- Order does not take effect for subdirectory files HOT 2
- Possible regression in 2.9.2: `hide: true` not working in `.pages` HOT 3
- Custom styling on nav items HOT 2
- [FEATURE] `flat n` - How to include nested folders correctly? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-awesome-pages-plugin.