diff --git a/.gitignore b/.gitignore
index a5107aa..242f43b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@ node_modules/
dist/
*.log
coverage/
-docs/
\ No newline at end of file
+docs/
+pageDocs/
\ No newline at end of file
diff --git a/package.json b/package.json
index 0013635..30f850b 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"build": "tsc && prettier --check 'dist/**/*' --write",
"test": "jest --coverage",
"lint": "eslint --ext=.ts,.tsx --max-warnings=0 src/ && prettier --check 'src/**/*'",
- "docs": "typedoc --out docs/$npm_package_version && scripts/gen-docs-index.sh $npm_package_version"
+ "docs": "scripts/gen-docs.sh $npm_package_version"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -52,6 +52,7 @@
"react-test-renderer": "^16.9.0",
"ts-jest": "^24.1.0",
"typedoc": "^0.15.0",
+ "typedoc-plugin-markdown-pages": "^0.3.0",
"typescript": "^3.6.3"
}
}
diff --git a/scripts/gen-docs-index.sh b/scripts/gen-docs-index.sh
deleted file mode 100755
index 6c643e2..0000000
--- a/scripts/gen-docs-index.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-PKG_VERSION=$1
-
-echo ";" > docs/index.html
\ No newline at end of file
diff --git a/scripts/gen-docs.sh b/scripts/gen-docs.sh
new file mode 100755
index 0000000..7786187
--- /dev/null
+++ b/scripts/gen-docs.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+PKG_VERSION=$1
+
+mkdir pageDocs && ln -sf ../eslint-plugin/README.md pageDocs/EslintPlugin.md
+
+yarn run typedoc --out "docs/${PKG_VERSION}"
+
+echo ";" > docs/index.html
+
+rm -rf pageDocs
\ No newline at end of file
diff --git a/tsconfig.json b/tsconfig.json
index cdbdbeb..fce9ac4 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -12,6 +12,8 @@
},
"typedocOptions": {
"exclude": "src/__tests__/**/*",
- "out": "docs"
+ "out": "docs",
+ "mdPagesSourcePath": "pageDocs",
+ "theme": "markdown-pages"
}
}
diff --git a/yarn.lock b/yarn.lock
index 864863f..9bac222 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -459,7 +459,7 @@
rimraf "^2.5.2"
"@react-hook-utilities/eslint-plugin@./eslint-plugin":
- version "1.0.0"
+ version "0.1.0"
"@testing-library/react-hooks@^2.0.1":
version "2.0.1"
@@ -4766,6 +4766,11 @@ typedoc-default-themes@^0.6.0:
lunr "^2.3.6"
underscore "^1.9.1"
+typedoc-plugin-markdown-pages@^0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown-pages/-/typedoc-plugin-markdown-pages-0.3.0.tgz#17f0f9ff3aa312e9ed142eb15ea216ea95d5fb5f"
+ integrity sha512-QVWs6eL0BEOiRgJm6wRRgE8kESFv85HlefLv14ZbMM2VQ1HqErVeT9ukbhkYMznsD/juAsX3Xc5M+Ju7/ZDq4Q==
+
typedoc@^0.15.0:
version "0.15.0"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.15.0.tgz#21eaf4db41cf2797bad027a74f2a75cd08ae0c2d"