Skip to content

Commit 2c102c5

Browse files
committed
simple .html indexing exclusion
1 parent f09e3c3 commit 2c102c5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

astropylibrarian/cli/index.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from typing import Awaitable, List, Optional
99

1010
import aiohttp
11-
import fnmatch
1211
import typer
1312

1413
from astropylibrarian.algolia.client import AlgoliaIndex
@@ -75,10 +74,15 @@ def tutorial_site(
7574
..., help="Name of the Algolia index.", envvar="ALGOLIA_INDEX"
7675
),
7776
ignore: List[str] = typer.Option(
78-
lambda: ["index.html"],
77+
lambda: [
78+
"index.html",
79+
"_static/webpack-macros.html",
80+
"_static/sbt-webpack-macros.html",
81+
],
7982
help=(
8083
"List of HTML files to ignore from indexing. The root index.html "
81-
"file is always excluded."
84+
"file and specific macro files generated by JupyterBook in the `_static_` "
85+
"directory are always excluded."
8286
),
8387
),
8488
) -> None:
@@ -127,10 +131,6 @@ async def run_index_tutorial_site(
127131
relative_path = str(PosixPath(html_path.relative_to(site_dir)))
128132
if relative_path in ignore_paths:
129133
continue
130-
# allow wildcard matching with ignore_paths
131-
for pp in ignore_paths:
132-
if fnmatch.fnmatch(relative_path, pp):
133-
continue
134134
page_url = f"{root_url}/{relative_path}"
135135
tasks.append(
136136
index_tutorial_from_path(

0 commit comments

Comments
 (0)