Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] export all markdown file to docs #30

Merged
merged 5 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ReadMe-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,11 @@ https://github.com/EasyWebApp/DOM-Renderer?tab=readme-ov-file#nodejs--bun
- [x] [服务器端渲染][51]
- [x] [异步组件加载][52]

## [v2 到 v3 迁移][53]
## [v2 到 v3 迁移](./Migrating.md)

## 更多指南

1. [开发贡献][54]
1. [开发贡献](./Contributing.md)

[1]: https://www.webcomponents.org/
[2]: https://facebook.github.io/jsx/
Expand Down Expand Up @@ -601,5 +601,3 @@ https://github.com/EasyWebApp/DOM-Renderer?tab=readme-ov-file#nodejs--bun
[50]: https://github.com/EasyWebApp/Parcel-transformer-MDX
[51]: https://developer.chrome.com/docs/css-ui/declarative-shadow-dom?hl=zh-cn
[52]: https://legacy.reactjs.org/docs/react-api.html#reactlazy
[53]: https://github.com/EasyWebApp/WebCell/blob/main/Migrating.md
[54]: https://github.com/EasyWebApp/WebCell/blob/main/Contributing.md
6 changes: 2 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,11 @@ We recommend these libraries to use with WebCell:
- [x] [Server-side Render][51]
- [x] [Async Component loading][52]

## [v2 to v3 migration][53]
## [v2 to v3 migration](./Migrating.md)

## More guides

1. [Development contribution][54]
1. [Development contribution](./Contributing.md)

[1]: https://www.webcomponents.org/
[2]: https://facebook.github.io/jsx/
Expand Down Expand Up @@ -604,5 +604,3 @@ We recommend these libraries to use with WebCell:
[50]: https://github.com/EasyWebApp/Parcel-transformer-MDX
[51]: https://developer.chrome.com/docs/css-ui/declarative-shadow-dom
[52]: https://legacy.reactjs.org/docs/react-api.html#reactlazy
[53]: https://github.com/EasyWebApp/WebCell/blob/main/Migrating.md
[54]: https://github.com/EasyWebApp/WebCell/blob/main/Contributing.md
24 changes: 19 additions & 5 deletions pack-docs.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
mkdir dist/
cp *.md dist/
cd dist/
# remove markdown suffix, because typedoc will copy markdown file to media folder
wangrunlin marked this conversation as resolved.
Show resolved Hide resolved
replace ".md\)" ")" *.md

# generate multilingual file
for file in ReadMe-*.md; do
for file in *.md; do
typedoc --readme $file

mv docs/index.html ${file%.md}.html
mv docs/index.html ./${file%.md}.html
done

cd ../
# generate docs
typedoc source/

# copy html file to docs folder, replace link
mv dist/*.html docs/
rm -r dist/docs dist/*.md

cd docs
# default language
mv ReadMe.html index.html

# replace ReadMe-*.md to *.html, change url in *.html
wangrunlin marked this conversation as resolved.
Show resolved Hide resolved
for file in ReadMe-*.html; do
# example: mv ReadMe-zh.html docs/zh.html
mv $file docs/"${file#ReadMe-}"
mv $file "${file#ReadMe-}"

# example: replace ReadMe-zh.md zh.html
replace "./${file%.html}.md" "./${file#ReadMe-}" docs/*.html
replace "./${file%.html}" "./${file#ReadMe-}" *.html
done