44 Commits

Author SHA1 Message Date
小弟调调
49bf21de71 doc: Update README.md 2025-12-04 00:34:25 +08:00
小弟调调
15723a08c9 feat: support math formula rendering. #58 2025-08-03 22:17:27 +08:00
小弟调调
4fd4f3644d doc: Update README.md 2025-05-28 03:25:41 +08:00
小弟调调
7969fb28a4 released v2.4.1 2025-05-28 02:45:11 +08:00
小弟调调
1955ec9cbd feat: add Apple Silicon (arm64) support for Docker image. #57 2025-05-28 02:11:37 +08:00
小弟调调
54e4188eb0 feat: add Apple Silicon (arm64) support for Docker image. #57 2025-05-28 02:02:03 +08:00
小弟调调
6fe79146d3 feat: add Apple Silicon (arm64) support for Docker image. #57 2025-05-28 01:56:26 +08:00
小弟调调
e7b52e0ebe feat: add Apple Silicon (arm64) support for Docker image. #57 2025-05-28 01:49:14 +08:00
jaywcjlove
8991adcd15 ci: update workflows config. 2024-08-05 00:58:24 +08:00
jaywcjlove
1b2e3b534d released v2.4.0 2024-08-05 00:56:10 +08:00
jaywcjlove
d85368cb4f type: fix type error. 2024-08-05 00:44:13 +08:00
jaywcjlove
8b4194f5ae ci: update workflows config. 2024-08-05 00:03:05 +08:00
renovate[bot]
ab3423a697 fix(deps): update dependency rehype-prism-plus to v2 (#47)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 00:02:54 +08:00
renovate[bot]
504259b862 fix(deps): update remark (#48)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 00:02:27 +08:00
renovate[bot]
b05d90e15b fix(deps): update dependency rehype-stringify to v10 (#31)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 00:00:33 +08:00
renovate[bot]
f6e71388f1 fix(deps): update dependency rehype-ignore to v2 (#46)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-05 00:00:14 +08:00
renovate[bot]
1c9a7a8668 fix(deps): update dependency rehype-raw to v7 (#30)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-04 23:59:33 +08:00
renovate[bot]
314f47f8af fix(deps): update dependency rehype-attr to v3 (#36)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-04 23:59:14 +08:00
renovate[bot]
be06f694a5 fix(deps): update dependency unified to v11 (#29)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-04 23:58:31 +08:00
renovate[bot]
c23ada95ff chore(deps): update dependency tsbb to ~4.4.0 (#45)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-04 23:37:41 +08:00
renovate[bot]
2632cb1938 fix(deps): update dependency @uiw/react-markdown-editor to v6 (#43)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-04 23:36:07 +08:00
jaywcjlove
77616468a4 fix: fix copy issue. #44 2024-08-04 23:34:33 +08:00
jaywcjlove
41eb86cd2b ci: update workflows config. 2024-06-29 22:20:31 +08:00
jaywcjlove
5fe5ddfa61 ci: update workflow config. 2024-04-03 16:34:12 +08:00
renovate[bot]
82cc2a3df4 chore(deps): update lerna monorepo to v8 (#40)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-03 16:26:12 +08:00
renovate[bot]
b5596d76b6 fix(deps): update dependency styled-components to ~6.1.0 (#39)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-03 16:25:25 +08:00
renovate[bot]
d2c2746420 chore(deps): update dependency tsbb to ~4.2.0 (#34)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-03 16:17:38 +08:00
jaywcjlove
ef1ed54be7 chore: add sponsor badge. 2023-11-25 21:04:59 +08:00
jaywcjlove
e3a3cf5ff6 chore: update .github/workflows/ci.yml 2023-08-25 11:51:58 +08:00
jaywcjlove
4f4ad71d09 chore: update .github/workflows/ci.yml 2023-08-25 11:29:03 +08:00
jaywcjlove
3b32e76f65 style: modify theme style. 2023-08-25 11:28:47 +08:00
jaywcjlove
056b792519 chore: update .github/workflows/ci.yml 2023-08-25 11:14:20 +08:00
jaywcjlove
de98442b3c chore: update workflows config. 2023-08-25 00:03:40 +08:00
jaywcjlove
8bf24877bf fix: Fix {name} does not correspond to supportd language and throw an error. 2023-08-22 17:44:56 +08:00
jaywcjlove
ad546bfb6c chore(deps): update dependencies. 2023-08-22 17:42:24 +08:00
renovate[bot]
bac929d894 chore(deps): update dependency tsbb to ~4.1.0 (#20)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-04 15:58:05 +08:00
jaywcjlove
ab1c043931 chore(deps): update dependency tsbb to v4 #20
https://github.com/jaywcjlove/tsbb/issues/439
2023-03-30 21:51:54 +08:00
jaywcjlove
5afb09a715 style: modify underscore themes. 2022-10-24 23:00:59 +08:00
jaywcjlove
df79dcf694 chore(deps): Update @uiw/react-markdown-editor dependency to ^5.10.0 2022-09-22 14:15:54 +08:00
jaywcjlove
33a60420a4 released v2.3.3 2022-09-17 11:32:18 +08:00
jaywcjlove
c7dba6d5de website: update commamnd style. 2022-09-17 11:31:43 +08:00
jaywcjlove
ed596a7403 chore: update workflows config. 2022-09-13 12:40:35 +08:00
jaywcjlove
7f28e6ada1 released v2.3.2 2022-09-13 11:29:17 +08:00
renovate[bot]
df10f96a65 chore(deps): update dependency electron to v20 (#8) 2022-09-13 11:01:04 +08:00
20 changed files with 213 additions and 125 deletions

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
ko_fi: jaywcjlove
buy_me_a_coffee: jaywcjlove
custom: ["https://www.paypal.me/kennyiseeyou", "https://jaywcjlove.github.io/#/sponsor"]

View File

@@ -6,17 +6,18 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-22.04 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: 16 node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: npm install - run: npm install
- run: npm run build - run: npm run build
- run: npm run doc - run: npm run doc
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: webiste name: webiste
path: | path: |
@@ -40,7 +41,7 @@ jobs:
uses: jaywcjlove/changelog-generator@main uses: jaywcjlove/changelog-generator@main
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v3 uses: peaceiris/actions-gh-pages@v4
with: with:
commit_message: ${{ github.event.head_commit.message }} ${{steps.tag_version.outputs.tag}} commit_message: ${{ github.event.head_commit.message }} ${{steps.tag_version.outputs.tag}}
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -66,8 +67,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build] needs: [build]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: webiste name: webiste
path: website/build path: website/build
@@ -77,54 +78,62 @@ jobs:
- run: echo "outputs.create_tag_versionNumber - ${{ needs.build.outputs.create_tag_versionNumber }}" - run: echo "outputs.create_tag_versionNumber - ${{ needs.build.outputs.create_tag_versionNumber }}"
- run: echo "outputs.tag - ${{ needs.build.outputs.tag }}" - run: echo "outputs.tag - ${{ needs.build.outputs.tag }}"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Create Docker Image # Create Docker Image
- name: Docker login - name: Docker login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }} run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: Build wxmp image # - name: Build wxmp image
# working-directory: website
# run: docker image build -t wxmp .
- name: Build and push multi-platform image
working-directory: website working-directory: website
run: docker image build -t wxmp .
- name: Tags & Push image (latest)
run: | run: |
echo "outputs.tag - ${{ needs.build.outputs.version }}" docker buildx build \
docker tag wxmp ${{ secrets.DOCKER_USER }}/wxmp:latest --platform linux/amd64,linux/arm64 \
docker push ${{ secrets.DOCKER_USER }}/wxmp:latest -t ${{ secrets.DOCKER_USER }}/wxmp:latest \
--push .
- name: Tags & Push image - name: Build and push multi-platform image (with tag)
if: needs.build.outputs.successful if: needs.build.outputs.successful
run: |
echo "outputs.tag - ${{ needs.build.outputs.version }}"
docker tag wxmp ${{ secrets.DOCKER_USER }}/wxmp:${{needs.build.outputs.version}}
docker push ${{ secrets.DOCKER_USER }}/wxmp:${{needs.build.outputs.version}}
# Create Docker Image in GitHub
- name: Login to GitHub registry
run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build docker image
working-directory: website working-directory: website
run: docker build -t ghcr.io/jaywcjlove/wxmp:latest .
- name: Publish to GitHub registry
run: docker push ghcr.io/jaywcjlove/wxmp:latest
- name: Tag docker image (beta) and publish to GitHub registry
if: needs.build.outputs.successful
run: | run: |
echo "version: v${{ needs.build.outputs.version }}" docker buildx build \
docker tag ghcr.io/jaywcjlove/wxmp:latest ghcr.io/jaywcjlove/wxmp:${{needs.build.outputs.version}} --platform linux/amd64,linux/arm64 \
docker push ghcr.io/jaywcjlove/wxmp:${{needs.build.outputs.version}} -t ${{ secrets.DOCKER_USER }}/wxmp:${{ needs.build.outputs.version }} \
--push .
# # Create Docker Image in GitHub
# - name: Login to GitHub registry
# run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# - name: Build docker image
# working-directory: website
# run: docker build -t ghcr.io/jaywcjlove/wxmp:latest .
# - name: Publish to GitHub registry
# run: docker push ghcr.io/jaywcjlove/wxmp:latest
# - name: Tag docker image (beta) and publish to GitHub registry
# if: needs.build.outputs.successful
# run: |
# echo "version: v${{ needs.build.outputs.version }}"
# docker tag ghcr.io/jaywcjlove/wxmp:latest ghcr.io/jaywcjlove/wxmp:${{needs.build.outputs.version}}
# docker push ghcr.io/jaywcjlove/wxmp:${{needs.build.outputs.version}}
build_windows: build_windows:
needs: [build] needs: [build]
runs-on: windows-latest runs-on: windows-latest
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: 16 node-version: 20
- name: Install - name: Install
run: npm install --build-from-source run: npm install --build-from-source
@@ -133,7 +142,7 @@ jobs:
- run: npm run build - run: npm run build
# - run: npm run electron # - run: npm run electron
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: webiste name: webiste
path: website/build path: website/build
@@ -143,8 +152,11 @@ jobs:
run: npm run deps run: npm run deps
- run: npm run build:app - run: npm run build:app
- working-directory: electron/app/dist
run: ls -R
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: needs.build.outputs.successful == 'true'
with: with:
name: wxmp-windows name: wxmp-windows
path: | path: |
@@ -155,16 +167,16 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: 16 node-version: 20
- run: npm install - run: npm install
- run: npm run hoist - run: npm run hoist
- run: npm run build - run: npm run build
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: webiste name: webiste
path: website/build path: website/build
@@ -174,8 +186,11 @@ jobs:
run: npm run deps run: npm run deps
- run: npm run build:app - run: npm run build:app
- working-directory: electron/app/dist
run: ls -R
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: needs.build.outputs.successful == 'true'
with: with:
name: wxmp-macos name: wxmp-macos
path: | path: |
@@ -186,16 +201,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 45 timeout-minutes: 45
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: 16 node-version: 20
- run: npm install - run: npm install
- run: npm run hoist - run: npm run hoist
- run: npm run build - run: npm run build
# - run: npm run electron # - run: npm run electron
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: webiste name: webiste
path: website/build path: website/build
@@ -205,8 +220,11 @@ jobs:
run: npm run deps run: npm run deps
- run: npm run build:app - run: npm run build:app
- working-directory: electron/app/dist
run: ls -R
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
if: needs.build.outputs.successful == 'true'
with: with:
name: wxmp-linux name: wxmp-linux
path: | path: |
@@ -216,26 +234,26 @@ jobs:
create_release: create_release:
needs: [build, build_windows, build_macos, build_linux] needs: [build, build_windows, build_macos, build_linux]
if: needs.build.outputs.successful if: needs.build.outputs.successful == 'true'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 45 timeout-minutes: 45
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v4
with: with:
node-version: 16 node-version: 20
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: wxmp-linux name: wxmp-linux
path: dist/linux path: dist/linux
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: wxmp-macos name: wxmp-macos
path: dist/macos path: dist/macos
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v4
with: with:
name: wxmp-windows name: wxmp-windows
path: dist/windows path: dist/windows
@@ -254,8 +272,9 @@ jobs:
- name: Create Release - name: Create Release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
if: needs.build.outputs.successful if: needs.build.outputs.successful == 'true'
with: with:
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.changelog.outputs.tag }} name: ${{ steps.changelog.outputs.tag }}
tag: ${{ steps.changelog.outputs.tag }} tag: ${{ steps.changelog.outputs.tag }}
@@ -288,17 +307,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 4 timeout-minutes: 4
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.head_ref }}
- run: echo "outputs.version - ${{ needs.build.outputs.create_tag_version }}" - run: echo "outputs.version - ${{ needs.build.outputs.create_tag_version }}"
- uses: dev-drprasad/delete-tag-and-release@v0.2.0 - uses: dev-drprasad/delete-tag-and-release@v1.1
if: needs.build.outputs.successful if: needs.build.outputs.successful == 'true'
with: with:
delete_release: true delete_release: true
repo: jaywcjlove/wxmp repo: jaywcjlove/wxmp
tag_name: '${{ needs.build.outputs.create_tag_version }}' tag_name: '${{ needs.build.outputs.create_tag_version }}'
env: github_token: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,7 +1,49 @@
<div markdown="1">
<sup>使用<a href="https://wangchujiang.com/#/app" target="_blank">我的应用</a>也是一种<a href="https://wangchujiang.com/#/sponsor" target="_blank">支持</a>我的方式:</sup>
<br>
<a target="_blank" href="https://apps.apple.com/app/Deskmark/6755948110" title="Deskmark for macOS"><img alt="Deskmark" height="52" width="52" src="https://wangchujiang.com/appicon/deskmark.png"></a>
<a target="_blank" href="https://apps.apple.com/app/Keyzer/6500434773" title="Keyzer for macOS"><img alt="Keyzer" height="52" width="52" src="https://wangchujiang.com/appicon/keyzer.png"></a>
<a target="_blank" href="https://github.com/jaywcjlove/vidwall-hub" title="Vidwall Hub for macOS"><img alt="Vidwall Hub" height="52" width="52" src="https://wangchujiang.com/appicon/vidwall-hub.png"></a>
<a target="_blank" href="https://apps.apple.com/app/VidCrop/6752624705" title="VidCrop for macOS"><img alt="VidCrop" height="52" width="52" src="https://wangchujiang.com/appicon/vidcrop.png"></a>
<a target="_blank" href="https://apps.apple.com/app/Vidwall/6747587746" title="Vidwall for macOS"><img alt="Vidwall" height="52" width="52" src="https://wangchujiang.com/appicon/vidwall.png"></a>
<a target="_blank" href="https://wangchujiang.com/mousio-hint/" title="Mousio Hint for macOS"><img alt="Mousio Hint" height="52" width="52" src="https://wangchujiang.com/appicon/mousio-hint.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6746747327" title="Mousio for macOS"><img alt="Mousio" height="52" width="52" src="https://wangchujiang.com/appicon/mousio.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6745227444" title="Musicer for macOS"><img alt="Musicer" height="52" width="52" src="https://wangchujiang.com/appicon/musicer.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6743841447" title="Audioer for macOS"><img alt="Audioer" height="52" width="52" src="https://wangchujiang.com/appicon/audioer.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6744690194" title="FileSentinel for macOS"><img alt="FileSentinel" height="52" width="52" src="https://wangchujiang.com/appicon/file-sentinel.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6743495172" title="FocusCursor for macOS"><img alt="FocusCursor" height="52" width="52" src="https://wangchujiang.com/appicon/focus-cursor.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6742680573" title="Videoer for macOS"><img alt="Videoer" height="52" width="52" src="https://wangchujiang.com/appicon/videoer.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6740425504" title="KeyClicker for macOS"><img alt="KeyClicker" height="52" width="52" src="https://wangchujiang.com/appicon/key-clicker.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6739052447" title="DayBar for macOS"><img alt="DayBar" height="52" width="52" src="https://wangchujiang.com/appicon/daybar.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6739444407" title="Iconed for macOS"><img alt="Iconed" height="52" width="52" src="https://wangchujiang.com/appicon/iconed.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6737160756" title="Mousio for macOS"><img alt="Mousio" height="52" width="52" src="https://wangchujiang.com/appicon/rightmenu-master.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6723903021" title="Paste Quick for macOS"><img alt="Quick RSS" height="52" width="52" src="https://wangchujiang.com/appicon/paste-quick.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6670696072" title="Quick RSS for macOS/iOS"><img alt="Quick RSS" height="52" width="52" src="https://wangchujiang.com/appicon/quick-rss.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6670167443" title="Web Serve for macOS"><img alt="Web Serve" height="52" width="52" src="https://wangchujiang.com/appicon/web-serve.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6503953628" title="Copybook Generator for macOS/iOS"><img alt="Copybook Generator" height="52" width="52" src="https://wangchujiang.com/appicon/copybook-generator.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6471227008" title="DevTutor for macOS/iOS"><img alt="DevTutor for SwiftUI" height="52" width="52" src="https://wangchujiang.com/appicon/devtutor.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6479819388" title="RegexMate for macOS/iOS"><img alt="RegexMate" height="52" width="52" src="https://wangchujiang.com/appicon/regex-mate.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6479194014" title="Time Passage for macOS/iOS"><img alt="Time Passage" height="52" width="52" src="https://wangchujiang.com/appicon/time-passage.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6478772538" title="IconizeFolder for macOS"><img alt="Iconize Folder" height="52" width="52" src="https://wangchujiang.com/appicon/iconize-folder.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6478511402" title="Textsound Saver for macOS/iOS"><img alt="Textsound Saver" height="52" width="52" src="https://wangchujiang.com/appicon/textsound-saver.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6476924627" title="Create Custom Symbols for macOS"><img alt="Create Custom Symbols" height="52" width="52" src="https://wangchujiang.com/appicon/create-custom-symbols.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6476452351" title="DevHub for macOS"><img alt="DevHub" height="52" width="52" src="https://wangchujiang.com/appicon/devhub.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6476400184" title="Resume Revise for macOS"><img alt="Resume Revise" height="52" width="52" src="https://wangchujiang.com/appicon/resume-revise.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6472593276" title="Palette Genius for macOS"><img alt="Palette Genius" height="52" width="52" src="https://wangchujiang.com/appicon/palette-genius.png"></a>
<a target="_blank" href="https://apps.apple.com/app/6470879005" title="Symbol Scribe for macOS"><img alt="Symbol Scribe" height="52" width="52" src="https://wangchujiang.com/appicon/symbol-scribe.png"></a>
</div>
<hr>
<div align="center"> <div align="center">
<h1 align="center">微信公众号 Markdown 编辑器</h1> <h1 align="center">微信公众号 Markdown 编辑器</h1>
</div> </div>
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor)
[![CI](https://github.com/jaywcjlove/wxmp/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/wxmp/actions/workflows/ci.yml)
[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/wxmp?logo=docker)](https://hub.docker.com/r/wcjiang/wxmp)
[![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/wxmp?logo=docker)](https://hub.docker.com/r/wcjiang/wxmp)
[![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/wxmp?logo=docker)](https://hub.docker.com/r/wcjiang/wxmp)
[![微信公众号 Markdown 编辑器](https://user-images.githubusercontent.com/1680273/188264183-a6b8cb6a-92e1-4a73-afc5-4f0234b26ed3.png)](https://jaywcjlove.github.io/wxmp) [![微信公众号 Markdown 编辑器](https://user-images.githubusercontent.com/1680273/188264183-a6b8cb6a-92e1-4a73-afc5-4f0234b26ed3.png)](https://jaywcjlove.github.io/wxmp)
微信公众号文章 Markdown 在线编辑器,使用 markdown 语法创建一篇简介美观大方的微信公众号图文。由于发版本麻烦,和一些功能无法扩展停滞开发了,未来不再开发 Chrome 的插件(暂存在 chrome 分支),通过 web 版本定制更丰富的功能。 微信公众号文章 Markdown 在线编辑器,使用 markdown 语法创建一篇简介美观大方的微信公众号图文。由于发版本麻烦,和一些功能无法扩展停滞开发了,未来不再开发 Chrome 的插件(暂存在 chrome 分支),通过 web 版本定制更丰富的功能。
@@ -23,6 +65,14 @@
- [x] CI 自动生成 Electron 桌面应用。 - [x] CI 自动生成 Electron 桌面应用。
- [ ] ~~支持全局字号大小选择。~~ - [ ] ~~支持全局字号大小选择。~~
### 数学公式
$\\c = \pm\sqrt{a^2 + b^2}$ 和 $C_L$ 数学公式行内显示
```math
L = \frac{1}{2} \rho v^2 S C_L
```
### 支持代码块样式 ### 支持代码块样式
下面是 `jsx` 代码块展示示例,并高亮代码,用于 web 应用中效果展示。 下面是 `jsx` 代码块展示示例,并高亮代码,用于 web 应用中效果展示。

View File

@@ -2,7 +2,7 @@
"name": "wxmp", "name": "wxmp",
"description": "微信公众号 Markdown 编辑器", "description": "微信公众号 Markdown 编辑器",
"homepage": "https://github.com/jaywcjlove/wxmp.git", "homepage": "https://github.com/jaywcjlove/wxmp.git",
"version": "2.3.1", "version": "2.4.1",
"main": "main.js", "main": "main.js",
"author": "Kenny Wong <398188662@qq.com>", "author": "Kenny Wong <398188662@qq.com>",
"private": true, "private": true,
@@ -18,13 +18,13 @@
"build": "npm run copy && cross-env NODE_ENV=production electron-builder build --publish=never --config config.json" "build": "npm run copy && cross-env NODE_ENV=production electron-builder build --publish=never --config config.json"
}, },
"dependencies": { "dependencies": {
"@wcj/wxmp-main": "2.3.1" "@wcj/wxmp-main": "2.4.1"
}, },
"devDependencies": { "devDependencies": {
"@wcj/wxmp-preload": "2.3.1", "@wcj/wxmp-preload": "2.4.1",
"cpy-cli": "4.2.0", "cpy-cli": "^5.0.0",
"electron": "19.0.5", "electron": "20.1.3",
"electron-builder": "23.3.3", "electron-builder": "23.3.3",
"website": "2.3.1" "website": "2.4.1"
} }
} }

View File

@@ -1,16 +1,16 @@
{ {
"name": "@wcj/wxmp-main", "name": "@wcj/wxmp-main",
"version": "2.3.1", "version": "2.4.1",
"main": "./lib/index.js", "main": "./lib/index.js",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "tsbb build --disable-babel --file-names src/index.ts", "build": "tsbb build",
"watch": "tsbb watch --disable-babel --file-names src/index.ts" "watch": "tsbb watch"
}, },
"files": [ "files": [
"lib" "lib"
], ],
"devDependencies": { "devDependencies": {
"electron": "19.0.5" "electron": "20.1.3"
} }
} }

View File

@@ -1,16 +1,16 @@
{ {
"name": "@wcj/wxmp-preload", "name": "@wcj/wxmp-preload",
"version": "2.3.1", "version": "2.4.1",
"main": "./lib/index.js", "main": "./lib/index.js",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "tsbb build --disable-babel --file-names src/index.ts", "build": "tsbb build",
"watch": "tsbb watch --disable-babel --file-names src/index.ts" "watch": "tsbb watch"
}, },
"files": [ "files": [
"lib" "lib"
], ],
"devDependencies": { "devDependencies": {
"electron": "19.0.5" "electron": "20.1.3"
} }
} }

View File

@@ -1,4 +1,4 @@
{ {
"version": "2.3.1", "version": "2.4.1",
"packages": ["website", "electron/*"] "packages": ["website", "electron/*"]
} }

View File

@@ -9,18 +9,19 @@
"version": "lerna version --exact --force-publish --no-push --no-git-tag-version", "version": "lerna version --exact --force-publish --no-push --no-git-tag-version",
"prepare": "husky install", "prepare": "husky install",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'", "prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"pretty-quick": "pretty-quick --staged",
"hoist": "lerna bootstrap --hoist", "hoist": "lerna bootstrap --hoist",
"clean": "lerna clean --yes" "clean": "lerna clean --yes"
}, },
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@lerna/legacy-package-management": "^8.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"husky": "^8.0.1", "husky": "^8.0.1",
"lerna": "5.5.1", "lerna": "^8.0.0",
"prettier": "^2.7.1", "prettier": "^3.0.2",
"pretty-quick": "~3.1.3", "react": "~18.2.0",
"tsbb": "^3.7.5" "react-dom": "~18.2.0",
"tsbb": "~4.4.0"
}, },
"workspaces": { "workspaces": {
"packages": [ "packages": [

View File

@@ -20,6 +20,8 @@ export default (conf: Configuration, env: 'development' | 'production', options:
}), }),
); );
/** https://github.com/kktjs/kkt/issues/446 */
conf.ignoreWarnings = [{ module: /node_modules[\\/]parse5[\\/]/ }];
conf.module!.exprContextCritical = false; conf.module!.exprContextCritical = false;
if (env === 'production') { if (env === 'production') {
conf.output = { ...conf.output, publicPath: './' }; conf.output = { ...conf.output, publicPath: './' };

View File

@@ -1,6 +1,6 @@
{ {
"name": "website", "name": "website",
"version": "2.3.1", "version": "2.4.1",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "kkt start", "start": "kkt start",
@@ -25,33 +25,33 @@
"@uiw/codemirror-theme-xcode": "^4.11.6", "@uiw/codemirror-theme-xcode": "^4.11.6",
"@uiw/react-back-to-top": "^1.2.0", "@uiw/react-back-to-top": "^1.2.0",
"@uiw/react-github-corners": "^1.5.15", "@uiw/react-github-corners": "^1.5.15",
"@uiw/react-markdown-editor": "^5.7.0", "@uiw/react-markdown-editor": "^6.0.0",
"@wcj/dark-mode": "^1.0.15", "@wcj/dark-mode": "^1.0.15",
"css-tree": "^2.2.1", "css-tree": "^2.2.1",
"react": "^18.2.0", "react": "~18.2.0",
"react-code-preview-layout": "^2.0.4", "react-dom": "~18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.3.0", "react-hot-toast": "^2.3.0",
"react-router-dom": "^6.3.0", "react-router-dom": "^6.3.0",
"rehype-attr": "^2.0.8", "rehype-attr": "^3.0.0",
"rehype-ignore": "^1.0.1", "rehype-ignore": "^2.0.0",
"rehype-prism-plus": "^1.5.0", "rehype-katex": "^7.0.1",
"rehype-raw": "^6.1.1", "rehype-prism-plus": "^2.0.0",
"rehype-stringify": "^9.0.3", "rehype-raw": "^7.0.0",
"remark-gfm": "^3.0.1", "rehype-stringify": "^10.0.0",
"remark-parse": "^10.0.1", "remark-gfm": "^4.0.0",
"remark-rehype": "^10.1.0", "remark-math": "^6.0.0",
"styled-components": "^5.3.5", "remark-parse": "^11.0.0",
"unified": "^10.1.2" "remark-rehype": "^11.0.0",
"styled-components": "~6.1.0",
"unified": "^11.0.0"
}, },
"devDependencies": { "devDependencies": {
"@kkt/less-modules": "^7.2.0", "@kkt/less-modules": "^7.2.0",
"@kkt/raw-modules": "^7.2.0", "@kkt/raw-modules": "^7.2.0",
"@kkt/scope-plugin-options": "^7.2.0", "@kkt/scope-plugin-options": "^7.2.0",
"@types/css-tree": "^1.0.7", "@types/css-tree": "^2.3.1",
"@types/react": "^18.0.17", "@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6", "@types/react-dom": "^18.0.6",
"@types/styled-components": "^5.1.25",
"kkt": "^7.2.0", "kkt": "^7.2.0",
"markdown-react-code-preview-loader": "^2.1.2" "markdown-react-code-preview-loader": "^2.1.2"
}, },

View File

@@ -13,16 +13,22 @@ const Button = styled.button`
const CopyView: React.FC<{ command: ICommand; editorProps: IMarkdownEditor & ToolBarProps }> = (props) => { const CopyView: React.FC<{ command: ICommand; editorProps: IMarkdownEditor & ToolBarProps }> = (props) => {
const { editorProps } = props; const { editorProps } = props;
const handleClick = () => { const handleClick = () => {
const dom = editorProps.preview.current; const dom: HTMLDivElement | null = editorProps.preview.current;
dom?.focus(); if (!dom) {
window.getSelection()?.removeAllRanges(); toast.error(<div>dom is null</div>);
let range = document.createRange(); return;
range.setStartBefore(dom?.firstChild!); }
range.setEndAfter(dom?.lastChild!); dom.focus();
window.getSelection()?.addRange(range); const htmlContent = dom.innerHTML;
document.execCommand(`copy`); navigator.clipboard
window.getSelection()?.removeAllRanges(); .writeText(htmlContent)
toast.success(<div></div>); .then(() => {
toast.success(<div></div>);
})
.catch((err) => {
toast.error(<div>{JSON.stringify(err)}</div>);
console.error('Failed to copy: ', err);
});
}; };
return ( return (
<Button type="button" onClick={handleClick}> <Button type="button" onClick={handleClick}>

View File

@@ -4,7 +4,7 @@ import styled from 'styled-components';
const Link = styled(NavLink)` const Link = styled(NavLink)`
font-size: 0.8rem; font-size: 0.8rem;
line-height: 0.8rem; line-height: 0.7rem;
text-decoration: none; text-decoration: none;
padding: 0.18rem 0.3rem; padding: 0.18rem 0.3rem;
&:hover { &:hover {

View File

@@ -12,7 +12,7 @@ const Select = styled.select`
padding: 0 0.2rem 0 0.2rem; padding: 0 0.2rem 0 0.2rem;
margin: 0; margin: 0;
font-family: inherit; font-family: inherit;
font-size: 0.8rem; font-size: 0.7rem;
outline: none; outline: none;
height: 1.15rem; height: 1.15rem;
cursor: inherit; cursor: inherit;

View File

@@ -1,5 +1,6 @@
import MarkdownEditor, { getCommands } from '@uiw/react-markdown-editor'; import MarkdownEditor, { getCommands } from '@uiw/react-markdown-editor';
import { useContext } from 'react'; import { useContext } from 'react';
// @ts-ignore
import { EditorView } from '@codemirror/view'; import { EditorView } from '@codemirror/view';
import { Preview } from './Preview'; import { Preview } from './Preview';
import { copy } from '../../commands/copy'; import { copy } from '../../commands/copy';

View File

@@ -5,7 +5,7 @@ a {
h1 { h1 {
color: inherit; color: inherit;
font-size: 16px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
@@ -32,7 +32,7 @@ h4 {
p { p {
color: initial; color: initial;
font-size: 14px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
} }

View File

@@ -11,7 +11,7 @@ h1 {
line-height: 1.75; line-height: 1.75;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 16px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin: 2em auto 1em; margin: 2em auto 1em;
padding: 0 1em; padding: 0 1em;
@@ -63,7 +63,7 @@ li {
} }
p { p {
font-size: 14px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
padding: 0.5em 0 !important; padding: 0.5em 0 !important;
margin-bottom: 0 !important; margin-bottom: 0 !important;

View File

@@ -11,7 +11,7 @@ h1 {
line-height: 1.75; line-height: 1.75;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 16px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin: 2em auto 1em; margin: 2em auto 1em;
padding: 0 1em; padding: 0 1em;
@@ -63,7 +63,7 @@ li {
} }
p { p {
font-size: 14px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
padding: 0.5em 0 !important; padding: 0.5em 0 !important;
margin-bottom: 0 !important; margin-bottom: 0 !important;

View File

@@ -11,7 +11,7 @@ h1 {
line-height: 1.15; line-height: 1.15;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 16px; font-size: 18px;
font-weight: bold; font-weight: bold;
margin: 2em auto 1em; margin: 2em auto 1em;
padding: 0 1em 0.3em 1em; padding: 0 1em 0.3em 1em;
@@ -37,7 +37,7 @@ h3 {
line-height: 1.2; line-height: 1.2;
font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', font-family: -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB',
'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif; 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;
font-size: 1.1em; font-size: 14px;
font-weight: bold; font-weight: bold;
margin: 2em 8px 0.75em 0; margin: 2em 8px 0.75em 0;
padding-left: 8px; padding-left: 8px;
@@ -59,7 +59,7 @@ li {
} }
p { p {
font-size: 14px; font-size: 16px;
line-height: 1.5em; line-height: 1.5em;
padding: 0.5em 0 !important; padding: 0.5em 0 !important;
margin-bottom: 0 !important; margin-bottom: 0 !important;

View File

@@ -129,7 +129,7 @@ export const footnotesLabel = (node: Element) => {
]; ];
}; };
export const imagesStyle = (node: Element, parent: Root | Element | null) => { export const imagesStyle = (node: Element, parent: Root | Element | undefined) => {
if ( if (
parent?.type === 'element' && parent?.type === 'element' &&
/(p|a)/.test(parent.tagName) && /(p|a)/.test(parent.tagName) &&

View File

@@ -5,7 +5,10 @@ import { Element } from 'hast';
import remarkParse from 'remark-parse'; import remarkParse from 'remark-parse';
import remarkGfm from 'remark-gfm'; import remarkGfm from 'remark-gfm';
import remarkRehype from 'remark-rehype'; import remarkRehype from 'remark-rehype';
import remarkMath from 'remark-math';
import rehypePrism from 'rehype-prism-plus'; import rehypePrism from 'rehype-prism-plus';
import rehypeKatex from 'rehype-katex';
import 'katex/dist/katex.min.css'; // Ensure KaTeX styles are included
import rehypeRaw from 'rehype-raw'; import rehypeRaw from 'rehype-raw';
import rehypeAttrs from 'rehype-attr'; import rehypeAttrs from 'rehype-attr';
import rehypeIgnore from 'rehype-ignore'; import rehypeIgnore from 'rehype-ignore';
@@ -26,19 +29,23 @@ export function markdownToHTML(md: string, css: string, opts: MarkdownToHTMLOpti
parseCustomProperty: false, parseCustomProperty: false,
positions: false, positions: false,
}); });
// @ts-ignore // @ts-ignore
const data = cssdata(ast.children.head, {}, { color: opts.preColor, theme: opts.previewTheme }); const data = cssdata(ast.children.head, {}, { color: opts.preColor, theme: opts.previewTheme });
const processor = unified() const processor = unified()
.use(remarkParse) .use(remarkParse)
.use(remarkGfm) .use(remarkGfm)
.use(remarkMath)
.use(remarkRehype, { allowDangerousHtml: true }) .use(remarkRehype, { allowDangerousHtml: true })
.use(rehypePrism)
.use(rehypeRaw) .use(rehypeRaw)
.use(rehypeKatex)
.use(rehypePrism, {
ignoreMissing: true,
})
.use(rehypeIgnore, {}) .use(rehypeIgnore, {})
.use(rehypeAttrs, { properties: 'attr' }) .use(rehypeAttrs, { properties: 'attr' })
.use(rehypeRewrite, { .use(rehypeRewrite, {
rewrite: (node, _index, parent) => { rewrite: (node, _index, parent) => {
// @ts-ignore
if ( if (
node?.type === 'element' && node?.type === 'element' &&
node?.tagName === 'code' && node?.tagName === 'code' &&