Giter VIP home page Giter VIP logo

Comments (7)

lukasgeiter avatar lukasgeiter commented on May 26, 2024

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.

alexander-matthiesen avatar alexander-matthiesen commented on May 26, 2024

An option would make sense, from my point of view. With that, a breaking change would be avoided. :)

from mkdocs-awesome-pages-plugin.

kleinen avatar kleinen commented on May 26, 2024

@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.

kleinen avatar kleinen commented on May 26, 2024

If reusing the hide setting is not desirable, a new one could be created. Maybe named exclude.

from mkdocs-awesome-pages-plugin.

alexander-matthiesen avatar alexander-matthiesen commented on May 26, 2024

@lukasgeiter any updates on this?

from mkdocs-awesome-pages-plugin.

lukasgeiter avatar lukasgeiter commented on May 26, 2024

@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.

lukasgeiter avatar lukasgeiter commented on May 26, 2024

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)

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.