@@ -44,6 +44,10 @@ def on_config(self, config):
4444 if not self .config .enabled :
4545 return
4646
47+ # Skip if tags should not be built
48+ if not self .config .tags :
49+ return
50+
4751 # Initialize tags
4852 self .tags = defaultdict (list )
4953 self .tags_file = None
@@ -66,6 +70,10 @@ def on_nav(self, nav, config, files):
6670 if not self .config .enabled :
6771 return
6872
73+ # Skip if tags should not be built
74+ if not self .config .tags :
75+ return
76+
6977 # Resolve tags index page
7078 file = self .config .tags_file
7179 if file :
@@ -76,6 +84,10 @@ def on_page_markdown(self, markdown, page, config, files):
7684 if not self .config .enabled :
7785 return
7886
87+ # Skip if tags should not be built
88+ if not self .config .tags :
89+ return
90+
7991 # Skip, if page is excluded
8092 if page .file .inclusion .is_excluded ():
8193 return
@@ -93,6 +105,10 @@ def on_page_context(self, context, page, config, nav):
93105 if not self .config .enabled :
94106 return
95107
108+ # Skip if tags should not be built
109+ if not self .config .tags :
110+ return
111+
96112 # Provide tags for page
97113 if "tags" in page .meta :
98114 context ["tags" ] = [
0 commit comments