-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
105 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release Addon | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'packages/valaxy-addon-*/package.json' | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: true | ||
|
||
# after pnpm | ||
- name: Use Node.js LTS | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
registry-url: https://registry.npmjs.org/ | ||
cache: pnpm | ||
|
||
- name: Publish Addon | ||
run: | | ||
# Extract addon name from the commit message | ||
COMMIT_MSG=${{ github.event.head_commit.message }} | ||
if [[ $COMMIT_MSG == release(addon-*):* ]]; then | ||
ADDON_NAME=$(echo $COMMIT_MSG | cut -d'(' -f2 | cut -d')' -f1) | ||
# Change to the addon directory | ||
cd packages/valaxy-$ADDON_NAME | ||
# Publish the package | ||
npm publish | ||
fi | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
NPM_CONFIG_PROVENANCE: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# valaxy-addon-lightgallery | ||
|
||
[![NPM version](https://img.shields.io/npm/v/valaxy-addon-lightgallery?color=0078E7)](https://www.npmjs.com/package/valaxy-addon-lightgallery) | ||
|
||
- [English](./README.md) | **简体中文** | ||
|
||
valaxy-addon-lightgallery 基于 [lightgallery](https://github.com/sachinchoolur/lightGallery) 提供画廊预览效果。 | ||
|
||
## 如何使用 | ||
|
||
### 安装依赖 | ||
|
||
```bash | ||
npm i valaxy-addon-lightgallery | ||
``` | ||
|
||
### 加载插件 | ||
|
||
```ts | ||
import { defineValaxyConfig } from 'valaxy' | ||
import { addonLightGallery } from 'valaxy-addon-lightgallery' | ||
|
||
export default defineValaxyConfig({ | ||
addons: [ | ||
addonLightGallery(), | ||
], | ||
}) | ||
``` | ||
|
||
### 在文章中直接使用 | ||
|
||
直接在 Markdown 中插入组件即可。 | ||
|
||
```md | ||
--- | ||
photos: | ||
- caption: 我 | ||
src: https://cdn.jsdelivr.net/gh/YunYouJun/yun/images/meme/yun-good-alpha-compressed.png | ||
desc: 我想起那天夕阳下的奔跑 | ||
--- | ||
<!-- 相册样式 --> | ||
<VAGallery :photos="frontmatter.photos" /> | ||
|
||
<!-- 你也可以单独使用照片的样式 --> | ||
<VAPhoto :photo="frontmatter.photos[0]" /> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e1f1525
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://yun.valaxy.site as production
🚀 Deployed on https://66e73247ef4f4a3d4cf87152--valaxy.netlify.app