Comments (7)
Unfortunately that's not possible in the current version. I like the idea though. In hindsight I would probably design it this way. But now that this would be a breaking change I have to consider whether to include it in the next major version or hide it behind an option...
from mkdocs-awesome-pages-plugin.
An option would make sense, from my point of view. With that, a breaking change would be avoided. :)
from mkdocs-awesome-pages-plugin.
@lukasgeiter what about extending the hide
setting that allows for targeted hiding of pages while keeping the default behavior of hiding the directory. The following suggestions allows for maintaining compatibility with the current interface while allowing for targeted hiding of specific or un-arranged pages. This could then be further expanded by adding a ...
line item to the hide
setting to change the default unspecified page behavior from "show after arranged pages" to "hide all un-arranged pages".
File structure for these suggestions are as follows:
- foo
- .pages
- bar.md
- index.md
- not-included.md
Current behavior
Show un-arranged pages
index.md
is shown before automated arrangement of non-included.md
and bar.md
.
title: Test
arrange:
- index.md
Hide a directory
Entire foo
directory is hidden from nav menu.
title: Test
arrange:
- index.md
hide: true
Enhancement Suggestions
Hide a single page
index.md
and bar.md
are included, but not-included.md
is hidden from the nav menu.
title: Test
arrange:
- index.md
hide:
- not-included.md
Hide all un-arranged pages
index.md
are included, but not-included.md
and 'bar.md` are hidden from the nav menu.
title: Test
arrange:
- index.md
hide:
- ...
from mkdocs-awesome-pages-plugin.
If reusing the hide
setting is not desirable, a new one could be created. Maybe named exclude
.
from mkdocs-awesome-pages-plugin.
@lukasgeiter any updates on this?
from mkdocs-awesome-pages-plugin.
@alexander-matthiesen Sorry for the long wait. I've recently started working on this and some other features. A new release should be ready soon. I'll keep you posted.
from mkdocs-awesome-pages-plugin.
Hi everyone! I've just released v2.3.0 which brings the nav
attribute to the .pages
file. nav
supports a few new tricks, but more importantly for this issue, it does not automatically add files that are not mentioned unless you explicitly specify a ...
entry. See the updated README for details.
Mentioning people who upvoted, so they get a notification as well: @steph-ben, @fenik17
@kleinen I went with this approach instead of extending hide
since I believe an explicit ...
entry makes things more predictable and it aligns the behavior with mkdocs' own nav
config. If anyone still has a need for a separate option to hide certain pages, please let me know (ideally by creating a new issue with your use case).
from mkdocs-awesome-pages-plugin.
Related Issues (20)
- [BUG] HOT 1
- Is it possible to hide a single file from nav? HOT 8
- 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
- Ordering breaks when rest pattern is used in mkdocs > nav HOT 7
- 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 5
- 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.