docs: exclude_patterns workaround
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 689fad8..bf06015 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,13 @@
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+
+## [NEXT.VERSION]
+
+### Added
+
+- Documenting `exclude_patterns` workaround for issue [#31](https://github.com/TendTo/rules_doxygen/issues/31)
+
 ## [2.4.2]
 
 ### Added
diff --git a/docs/doxygen_doc.md b/docs/doxygen_doc.md
index 34aae8d..e9452ad 100755
--- a/docs/doxygen_doc.md
+++ b/docs/doxygen_doc.md
@@ -208,6 +208,13 @@
 )
 ```
 
+### Excluding Bazel specific folders
+
+Including the root directory among the input directories, which happens when a target starting with `//:` is used as a source,
+may cause Bazel specific folders, such as `external`, to be explored by Doxygen.
+This can slow down the documentation generation or even cause an input buffer overflow.
+To avoid this, it is recommended to use the `exclude_patterns` parameter and set it to something like `["*/external/*"]`, extending it with other patterns as needed.
+
 ### Example
 
 ```bzl
diff --git a/doxygen/doxygen.bzl b/doxygen/doxygen.bzl
index ce2de86..6ce5f18 100644
--- a/doxygen/doxygen.bzl
+++ b/doxygen/doxygen.bzl
@@ -604,6 +604,13 @@
     )
     ```
 
+    ### Excluding Bazel specific folders
+
+    Including the root directory among the input directories, which happens when a target starting with `//:` is used as a source,
+    may cause Bazel specific folders, such as `external`, to be explored by Doxygen.
+    This can slow down the documentation generation or even cause an input buffer overflow.
+    To avoid this, it is recommended to use the `exclude_patterns` parameter and set it to something like `["*/external/*"]`, extending it with other patterns as needed.
+
     ### Example
 
     ```bzl