Skip to content

Commit b43dce1

Browse files
authored
Add dynamic listing of available patterns for each language (#30)
1 parent 3952f26 commit b43dce1

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

build.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,18 @@ git checkout-index -a -f --prefix=../patterns/
1414
cd ../patterns
1515
rm -rf etc .circleci .github .mvn checkstyle-suppressions.xml CONTRIBUTING.MD LICENSE.md license-plugin-header-style.xml mvnw mvnw.cmd pom.xml PULL_REQUEST_TEMPLATE.md .all-contributorsrc .gitignore gpl-3.0.txt layers.log lgpl-3.0.txt lombok.config service-layer.log
1616
find . -maxdepth 2 -type d -exec bash -c 'cd "{}" && pwd && rm -rf src pom.xml *.ucls *.puml .gitignore' \;
17-
mv -vf index.md README.md
17+
18+
rm -v index.md README.md
19+
echo "<ChildTableOfContents />" > README.md
20+
1821
# Setup java-design-patterns - Chinese
1922
cd localization/zh
2023
mkdir ../../../zh/patterns
2124
cp -vrf * ../../../zh/patterns
2225
cd ../../../zh/patterns
23-
mv -vf index.md README.md
26+
rm -v index.md README.md
27+
echo "<ChildTableOfContents />" > README.md
28+
2429
cd ../..
2530
rm -rf java-design-patterns
2631
rm -rf patterns/localization

docs/.vuepress/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,6 @@ module.exports = config({
8080
pwa: false,
8181
editLinks: false,
8282
},
83+
84+
plugins: ['vuepress-plugin-child-toc'],
8385
});

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
"vuepress": "^1.8.2",
1515
"vuepress-theme-hope": "^1.20.2"
1616
},
17-
"dependencies": {}
17+
"dependencies": {
18+
"vuepress-plugin-child-toc": "^0.1.2"
19+
}
1820
}

0 commit comments

Comments
 (0)