Skip to content

Commit 1c2f272

Browse files
committed
[BUGFIX] Sidebar nested file exclude, [FEATURE] .wikignore
1 parent dbec71a commit 1c2f272

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

publish.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ cd "$WIKI_DIR"
1616
git config --local user.email "$(git log -1 --format='%ae')"
1717
git config --local user.name "$(git log -1 --format='%an')"
1818

19+
test -e .wikignore && cat .wikignore >> .gitignore
1920
if [ -n "$WIKI_IGNORE" ]; then
2021
for file in $WIKI_IGNORE; do
2122
echo "$file" >> .gitignore

sidebar.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ IGNORE_FILE="../temp_wiki_excluded_$GITHUB_SHA.txt"
88

99
echo "_Footer.md" >> $IGNORE_FILE
1010
echo "_Sidebar.md" >> $IGNORE_FILE
11+
test -e .wikignore && IGNORE="$IGNORE $(cat .wikignore | tr '\r\n' ' ')"
1112

1213
if [ -n "$IGNORE" ]; then
1314
for file in $IGNORE; do
@@ -26,8 +27,8 @@ for f in *; do
2627
name="${f#*/}"
2728
echo "* ${name^}" >> _Sidebar.md
2829
for file in $f/*; do
29-
if grep -q -x "$f" "$IGNORE_FILE"; then
30-
echo "Exclude $f"
30+
if grep -q -x "$file" "$IGNORE_FILE"; then
31+
echo "Exclude $file"
3132
continue
3233
fi
3334
echo " * [$(basename $file | sed 's/\.[^.]*$//')]($(basename $file | sed 's/\.[^.]*$//'))" >> _Sidebar.md

0 commit comments

Comments
 (0)