Repository: mondeja/mkdocs-include-markdown-plugin (language: python)

Issue:
Can `exclude` be a list? To exclude multiple different files?
Something like:

```
plugins:
   - include-markdown:
       exclude:
         - LICENSE.md
         - some_other.md
```


Discussion / hints:
Oh...actually I thought the `exclude` feature excluded entire files from being checked by this plugin. Can that be added as a feature here?  For example, we have generated API reference .md files that this plugin doesn't need to check and I'd like this plugin just to skip them


Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 298395d..bd0abca 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -131,7 +131,7 @@ jobs:
         id: tag
         run: |
           TAG_TITLE=${GITHUB_REF#refs/*/}
-          echo ::set-output name=title::$TAG_TITLE
+          echo "title=$TAG_TITLE" >> $GITHUB_OUTPUT
           git -c protocol.version=2 fetch --prune --progress \
             --no-recurse-submodules origin \
             +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
@@ -139,7 +139,7 @@ jobs:
           TAG_BODY="${TAG_BODY//'%'/'%25'}"
           TAG_BODY="${TAG_BODY//$'\n'/'%0A'}"
           TAG_BODY="${TAG_BODY//$'\r'/'%0D'}"
-          echo ::set-output name=body::$TAG_BODY
+          echo "body=$TAG_BODY" >> $GITHUB_OUTPUT
       - name: Create Release
         uses: softprops/action-gh-release@v1
         id: create-release
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 0994242..5279673 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -121,6 +121,8 @@ repos:
         files: ^src
         additional_dependencies:
           - mkdocs
+          - platformdirs
+          - wcmatch
   - repo: https://github.com/tcort/markdown-link-check
     rev: v3.11.2
     hooks:
diff --git a/README.md b/README.md
index c8db2ff..4b90697 100644
--- a/README.md
+++ b/README.md
@@ -44,18 +44,12 @@ plugins:
 
 The global behaviour of the plugin can be customized in the configuration.
 
-- <a name="config_tags" href="#config_tags">#</a> **opening_tag** and
-  **closing_tag**: The default opening and closing tags. By default are
-  `{%` and `%}`.
-
 Most of the settings will define the default values passed to arguments
 of directives and are documented in the [reference](#reference).
 
 ```yaml
 plugins:
   - include-markdown:
-      opening_tag: "{!"
-      closing_tag: "!}"
       encoding: ascii
       preserve_includer_indent: false
       dedent: false
@@ -65,25 +59,48 @@ plugins:
       heading_offset: 0
       start: <!--start-->
       end: <!--end-->
-      exclude: LICENSE.md
-```
-
-The `cache` setting defines a expiration time in seconds for HTTP requests
-when including from URLs.
-
-```yaml
-plugins:
-  - include-markdown:
-      cache: 600
 ```
 
-In order to use this feature, the dependency [platformdirs] must be installed.
-You can include it in the installation of the plugin adding the `cache` extra:
+- <a name="config_tags" href="#config_tags">#</a> **opening_tag** and
+  **closing_tag**: The default opening and closing tags. By default are
+  `{%` and `%}`.
 
-```txt
-# requirements.txt
-mkdocs-include-markdown-plugin[cache]
-```
+  ```yaml
+  plugins:
+    - include-markdown:
+        opening_tag: "{!"
+        closing_tag: "!}"
+  ```
+
+- <a name="config_exclude" href="#config_exclude">#</a> **exclude**: Define
+  global exclusion wildcard patterns. Relative paths defined here will be
+  relative to the _docs/_ directory.
+
+  ```yaml
+  plugins:
+    - include-markdown:
+        exclude:
+          - LICENSE.md
+          - api/**
+  ```
+
+- <a name="config_cache" href="#config_cache">#</a> **cache**: Define a
+  expiration time in seconds for cached HTTP requests when including
+  from URLs.
+
+  ```yaml
+  plugins:
+    - include-markdown:
+        cache: 600
+  ```
+
+  In order to use this feature, the dependency [platformdirs] must be installed.
+  You can include it in the installation of the plugin adding the `cache` extra:
+
+  ```txt
+  # requirements.txt
+  mkdocs-include-markdown-plugin[cache]
+  ```
 
 ### Reference
 
@@ -92,10 +109,12 @@ to include files of any type.
 
 Paths of included files can be either:
 
-- Local files with absolute or relative paths to the file that includes them.
-- Globs matching multiples files, in which case certain paths can be ignored
-  using the `exclude` argument.
 - URLs to include remote content.
+- Local files:
+  - Absolute paths (starting with a path separator).
+  - Relative from the file that includes them (starting with `./` or `../`).
+  - Relative from the _docs/_ directory.
+- [Bash wildcard globs] matching multiple local files.
 
 File paths to include and string arguments can be wrapped by double `"` or
 single `'` quotes, which can be escaped prepending them a `\` character as
@@ -255,3 +274,4 @@ Includes the content of a file or a group of files.
 [cibuildwheel-repo-link]: https://github.com/joerick/cibuildwheel
 [es-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/es/README.md
 [fr-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/fr/README.md
+[Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax
diff --git a/examples/exclude-self/docs/README.md b/examples/exclude-self/docs/README.md
deleted file mode 100644
index f608232..0000000
--- a/examples/exclude-self/docs/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Frequently Asked Questions (FAQ)
-
-{%
-include-markdown "./[!README]**.md"
-%}
diff --git a/examples/exclude-self/docs/included.md b/examples/exclude-self/docs/included.md
deleted file mode 100644
index 333a243..0000000
--- a/examples/exclude-self/docs/included.md
+++ /dev/null
@@ -1,1 +0,0 @@
-Some included content.
diff --git a/examples/exclude-self/mkdocs.yml b/examples/exclude-self/mkdocs.yml
deleted file mode 100644
index 0f97266..0000000
--- a/examples/exclude-self/mkdocs.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-site_name: Foo
-plugins:
-  - include-markdown
diff --git a/examples/global-exclude/docs/api/bar.md b/examples/global-exclude/docs/api/bar.md
new file mode 100644
index 0000000..e18a9ef
--- /dev/null
+++ b/examples/global-exclude/docs/api/bar.md
@@ -0,0 +1,1 @@
+This should not be included.
diff --git a/examples/global-exclude/docs/api/baz/qux.md b/examples/global-exclude/docs/api/baz/qux.md
new file mode 100644
index 0000000..e18a9ef
--- /dev/null
+++ b/examples/global-exclude/docs/api/baz/qux.md
@@ -0,0 +1,1 @@
+This should not be included.
diff --git a/examples/global-exclude/docs/api/foo.md b/examples/global-exclude/docs/api/foo.md
new file mode 100644
index 0000000..e18a9ef
--- /dev/null
+++ b/examples/global-exclude/docs/api/foo.md
@@ -0,0 +1,1 @@
+This should not be included.
diff --git a/examples/global-exclude/docs/include.md b/examples/global-exclude/docs/include.md
new file mode 100644
index 0000000..d7b4ae3
--- /dev/null
+++ b/examples/global-exclude/docs/include.md
@@ -0,0 +1,1 @@
+This should be included.
diff --git a/examples/global-exclude/docs/index.md b/examples/global-exclude/docs/index.md
new file mode 100644
index 0000000..57fd8a1
--- /dev/null
+++ b/examples/global-exclude/docs/index.md
@@ -0,0 +1,1 @@
+{% include-markdown "**" exclude="./{index,license}.md" %}
diff --git a/examples/global-exclude/docs/license.md b/examples/global-exclude/docs/license.md
new file mode 100644
index 0000000..e18a9ef
--- /dev/null
+++ b/examples/global-exclude/docs/license.md
@@ -0,0 +1,1 @@
+This should not be included.
diff --git a/examples/global-exclude/mkdocs.yml b/examples/global-exclude/mkdocs.yml
new file mode 100644
index 0000000..c1bb677
--- /dev/null
+++ b/examples/global-exclude/mkdocs.yml
@@ -0,0 +1,5 @@
+site_name: My Docs
+plugins:
+  - include-markdown:
+      exclude:
+        - api/**
diff --git a/locale/es/README.md b/locale/es/README.md
index 0679c09..005ed7f 100644
--- a/locale/es/README.md
+++ b/locale/es/README.md
@@ -32,10 +32,6 @@ plugins:
 
 El comportamiento global del plugin puede ser personalizado en la configuración.
 
-- <a name="config_tags" href="#config_tags">#</a> **opening_tag** and
-**closing_tag**: Las etiquetas de apertura y cierre. Por defecto son `{%` y
-`%}`.
-
 La mayoría de los parámetros de configuración definirán los valores por defecto
 pasados a los argumentos de las directivas y están documentados en la
 [referencia](#referencia).
@@ -43,8 +39,6 @@ pasados a los argumentos de las directivas y están documentados en la
 ```yaml
 plugins:
   - include-markdown:
-      opening_tag: "{!"
-      closing_tag: "!}"
       encoding: ascii
       preserve_includer_indent: false
       dedent: false
@@ -54,25 +48,42 @@ plugins:
       heading_offset: 0
       start: <!--start-->
       end: <!--end-->
-      exclude: LICENSE.md
 ```
 
-La configuración `cache` define un tiempo de expiración en segundos para las
-peticiones HTTP cuando se incluye desde URLs.
-
-```yaml
-plugins:
+- <a name="config_tags" href="#config_tags">#</a> **opening_tag** and
+**closing_tag**: Las etiquetas de apertura y cierre. Por defecto son `{%` y
+`%}`.
+   ```yaml
+   plugins:
+  - include-markdown:
+      opening_tag: "{!"
+      closing_tag: "!}"
+   ```
+- <a name="config_exclude" href="#config_exclude">#</a> **exclude**: Define
+patrones de comodín de exclusión globales. Las rutas relativas definidas aquí
+serán relativas al directorio *docs/*.
+   ```yaml
+   plugins:
+  - include-markdown:
+      exclude:
+        - LICENSE.md
+        - api/**
+   ```
+- <a name="config_cache" href="#config_cache">#</a> **cache**: Define un tiempo
+de caducidad en segundos para las solicitudes HTTP almacenadas en caché al
+incluir desde URL.
+   ```yaml
+   plugins:
   - include-markdown:
       cache: 600
-```
+   ```
 
-Para usar esta funcionalidad, la dependencia [platformdirs] debe ser instalada.
+   Para usar esta funcionalidad, la dependencia [platformdirs] debe ser instalada.
 Puedes incluirla en la instalación del plugin añadiendo el extra `cache`:
-
-```txt
-# requirements.txt
+   ```txt
+   # requirements.txt
 mkdocs-include-markdown-plugin[cache]
-```
+   ```
 
 ### Referencia
 
@@ -81,10 +92,14 @@ incluir archivos de cualquier tipo.
 
 Las rutas de los archivos a incluir pueden ser:
 
-- Archivos locales con rutas absolutas o relativas al archivo que los incluye.
-- Globs coincidiendo con múltiples archivos, en cuyo caso ciertas rutas pueden
-ser ignoradas usando el argumento `exclude`.
 - URLs para incluir contenido remoto.
+- Archivos locales:
+   - Rutas absolutas (comenzando con un separador de rutas).
+   - Relativas desde el archivo que las incluye (empezando por `./` o `../`).
+   - Relativas desde el directorio *docs/*.
+- [Bash wildcard globs] matching multiple local files.
+[Patrones glob de Bash]
+que coincidan con múltiples archivos locales.
 
 Las rutas de archivo para incluir y los argumentos de cadena se pueden envolver
 con comillas dobles `"` o simples `'`, que se pueden escapar anteponiendo un
@@ -92,7 +107,7 @@ carácter `\` como `\"` y `\'`.
 
 Las cadenas **start** y **end** pueden contener caracteres usuales de secuencias
 de escape (al estilo Python) como `\n` para hacer coincidir contra caracteres de
-salto de línea
+salto de línea.
 
 #### **`include-markdown`**
 
@@ -248,3 +263,4 @@ separar este plugin de la documentación de
 [cibuildwheel-repo-link]: https://github.com/joerick/cibuildwheel
 [es-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/es/README.md
 [fr-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/fr/README.md
+[Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax
diff --git a/locale/es/README.md.po b/locale/es/README.md.po
index 3813503..3afedba 100644
--- a/locale/es/README.md.po
+++ b/locale/es/README.md.po
@@ -248,7 +248,7 @@ msgid ""
 msgstr ""
 "Las cadenas **start** y **end** pueden contener caracteres usuales de "
 "secuencias de escape (al estilo Python) como `\\n` para hacer coincidir "
-"contra caracteres de salto de línea"
+"contra caracteres de salto de línea."
 
 msgid ""
 "File paths to include and string arguments can be wrapped by double `\"` or "
@@ -346,23 +346,9 @@ msgstr ""
 "defecto pasados a los argumentos de las directivas y están documentados en "
 "la [referencia](#referencia)."
 
-msgid ""
-"The `cache` setting defines a expiration time in seconds for HTTP requests "
-"when including from URLs."
-msgstr ""
-"La configuración `cache` define un tiempo de expiración en segundos para las"
-" peticiones HTTP cuando se incluye desde URLs."
-
 msgid "Paths of included files can be either:"
 msgstr "Las rutas de los archivos a incluir pueden ser:"
 
-msgid ""
-"Globs matching multiples files, in which case certain paths can be ignored "
-"using the `exclude` argument."
-msgstr ""
-"Globs coincidiendo con múltiples archivos, en cuyo caso ciertas rutas pueden"
-" ser ignoradas usando el argumento `exclude`."
-
 msgid "URLs to include remote content."
 msgstr "URLs para incluir contenido remoto."
 
@@ -375,7 +361,44 @@ msgstr ""
 "instalada. Puedes incluirla en la instalación del plugin añadiendo el extra "
 "`cache`:"
 
+msgid "Local files:"
+msgstr "Archivos locales:"
+
+msgid "Absolute paths (starting with a path separator)."
+msgstr "Rutas absolutas (comenzando con un separador de rutas)."
+
+msgid "[Bash wildcard globs] matching multiple local files."
+msgstr ""
+"[Bash wildcard globs] matching multiple local files.\n"
+"[Patrones glob de Bash] que coincidan con múltiples archivos locales."
+
 msgid ""
-"Local files with absolute or relative paths to the file that includes them."
+"[Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax"
 msgstr ""
-"Archivos locales con rutas absolutas o relativas al archivo que los incluye."
+"[Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax"
+
+msgid ""
+"<a name=\"config_exclude\" href=\"#config_exclude\">#</a> **exclude**: "
+"Define global exclusion wildcard patterns. Relative paths defined here will "
+"be relative to the *docs/* directory."
+msgstr ""
+"<a name=\"config_exclude\" href=\"#config_exclude\">#</a> **exclude**: "
+"Define patrones de comodín de exclusión globales. Las rutas relativas "
+"definidas aquí serán relativas al directorio *docs/*."
+
+msgid ""
+"<a name=\"config_cache\" href=\"#config_cache\">#</a> **cache**: Define a "
+"expiration time in seconds for cached HTTP requests when including from "
+"URLs."
+msgstr ""
+"<a name=\"config_cache\" href=\"#config_cache\">#</a> **cache**: Define un "
+"tiempo de caducidad en segundos para las solicitudes HTTP almacenadas en "
+"caché al incluir desde URL."
+
+msgid ""
+"Relative from the file that includes them (starting with `./` or `../`)."
+msgstr ""
+"Relativas desde el archivo que las incluye (empezando por `./` o `../`)."
+
+msgid "Relative from the *docs/* directory."
+msgstr "Relativas desde el directorio *docs/*."
diff --git a/locale/fr/README.md b/locale/fr/README.md
index 135bf68..51292c1 100644
--- a/locale/fr/README.md
+++ b/locale/fr/README.md
@@ -32,18 +32,12 @@ plugins:
 
 Le comportement global du plugin peut être personnalisé dans la configuration.
 
-- <a name="config_tags" href="#config_tags">#</a> **opening_tag** and
-**closing_tag**: Les balises d'ouverture et de fermeture par défaut. Par
-défaut sont `{%` et `%}`.
-
 La plupart des paramètres définissent les valeurs par défaut transmises aux
 arguments des directives et sont documentés dans la [référence](#référence).
 
 ```yaml
 plugins:
   - include-markdown:
-      opening_tag: "{!"
-      closing_tag: "!}"
       encoding: ascii
       preserve_includer_indent: false
       dedent: false
@@ -53,26 +47,43 @@ plugins:
       heading_offset: 0
       start: <!--start-->
       end: <!--end-->
-      exclude: LICENSE.md
 ```
 
-Le paramètre `cache` définit un délai d'expiration en secondes pour les requêtes
-HTTP lors de l'inclusion d'URL.
-
-```yaml
-plugins:
+- <a name="config_tags" href="#config_tags">#</a> **opening_tag** and
+**closing_tag**: Les balises d'ouverture et de fermeture par défaut. Par
+défaut sont `{%` et `%}`.
+   ```yaml
+   plugins:
+  - include-markdown:
+      opening_tag: "{!"
+      closing_tag: "!}"
+   ```
+- <a name="config_exclude" href="#config_exclude">#</a> **exclude**: Définissez
+des modèles génériques d'exclusion globale. Les chemins de fichiers relatifs
+définis ici seront relatifs au répertoire *docs/*.
+   ```yaml
+   plugins:
+  - include-markdown:
+      exclude:
+        - LICENSE.md
+        - api/**
+   ```
+- <a name="config_cache" href="#config_cache">#</a> **cache**: Définissez un
+délai d'expiration en secondes pour les requêtes HTTP mises en cache lors de
+l'inclusion d'URL.
+   ```yaml
+   plugins:
   - include-markdown:
       cache: 600
-```
+   ```
 
-Pour utiliser cette fonctionnalité, la dépendance [platformdirs] doit être
+   Pour utiliser cette fonctionnalité, la dépendance [platformdirs] doit être
 installée. Vous pouvez l'inclure dans l'installation du plugin en ajoutant le
 supplément `cache`:
-
-```txt
-# requirements.txt
+   ```txt
+   # requirements.txt
 mkdocs-include-markdown-plugin[cache]
-```
+   ```
 
 ### Référence
 
@@ -81,11 +92,12 @@ autre pour inclure des fichiers de tout type.
 
 Les chemins des fichiers inclus peuvent être soit:
 
-- Fichiers locaux avec des chemins absolus ou relatifs vers le fichier qui les
-contient.
-- Globs correspondant à plusieurs fichiers, auquel cas certains chemins peuvent
-être ignorés en utilisant l'argument `exclude`.
 - URL pour inclure du contenu distant.
+- Fichiers locaux:
+   - Chemins de fichier absolus (commençant par un séparateur de chemin).
+   - Relatifs du fichiers qui les inclut (commençant par `./` ou `../`).
+   - Relatif du répertoire *docs/*.
+- Globs génériques Bash correspondant à plusieurs fichiers locaux.
 
 Les chemins d'accès aux fichiers à inclure et les arguments de chaîne peuvent
 être entourés de guillemets doubles `"` ou simples `'`, qui peuvent être
@@ -248,3 +260,4 @@ autorisations][cibuildwheel-470] pour séparer ce plugin de la documentation de
 [cibuildwheel-repo-link]: https://github.com/joerick/cibuildwheel
 [es-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/es/README.md
 [fr-readme-link]: https://github.com/mondeja/mkdocs-include-markdown-plugin/blob/master/locale/fr/README.md
+[Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax
diff --git a/locale/fr/README.md.po b/locale/fr/README.md.po
index 50f4b5d..bf411f4 100644
--- a/locale/fr/README.md.po
+++ b/locale/fr/README.md.po
@@ -345,23 +345,9 @@ msgstr ""
 "La plupart des paramètres définissent les valeurs par défaut transmises aux "
 "arguments des directives et sont documentés dans la [référence](#référence)."
 
-msgid ""
-"The `cache` setting defines a expiration time in seconds for HTTP requests "
-"when including from URLs."
-msgstr ""
-"Le paramètre `cache` définit un délai d'expiration en secondes pour les "
-"requêtes HTTP lors de l'inclusion d'URL."
-
 msgid "Paths of included files can be either:"
 msgstr "Les chemins des fichiers inclus peuvent être soit:"
 
-msgid ""
-"Globs matching multiples files, in which case certain paths can be ignored "
-"using the `exclude` argument."
-msgstr ""
-"Globs correspondant à plusieurs fichiers, auquel cas certains chemins "
-"peuvent être ignorés en utilisant l'argument `exclude`."
-
 msgid "URLs to include remote content."
 msgstr "URL pour inclure du contenu distant."
 
@@ -374,8 +360,41 @@ msgstr ""
 "installée. Vous pouvez l'inclure dans l'installation du plugin en ajoutant "
 "le supplément `cache`:"
 
+msgid "Local files:"
+msgstr "Fichiers locaux:"
+
+msgid "Absolute paths (starting with a path separator)."
+msgstr "Chemins de fichier absolus (commençant par un séparateur de chemin)."
+
+msgid "[Bash wildcard globs] matching multiple local files."
+msgstr "Globs génériques Bash correspondant à plusieurs fichiers locaux."
+
 msgid ""
-"Local files with absolute or relative paths to the file that includes them."
+"[Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax"
 msgstr ""
-"Fichiers locaux avec des chemins absolus ou relatifs vers le fichier qui les"
-" contient."
+"[Bash wildcard globs]: https://facelessuser.github.io/wcmatch/glob/#syntax"
+
+msgid ""
+"<a name=\"config_exclude\" href=\"#config_exclude\">#</a> **exclude**: "
+"Define global exclusion wildcard patterns. Relative paths defined here will "
+"be relative to the *docs/* directory."
+msgstr ""
+"<a name=\"config_exclude\" href=\"#config_exclude\">#</a> **exclude**: "
+"Définissez des modèles génériques d'exclusion globale. Les chemins de "
+"fichiers relatifs définis ici seront relatifs au répertoire *docs/*."
+
+msgid ""
+"<a name=\"config_cache\" href=\"#config_cache\">#</a> **cache**: Define a "
+"expiration time in seconds for cached HTTP requests when including from "
+"URLs."
+msgstr ""
+"<a name=\"config_cache\" href=\"#config_cache\">#</a> **cache**: Définissez "
+"un délai d'expiration en secondes pour les requêtes HTTP mises en cache lors"
+" de l'inclusion d'URL."
+
+msgid ""
+"Relative from the file that includes them (starting with `./` or `../`)."
+msgstr "Relatifs du fichiers qui les inclut (commençant par `./` ou `../`)."
+
+msgid "Relative from the *docs/* directory."
+msgstr "Relatif du répertoire *docs/*."
diff --git a/pyproject.toml b/pyproject.toml
index a6a9158..8fe2724 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [project]
 name = "mkdocs-include-markdown-plugin"
-version = "5.1.0"
+version = "6.0.0"
 description = "Mkdocs Markdown includer plugin."
 readme = "README.md"
 license = "Apache-2.0"
@@ -22,6 +22,7 @@ classifiers = [
   "Programming Language :: Python :: 3.12"
 ]
 keywords = ["markdown", "mkdocs", "includer", "plugin"]
+dependencies = ["wcmatch>=8,<9"]
 
 [[project.authors]]
 name = "Joe Rickerby"
diff --git a/src/mkdocs_include_markdown_plugin/config.py b/src/mkdocs_include_markdown_plugin/config.py
index fed73e1..66c7757 100644
--- a/src/mkdocs_include_markdown_plugin/config.py
+++ b/src/mkdocs_include_markdown_plugin/config.py
@@ -2,7 +2,7 @@
 
 from __future__ import annotations
 
-from mkdocs.config.config_options import Type as MkType
+from mkdocs.config.config_options import ListOfItems, Optional, Type as MkType
 
 
 CONFIG_DEFAULTS = {
@@ -68,7 +68,7 @@
     ),
     (
         'exclude',
-        MkType(str, default=CONFIG_DEFAULTS['exclude']),
+        Optional(ListOfItems(MkType(str))),
     ),
     (
         'cache',
diff --git a/src/mkdocs_include_markdown_plugin/directive.py b/src/mkdocs_include_markdown_plugin/directive.py
index 5ca5de4..eeeb597 100644
--- a/src/mkdocs_include_markdown_plugin/directive.py
+++ b/src/mkdocs_include_markdown_plugin/directive.py
@@ -2,10 +2,15 @@
 
 from __future__ import annotations
 
+import os
 import re
 import string
 from typing import TYPE_CHECKING
 
+from wcmatch import glob
+
+from mkdocs_include_markdown_plugin import process
+
 
 if TYPE_CHECKING:
     from typing import TypedDict
@@ -27,11 +32,11 @@ class DirectiveBoolArgument(TypedDict):  # noqa: D101
             'heading-offset': int,
             'start': str,
             'end': str,
-            'exclude': str,
         },
     )
 
 
+GLOB_FLAGS = glob.NEGATE | glob.EXTGLOB | glob.GLOBSTAR | glob.BRACE
 RE_ESCAPED_PUNCTUATION = re.escape(string.punctuation)
 
 DOUBLE_QUOTED_STR_RE = r'([^"]|(?<=\\)["])+'
@@ -165,3 +170,87 @@ def parse_bool_options(
         except KeyError:
             invalid_args.append(arg_name)
     return bool_options, invalid_args
+
+
+def resolve_file_paths_to_include(
+    filename_or_url: str,
+    includer_page_src_path: str,
+    docs_dir: str,
+    ignore_paths: list[str],
+) -> tuple[list[str], bool]:
+    """Resolve the file paths to include for a directive."""
+    if process.is_url(filename_or_url):
+        return [filename_or_url], True
+    elif process.is_absolute_path(filename_or_url):
+        if os.name == 'nt':
+            # Windows
+            fpath = os.path.normpath(filename_or_url)
+            if not os.path.isfile(fpath):
+                return [], False
+
+            return process.filter_paths(
+                [fpath], ignore_paths,
+            ), False
+        return process.filter_paths(
+            glob.iglob(
+                os.path.normpath(filename_or_url),
+                flags=GLOB_FLAGS,
+            ),
+            ignore_paths,
+        ), False
+    elif process.is_relative_path(filename_or_url):
+        root_dir = os.path.abspath(
+            os.path.dirname(includer_page_src_path),
+        )
+        return process.filter_paths(
+            (
+                os.path.normpath(os.path.join(root_dir, fp))
+                for fp in glob.iglob(
+                    filename_or_url,
+                    flags=GLOB_FLAGS,
+                    root_dir=root_dir,
+                )
+            ), ignore_paths,
+        ), False
+
+    # relative to docs_dir
+    return process.filter_paths(
+        (
+            os.path.normpath(os.path.join(docs_dir, fp))
+            for fp in glob.iglob(
+                filename_or_url,
+                flags=GLOB_FLAGS,
+                root_dir=docs_dir,
+            )
+        ),
+        ignore_paths,
+    ), False
+
+
+def resolve_file_paths_to_exclude(
+    exclude_string: str,
+    includer_page_src_path: str,
+    docs_dir: str,
+) -> list[str]:
+    """Resolve the file paths to exclude for a directive."""
+    root_dir = None
+    if process.is_absolute_path(exclude_string):
+        return glob.glob(exclude_string, flags=GLOB_FLAGS)
+    elif process.is_relative_path(exclude_string):
+        root_dir = os.path.abspath(
+            os.path.dirname(includer_page_src_path),
+        )
+        return [
+            os.path.normpath(
+                os.path.join(root_dir, fp),
+            ) for fp in glob.glob(
+                exclude_string,
+                flags=GLOB_FLAGS,
+                root_dir=root_dir,
+            )
+        ]
+    return glob.glob(
+        exclude_string,
+        flags=GLOB_FLAGS,
+        root_dir=docs_dir,
+    )
diff --git a/src/mkdocs_include_markdown_plugin/event.py b/src/mkdocs_include_markdown_plugin/event.py
index 624f1c5..38fdb0e 100644
--- a/src/mkdocs_include_markdown_plugin/event.py
+++ b/src/mkdocs_include_markdown_plugin/event.py
@@ -2,7 +2,6 @@
 
 from __future__ import annotations
 
-import glob
 import html
 import logging
 import os
@@ -11,17 +10,21 @@
 from collections.abc import MutableMapping
 from typing import TYPE_CHECKING, Any
 
-from mkdocs.exceptions import BuildError
+from mkdocs.exceptions import PluginError
+from wcmatch import glob
 
 from mkdocs_include_markdown_plugin import process
 from mkdocs_include_markdown_plugin.cache import Cache
 from mkdocs_include_markdown_plugin.config import CONFIG_DEFAULTS
 from mkdocs_include_markdown_plugin.directive import (
     ARGUMENT_REGEXES,
+    GLOB_FLAGS,
     create_include_tag,
     parse_bool_options,
     parse_filename_argument,
     parse_string_argument,
+    resolve_file_paths_to_exclude,
+    resolve_file_paths_to_include,
 )
 from mkdocs_include_markdown_plugin.files_watcher import FilesWatcher
 
@@ -40,6 +43,9 @@
         },
     )
 
+    class Settings(TypedDict):  # noqa: D101
+        exclude: list[str] | None
+
 
 logger = logging.getLogger('mkdocs.plugins.mkdocs_include_markdown_plugin')
 
@@ -55,6 +61,7 @@ def get_file_content(
         docs_dir: str,
         tags: IncludeTags,
         defaults: DefaultValues,
+        settings: Settings,
         cumulative_heading_offset: int = 0,
         files_watcher: FilesWatcher | None = None,
         http_cache: Cache | None = None,
@@ -71,7 +78,7 @@ def found_include_tag(match: re.Match[str]) -> str:
                 markdown,
                 directive_match_start,
             )
-            raise BuildError(
+            raise PluginError(
                 "Found no path passed including with 'include'"
                 f' directive at {os.path.relpath(page_src_path, docs_dir)}'
                 f':{lineno}',
@@ -79,64 +86,60 @@ def found_include_tag(match: re.Match[str]) -> str:
 
         arguments_string = match.group('arguments')
 
-        if os.path.isabs(filename) or process.is_url(filename):
-            file_path_glob = filename
-        else:
-            file_path_glob = os.path.join(
-                os.path.abspath(os.path.dirname(page_src_path)),
-                filename,
-            )
-
         exclude_match = ARGUMENT_REGEXES['exclude'].search(arguments_string)
-        if exclude_match is None:
-            if defaults['exclude'] is None:  # pragma: no branch
-                ignore_paths: list[str] = []
-            else:  # pragma: no cover
-                ignore_paths = glob.glob(defaults['exclude'])
-        else:
+        ignore_paths = []
+        if settings['exclude'] is not None:
+            ignore_paths.extend(
+                glob.glob(
+                    [
+                        os.path.join(docs_dir, fp)
+                        if not os.path.isabs(fp)
+                        else fp for fp in settings['exclude']
+                    ],
+                    flags=GLOB_FLAGS,
+                    root_dir=docs_dir,
+                ),
+            )
+        if exclude_match is not None:
             exclude_string = parse_string_argument(exclude_match)
             if exclude_string is None:
                 lineno = lineno_from_content_start(
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
-                    "Invalid empty 'exclude' argument in 'include' directive"
-                    f' at {os.path.relpath(page_src_path, docs_dir)}:{lineno}',
+                raise PluginError(
+                    "Invalid empty 'exclude' argument in 'include'"
+                    f' directive at {os.path.relpath(page_src_path, docs_dir)}'
+                    f':{lineno}',
                 )
-            else:
-                if os.path.isabs(exclude_string):
-                    exclude_globstr = exclude_string
-                else:
-                    exclude_globstr = os.path.realpath(
-                        os.path.join(
-                            os.path.abspath(os.path.dirname(page_src_path)),
-                            exclude_string,
-                        ),
-                    )
-                ignore_paths = glob.glob(exclude_globstr)
-
-        if process.is_url(filename):
-            file_paths_to_include = [file_path_glob]
-        else:
-            file_paths_to_include = process.filter_paths(
-                glob.iglob(file_path_glob, recursive=True),
-                ignore_paths,
+            ignore_paths.extend(
+                resolve_file_paths_to_exclude(
+                    exclude_string,
+                    page_src_path,
+                    docs_dir,
+                ),
             )
+        ignore_paths = list(set(ignore_paths))
+
+        file_paths_to_include, is_url = resolve_file_paths_to_include(
+            filename,
+            page_src_path,
+            docs_dir,
+            ignore_paths,
+        )
 
         if not file_paths_to_include:
             lineno = lineno_from_content_start(
                 markdown,
                 directive_match_start,
             )
-            raise BuildError(
+            raise PluginError(
                 f"No files found including '{raw_filename}'"
                 f' at {os.path.relpath(page_src_path, docs_dir)}'
                 f':{lineno}',
             )
-        elif files_watcher is not None:
-            if not process.is_url(file_path_glob):
-                files_watcher.included_files.extend(file_paths_to_include)
+        elif files_watcher is not None and not is_url:
+            files_watcher.included_files.extend(file_paths_to_include)
 
         bool_options, invalid_bool_args = parse_bool_options(
             ['preserve-includer-indent', 'dedent', 'trailing-newlines'],
@@ -148,7 +151,7 @@ def found_include_tag(match: re.Match[str]) -> str:
                 markdown,
                 directive_match_start,
             )
-            raise BuildError(
+            raise PluginError(
                 f"Invalid value for '{invalid_bool_args[0]}' argument of"
                 " 'include' directive at"
                 f' {os.path.relpath(page_src_path, docs_dir)}'
@@ -163,7 +166,7 @@ def found_include_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'start' argument in 'include' directive at "
                     f'{os.path.relpath(page_src_path, docs_dir)}:{lineno}',
                 )
@@ -178,7 +181,7 @@ def found_include_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'end' argument in 'include' directive at "
                     f'{os.path.relpath(page_src_path, docs_dir)}:{lineno}',
                 )
@@ -193,7 +196,7 @@ def found_include_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'encoding' argument in 'include'"
                     ' directive at '
                     f'{os.path.relpath(page_src_path, docs_dir)}:{lineno}',
@@ -228,6 +231,7 @@ def found_include_tag(match: re.Match[str]) -> str:
                 docs_dir,
                 tags,
                 defaults,
+                settings,
                 files_watcher=files_watcher,
                 http_cache=http_cache,
             )
@@ -289,7 +293,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                 markdown,
                 directive_match_start,
             )
-            raise BuildError(
+            raise PluginError(
                 "Found no path passed including with 'include-markdown'"
                 f' directive at {os.path.relpath(page_src_path, docs_dir)}'
                 f':{lineno}',
@@ -297,65 +301,60 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
 
         arguments_string = match.group('arguments')
 
-        if os.path.isabs(filename) or process.is_url(filename):
-            file_path_glob = filename
-        else:
-            file_path_glob = os.path.join(
-                os.path.abspath(os.path.dirname(page_src_path)),
-                filename,
-            )
-
         exclude_match = ARGUMENT_REGEXES['exclude'].search(arguments_string)
-        if exclude_match is None:
-            if defaults['exclude'] is None:  # pragma: no branch
-                ignore_paths: list[str] = []
-            else:  # pragma: no cover
-                ignore_paths = glob.glob(defaults['exclude'])
-        else:
+        ignore_paths = []
+        if settings['exclude'] is not None:
+            ignore_paths.extend(
+                glob.glob(
+                    [
+                        os.path.join(docs_dir, fp)
+                        if not os.path.isabs(fp)
+                        else fp for fp in settings['exclude']
+                    ],
+                    flags=GLOB_FLAGS,
+                    root_dir=docs_dir,
+                ),
+            )
+        if exclude_match is not None:
             exclude_string = parse_string_argument(exclude_match)
             if exclude_string is None:
                 lineno = lineno_from_content_start(
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'exclude' argument in 'include-markdown'"
                     f' directive at {os.path.relpath(page_src_path, docs_dir)}'
                     f':{lineno}',
                 )
-            else:
-                if os.path.isabs(exclude_string):
-                    exclude_globstr = exclude_string
-                else:
-                    exclude_globstr = os.path.realpath(
-                        os.path.join(
-                            os.path.abspath(os.path.dirname(page_src_path)),
-                            exclude_string,
-                        ),
-                    )
-                ignore_paths = glob.glob(exclude_globstr)
-
-        if process.is_url(filename):
-            file_paths_to_include = [file_path_glob]
-        else:
-            file_paths_to_include = process.filter_paths(
-                glob.iglob(file_path_glob, recursive=True),
-                ignore_paths,
+            ignore_paths.extend(
+                resolve_file_paths_to_exclude(
+                    exclude_string,
+                    page_src_path,
+                    docs_dir,
+                ),
             )
+        ignore_paths = list(set(ignore_paths))
+
+        file_paths_to_include, is_url = resolve_file_paths_to_include(
+            filename,
+            page_src_path,
+            docs_dir,
+            ignore_paths,
+        )
 
         if not file_paths_to_include:
             lineno = lineno_from_content_start(
                 markdown,
                 directive_match_start,
             )
-            raise BuildError(
+            raise PluginError(
                 f"No files found including '{raw_filename}' at"
                 f' {os.path.relpath(page_src_path, docs_dir)}'
                 f':{lineno}',
             )
-        elif files_watcher is not None:
-            if not process.is_url(file_path_glob):
-                files_watcher.included_files.extend(file_paths_to_include)
+        elif files_watcher is not None and not is_url:
+            files_watcher.included_files.extend(file_paths_to_include)
 
         bool_options, invalid_bool_args = parse_bool_options(
             [
@@ -371,7 +370,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                 markdown,
                 directive_match_start,
             )
-            raise BuildError(
+            raise PluginError(
                 f"Invalid value for '{invalid_bool_args[0]}' argument of"
                 " 'include-markdown' directive at"
                 f' {os.path.relpath(page_src_path, docs_dir)}'
@@ -387,7 +386,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'start' argument in 'include-markdown'"
                     f' directive at {os.path.relpath(page_src_path, docs_dir)}'
                     f':{lineno}',
@@ -403,7 +402,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'end' argument in 'include-markdown'"
                     f' directive at {os.path.relpath(page_src_path, docs_dir)}'
                     f':{lineno}',
@@ -419,7 +418,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'encoding' argument in 'include-markdown'"
                     ' directive at '
                     f'{os.path.relpath(page_src_path, docs_dir)}:{lineno}',
@@ -438,7 +437,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     "Invalid empty 'heading-offset' argument in"
                     " 'include-markdown' directive at"
                     f' {os.path.relpath(page_src_path, docs_dir)}:{lineno}',
@@ -450,7 +449,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                     markdown,
                     directive_match_start,
                 )
-                raise BuildError(
+                raise PluginError(
                     f"Invalid 'heading-offset' argument \"{offset}\" in"
                     " 'include-markdown' directive at "
                     f'{os.path.relpath(page_src_path, docs_dir)}:{lineno}',
@@ -498,6 +497,7 @@ def found_include_markdown_tag(match: re.Match[str]) -> str:
                 docs_dir,
                 tags,
                 defaults,
+                settings,
                 files_watcher=files_watcher,
                 http_cache=http_cache,
             )
@@ -639,6 +639,8 @@ def on_page_markdown(
             ),
             'start': config.get('start', CONFIG_DEFAULTS['start']),
             'end': config.get('end', CONFIG_DEFAULTS['end']),
+        },
+        {
             'exclude': config.get('exclude', CONFIG_DEFAULTS['exclude']),
         },
         files_watcher=files_watcher,
diff --git a/src/mkdocs_include_markdown_plugin/plugin.py b/src/mkdocs_include_markdown_plugin/plugin.py
index 7f9a2ff..61b7d0a 100644
--- a/src/mkdocs_include_markdown_plugin/plugin.py
+++ b/src/mkdocs_include_markdown_plugin/plugin.py
@@ -5,7 +5,7 @@
 from collections.abc import Callable
 from typing import TYPE_CHECKING, Any, cast
 
-from mkdocs.exceptions import BuildError
+from mkdocs.exceptions import PluginError
 from mkdocs.livereload import LiveReloadServer
 from mkdocs.plugins import BasePlugin, event_priority
 
@@ -46,7 +46,7 @@ def on_config(self, config: MkDocsConfig, **kwargs: Any) -> MkDocsConfig:
         if self.config['cache'] > 0:
             cache = initialize_cache(self.config['cache'])
             if cache is None:
-                raise BuildError(
+                raise PluginError(
                     'The "platformdirs" package is required to use the'
                     ' "cache" option. Install'
                     ' mkdocs-include-markdown-plugin with the "cache"'
diff --git a/src/mkdocs_include_markdown_plugin/process.py b/src/mkdocs_include_markdown_plugin/process.py
index f70ecdf..e4cd940 100644
--- a/src/mkdocs_include_markdown_plugin/process.py
+++ b/src/mkdocs_include_markdown_plugin/process.py
@@ -380,7 +380,7 @@ def rstrip_trailing_newlines(content: str) -> str:
 
 
 def filter_paths(
-        filepaths: Iterator[str],
+        filepaths: Iterator[str] | list[str],
         ignore_paths: list[str],
 ) -> list[str]:
     """Filters a list of paths removing those defined in other list of paths.
@@ -426,6 +426,16 @@ def is_url(string: str) -> bool:
         return False
 
 
+def is_relative_path(string: str) -> bool:
+    """Check if a string looks like a relative path."""
+    return string.startswith(('./', '../'))
+
+
+def is_absolute_path(string: str) -> bool:
+    """Check if a string looks like an absolute path."""
+    return os.path.isabs(string) or string.startswith((os.sep, '/'))
+
+
 def read_file(file_path: str, encoding: str) -> str:
     """Read a file and return its content."""
     with open(file_path, encoding=encoding) as f:


Test patch:
diff --git a/tests/test_unit/test_arguments.py b/tests/test_unit/test_arguments.py
index 151b97e..03b1cd9 100644
--- a/tests/test_unit/test_arguments.py
+++ b/tests/test_unit/test_arguments.py
@@ -3,7 +3,7 @@
 import re
 
 import pytest
-from mkdocs.exceptions import BuildError
+from mkdocs.exceptions import PluginError
 from testing_helpers import parametrize_directives, unix_only
 
 from mkdocs_include_markdown_plugin.event import on_page_markdown
@@ -41,7 +41,7 @@ def test_invalid_bool_arguments(directive, arguments, page, tmp_path, caplog):
 
         filename = 'includer.md'
 
-        with pytest.raises(BuildError) as exc:
+        with pytest.raises(PluginError) as exc:
             on_page_markdown(
                 f'''{{%
     {directive} "{page_to_include_filepath}"
@@ -100,7 +100,7 @@ def test_invalid_start_end_arguments(
 '''
     page_to_include_filepath.write_text(included_content)
 
-    with pytest.raises(BuildError) as exc:
+    with pytest.raises(PluginError) as exc:
         on_page_markdown(
             f'''
 {{%
@@ -160,7 +160,7 @@ def test_invalid_exclude_argument(directive, page, tmp_path, caplog):
     page_to_exclude_filepath.write_text('Content that should be excluded\n')
 
     includer_glob = os.path.join(str(drectory_to_include), '*.md')
-    with pytest.raises(BuildError) as exc:
+    with pytest.raises(PluginError) as exc:
         on_page_markdown(
             f'''{{%
   {directive} "{includer_glob}"
@@ -183,7 +183,7 @@ def test_empty_encoding_argument(directive, page, tmp_path, caplog):
     page_to_include_filepath = tmp_path / 'included.md'
     page_to_include_filepath.write_text('Content to include')
 
-    with pytest.raises(BuildError) as exc:
+    with pytest.raises(PluginError) as exc:
         on_page_markdown(
             f'''{{%
   {directive} "{page_to_include_filepath}"
@@ -230,7 +230,7 @@ def test_invalid_heading_offset_arguments(
     page_to_include_filepath = tmp_path / 'included.md'
     page_to_include_filepath.write_text('# Content to include')
 
-    with pytest.raises(BuildError) as exc:
+    with pytest.raises(PluginError) as exc:
         on_page_markdown(
             f'''{{%
   include-markdown "{page_to_include_filepath}"
@@ -262,7 +262,7 @@ def test_not_escaped_double_quotes(
         page_to_include_filepath = tmp_path / filename
         page_to_include_filepath.write_text('Foo\n')
 
-        with pytest.raises(BuildError) as exc:
+        with pytest.raises(PluginError) as exc:
             on_page_markdown(
                 f'{{% {directive} "{page_to_include_filepath}" %}}',
                 page(tmp_path / 'includer.md'),
@@ -401,7 +401,7 @@ def test_mixed_quotes(
         if escape:
             assert func() == included_content
         else:
-            with pytest.raises(BuildError) as exc:
+            with pytest.raises(PluginError) as exc:
                 func()
             assert re.match(
                 r'No files found including ',
@@ -413,7 +413,7 @@ def test_mixed_quotes(
     def test_no_filename(self, directive, page, tmp_path, caplog):
         filename = 'includer.md'
 
-        with pytest.raises(BuildError) as exc:
+        with pytest.raises(PluginError) as exc:
             on_page_markdown(
                 f'\n\n{{% {directive} %}}',
                 page(tmp_path / filename),
@@ -437,7 +437,7 @@ def test_non_existent_filename(self, directive, page, tmp_path, caplog):
         page_filepath = tmp_path / 'example.md'
         page_filepath.write_text(page_content)
 
-        with pytest.raises(BuildError) as exc:
+        with pytest.raises(PluginError) as exc:
             on_page_markdown(
                 page_content,
                 page(page_filepath),
diff --git a/tests/test_unit/test_exclude.py b/tests/test_unit/test_exclude.py
index 88047aa..6953010 100644
--- a/tests/test_unit/test_exclude.py
+++ b/tests/test_unit/test_exclude.py
@@ -5,12 +5,13 @@
 import re
 
 import pytest
-from mkdocs.exceptions import BuildError
-from testing_helpers import parametrize_directives
+from mkdocs.exceptions import PluginError
+from testing_helpers import parametrize_directives, unix_only
 
 from mkdocs_include_markdown_plugin.event import on_page_markdown
 
 
+@unix_only
 @parametrize_directives
 @pytest.mark.parametrize(
     ('filenames', 'exclude', 'exclude_prefix', 'expected_result'),
@@ -98,7 +99,7 @@ def test_exclude(
     )
 
     if expected_result is None:
-        with pytest.raises(BuildError) as exc:
+        with pytest.raises(PluginError) as exc:
             func()
         assert re.match(r'No files found including ', str(exc.value))
     else:
diff --git a/tests/test_unit/test_glob_include.py b/tests/test_unit/test_glob_include.py
index 9833777..ed72909 100644
--- a/tests/test_unit/test_glob_include.py
+++ b/tests/test_unit/test_glob_include.py
@@ -3,12 +3,13 @@
 import os
 
 import pytest
-from testing_helpers import parametrize_directives
+from testing_helpers import parametrize_directives, unix_only
 
 from mkdocs_include_markdown_plugin.event import on_page_markdown
 
 
-def test_glob_include_simple(page, tmp_path):
+@unix_only
+def test_glob_include_absolute(page, tmp_path):
     includer_file = tmp_path / 'includer.txt'
     included_01_file = tmp_path / 'included_01.txt'
     included_02_file = tmp_path / 'included_02.txt'
diff --git a/tests/test_unit/test_include_markdown.py b/tests/test_unit/test_include_markdown.py
index 513233e..5240244 100644
--- a/tests/test_unit/test_include_markdown.py
+++ b/tests/test_unit/test_include_markdown.py
@@ -830,7 +830,7 @@ def test_include_markdown_relative_rewrite(
 # Heading
 
 {{%
-    include-markdown "docs/page.md"
+    include-markdown "./docs/page.md"
     start="<!--start-->"
     end="<!--end-->"
     {option_value}
@@ -862,7 +862,7 @@ def test_include_markdown_relative_rewrite(
         assert output == '''
 # Heading
 
-<!-- BEGIN INCLUDE docs/page.md '&lt;!--start--&gt;' '&lt;!--end--&gt;' -->
+<!-- BEGIN INCLUDE ./docs/page.md '&lt;!--start--&gt;' '&lt;!--end--&gt;' -->
 
 Here's [a link](docs/page2.md) and here's an image: ![](docs/image.png)
 
@@ -877,7 +877,7 @@ def test_include_markdown_relative_rewrite(
         assert output == '''
 # Heading
 
-<!-- BEGIN INCLUDE docs/page.md '&lt;!--start--&gt;' '&lt;!--end--&gt;' -->
+<!-- BEGIN INCLUDE ./docs/page.md '&lt;!--start--&gt;' '&lt;!--end--&gt;' -->
 
 Here's [a link](page2.md) and here's an image: ![](image.png)
 
diff --git a/tests/test_unit/test_nested_includes.py b/tests/test_unit/test_nested_includes.py
index c7bc3eb..9588145 100644
--- a/tests/test_unit/test_nested_includes.py
+++ b/tests/test_unit/test_nested_includes.py
@@ -284,7 +284,7 @@ def test_nested_include_relpath(page, tmp_path):
     first_includer_content = '''# Header
 
 {%
-  include-markdown "docs/second-includer.txt"
+  include-markdown "./docs/second-includer.txt"
   comments=false
 %}
 '''