Giter VIP home page Giter VIP logo

dariuszporowski / mkdocs-file-filter-plugin Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 3.0 751 KB

A MkDocs plugin that lets you exclude/include docs files using globs, regexes, gitignore-style file and Markdown/FrontMatter tags metadata.

Home Page: https://pypi.org/project/mkdocs-file-filter-plugin/

License: MIT License

Shell 1.33% Python 97.45% PowerShell 1.22%
exclude gitignore globs include mkdocs plugin regexes mkdocsignore frontmatter metadata

mkdocs-file-filter-plugin's Issues

[bug]: include_tag does not work

๐Ÿ› What happened?

Pages are not excluded when include_tag is used - apparently only exclude_tag works

๐Ÿ”ฌ How to reproduce?

Configure as such:

theme:
  name: material

plugins:
  - file-filter:
      filter_nav: false
      metadata_property: visibility
      include_tag:
        - public

  - search
  - awesome-pages
  - ezlinks
  - tags:
      tags_file: tags.md

Create a page with this frontmatter:

visibility: public

The page will still be included in the build website.

๐Ÿ—๏ธ Code Sample / Log

No response

๐ŸŒŒ Environment (plugin version)

0.2.0

๐ŸŒŒ Environment (OS)

Linux

๐ŸŒŒ Environment (Python)

3.11.1

๐ŸŒŒ Environment (MkDocs)

1.5.3

๐Ÿ“ท Screenshots

No response

๐Ÿ“ˆ Expected behavior

Error 404 when trying to access the "private" page i.e. any page WITHOUT the visibility:public in the frontmatter

๐Ÿ“Ž Additional context

No response

๐Ÿ“œ Code of Conduct

  • I agree to follow this project's Code of Conduct.

[feature]: filter_nav but to hide files which are built

๐Ÿš€ Feature description

filter_nav_tag (array of strings) to filter out Markdown pages which have select tags, but only from navigation (eg. actually render them, but have them hidden). This behaviour should only be applied if filter_nav: true.

๐Ÿ”ˆ Motivation

Subpages that should not be rendered in navigation to prevent clutter. Or easter eggs. Or "private-ish" pages.

๐Ÿ›ฐ Alternatives

Defining nav by myself: Tedious, manual, not really feasible if I just want to work on the documentation contents.
awesome-pages: Less manual, but still it can only filter out entire directories and not single files.

๐Ÿ“Ž Additional context

Not really applicable, I outlined the context on the motivation section.

๐Ÿ“œ Code of Conduct

  • I agree to follow this project's Code of Conduct.

[bug]: DeprecationWarning for `warning_filter`

๐Ÿ› What happened?

When I build my project, I get these log lines:

INFO    -  DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2
and will be removed soon. All messages on the `mkdocs` logger get counted
automatically.

they originate from mkdocs_file_filter_plugin/logger.py

๐Ÿ”ฌ How to reproduce?

  1. have a mkdocs 1.2+ project (1.5.1 in my case)
  2. configure it to use file-filter
  3. run mkdocs serve

๐Ÿ—๏ธ Code Sample / Log

INFO    -  DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2 and will be removed soon. All messages on the `mkdocs` logger get counted automatically.

๐ŸŒŒ Environment (plugin version)

0.1.0

๐ŸŒŒ Environment (OS)

Linux

๐ŸŒŒ Environment (Python)

3.10.12

๐ŸŒŒ Environment (MkDocs)

1.5.1

๐Ÿ“ท Screenshots

No response

๐Ÿ“ˆ Expected behavior

I would expect this not throwing any warnings.

๐Ÿ“Ž Additional context

No response

๐Ÿ“œ Code of Conduct

  • I agree to follow this project's Code of Conduct.

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.