jointrashposs/content/id/docs/4.for-developers/publish-on-your-website.md
かっこかり 65029555ca
New Crowdin updates (#132)
* New translations kubernetes.md (English)

* New translations kubernetes.md (Indonesian)

* New translations manual.md (French)

* New translations manual.md (Italian)

* New translations manual.md (Korean)

* New translations manual.md (Polish)

* New translations manual.md (Chinese Simplified)

* New translations manual.md (Chinese Traditional)

* New translations manual.md (English)

* New translations manual.md (Indonesian)

* New translations cdn.md (French)

* New translations cdn.md (Italian)

* New translations cdn.md (Korean)

* New translations cdn.md (Polish)

* New translations cdn.md (Chinese Simplified)

* New translations cdn.md (Chinese Traditional)

* New translations cdn.md (English)

* New translations cdn.md (Indonesian)

* New translations nginx.md (French)

* New translations nginx.md (Italian)

* New translations nginx.md (Korean)

* New translations nginx.md (Polish)

* New translations nginx.md (Chinese Simplified)

* New translations nginx.md (Chinese Traditional)

* New translations nginx.md (English)

* New translations nginx.md (Indonesian)

* New translations push-docker-hub.md (French)

* New translations push-docker-hub.md (Italian)

* New translations push-docker-hub.md (Korean)

* New translations push-docker-hub.md (Polish)

* New translations push-docker-hub.md (Chinese Simplified)

* New translations push-docker-hub.md (Chinese Traditional)

* New translations push-docker-hub.md (English)

* New translations push-docker-hub.md (Indonesian)

* New translations scale-out.md (French)

* New translations scale-out.md (Italian)

* New translations scale-out.md (Korean)

* New translations scale-out.md (Polish)

* New translations scale-out.md (Chinese Simplified)

* New translations scale-out.md (Chinese Traditional)

* New translations scale-out.md (English)

* New translations scale-out.md (Indonesian)

* New translations troubleshooting.md (French)

* New translations troubleshooting.md (Italian)

* New translations troubleshooting.md (Korean)

* New translations troubleshooting.md (Polish)

* New translations troubleshooting.md (Chinese Simplified)

* New translations troubleshooting.md (Chinese Traditional)

* New translations troubleshooting.md (English)

* New translations troubleshooting.md (Indonesian)

* New translations disable-timelines.md (French)

* New translations disable-timelines.md (Italian)

* New translations disable-timelines.md (Korean)

* New translations disable-timelines.md (Polish)

* New translations disable-timelines.md (Chinese Simplified)

* New translations disable-timelines.md (Chinese Traditional)

* New translations disable-timelines.md (English)

* New translations disable-timelines.md (Indonesian)

* New translations 1.index.md (French)

* New translations 1.index.md (Italian)

* New translations 1.index.md (Korean)

* New translations 1.index.md (Polish)

* New translations 1.index.md (Chinese Simplified)

* New translations 1.index.md (Chinese Traditional)

* New translations 1.index.md (English)

* New translations 1.index.md (Indonesian)

* New translations libraries.md (French)

* New translations libraries.md (Italian)

* New translations libraries.md (Korean)

* New translations libraries.md (Polish)

* New translations libraries.md (Chinese Simplified)

* New translations libraries.md (Chinese Traditional)

* New translations libraries.md (English)

* New translations libraries.md (Indonesian)

* New translations permission.md (French)

* New translations permission.md (Italian)

* New translations permission.md (Korean)

* New translations permission.md (Polish)

* New translations permission.md (Chinese Simplified)

* New translations permission.md (Chinese Traditional)

* New translations permission.md (English)

* New translations permission.md (Indonesian)

* New translations 1.index.md (French)

* New translations 1.index.md (Italian)

* New translations 1.index.md (Korean)

* New translations 1.index.md (Polish)

* New translations 1.index.md (Chinese Simplified)

* New translations 1.index.md (Chinese Traditional)

* New translations 1.index.md (English)

* New translations 1.index.md (Indonesian)

* New translations 1.index.md (French)

* New translations 1.index.md (Italian)

* New translations 1.index.md (Korean)

* New translations 1.index.md (Polish)

* New translations 1.index.md (Chinese Simplified)

* New translations 1.index.md (Chinese Traditional)

* New translations 1.index.md (English)

* New translations 1.index.md (Indonesian)

* New translations global-timeline.md (French)

* New translations global-timeline.md (Italian)

* New translations global-timeline.md (Korean)

* New translations global-timeline.md (Polish)

* New translations global-timeline.md (Chinese Simplified)

* New translations global-timeline.md (Chinese Traditional)

* New translations global-timeline.md (English)

* New translations global-timeline.md (Indonesian)

* New translations home-timeline.md (French)

* New translations home-timeline.md (Italian)

* New translations home-timeline.md (Korean)

* New translations home-timeline.md (Polish)

* New translations home-timeline.md (Chinese Simplified)

* New translations home-timeline.md (Chinese Traditional)

* New translations home-timeline.md (English)

* New translations home-timeline.md (Indonesian)

* New translations hybrid-timeline.md (French)

* New translations hybrid-timeline.md (Italian)

* New translations hybrid-timeline.md (Korean)

* New translations hybrid-timeline.md (Polish)

* New translations hybrid-timeline.md (Chinese Simplified)

* New translations hybrid-timeline.md (Chinese Traditional)

* New translations hybrid-timeline.md (English)

* New translations hybrid-timeline.md (Indonesian)

* New translations index.md (French)

* New translations index.md (Italian)

* New translations index.md (Korean)

* New translations index.md (Polish)

* New translations index.md (Chinese Simplified)

* New translations index.md (Chinese Traditional)

* New translations index.md (English)

* New translations index.md (Indonesian)

* New translations local-timeline.md (French)

* New translations local-timeline.md (Italian)

* New translations local-timeline.md (Korean)

* New translations local-timeline.md (Polish)

* New translations local-timeline.md (Chinese Simplified)

* New translations local-timeline.md (Chinese Traditional)

* New translations local-timeline.md (English)

* New translations local-timeline.md (Indonesian)

* New translations main.md (French)

* New translations main.md (Italian)

* New translations main.md (Korean)

* New translations main.md (Polish)

* New translations main.md (Chinese Simplified)

* New translations main.md (Chinese Traditional)

* New translations main.md (English)

* New translations main.md (Indonesian)

* New translations note-capture-events.md (French)

* New translations note-capture-events.md (Italian)

* New translations note-capture-events.md (Korean)

* New translations note-capture-events.md (Polish)

* New translations note-capture-events.md (Chinese Simplified)

* New translations note-capture-events.md (Chinese Traditional)

* New translations note-capture-events.md (English)

* New translations note-capture-events.md (Indonesian)

* New translations 2.miauth.md (French)

* New translations 2.miauth.md (Italian)

* New translations 2.miauth.md (Korean)

* New translations 2.miauth.md (Polish)

* New translations 2.miauth.md (Chinese Simplified)

* New translations 2.miauth.md (Chinese Traditional)

* New translations 2.miauth.md (English)

* New translations 2.miauth.md (Indonesian)

* New translations 1.index.md (French)

* New translations 1.index.md (Italian)

* New translations 1.index.md (Korean)

* New translations 1.index.md (Polish)

* New translations 1.index.md (Chinese Simplified)

* New translations 1.index.md (Chinese Traditional)

* New translations 1.index.md (English)

* New translations 1.index.md (Indonesian)

* New translations create-plugin.md (French)

* New translations create-plugin.md (Italian)

* New translations create-plugin.md (Korean)

* New translations create-plugin.md (Polish)

* New translations create-plugin.md (Chinese Simplified)

* New translations create-plugin.md (Chinese Traditional)

* New translations create-plugin.md (English)

* New translations create-plugin.md (Indonesian)

* New translations plugin-api-reference.md (French)

* New translations plugin-api-reference.md (Italian)

* New translations plugin-api-reference.md (Korean)

* New translations plugin-api-reference.md (Polish)

* New translations plugin-api-reference.md (Chinese Simplified)

* New translations plugin-api-reference.md (Chinese Traditional)

* New translations plugin-api-reference.md (English)

* New translations plugin-api-reference.md (Indonesian)

* New translations publish-on-your-website.md (French)

* New translations publish-on-your-website.md (Italian)

* New translations publish-on-your-website.md (Korean)

* New translations publish-on-your-website.md (Polish)

* New translations publish-on-your-website.md (Chinese Simplified)

* New translations publish-on-your-website.md (Chinese Traditional)

* New translations publish-on-your-website.md (English)

* New translations publish-on-your-website.md (Indonesian)

* New translations 5.releases.md (French)

* New translations 5.releases.md (Italian)

* New translations 5.releases.md (Korean)

* New translations 5.releases.md (Polish)

* New translations 5.releases.md (Chinese Simplified)

* New translations 5.releases.md (Chinese Traditional)

* New translations 5.releases.md (English)

* New translations 5.releases.md (Indonesian)

* New translations endpoints.md (French)

* New translations endpoints.md (Italian)

* New translations endpoints.md (Korean)

* New translations endpoints.md (Polish)

* New translations endpoints.md (Chinese Simplified)

* New translations endpoints.md (Chinese Traditional)

* New translations endpoints.md (English)

* New translations endpoints.md (Indonesian)

* New translations 1.index.md (French)

* New translations 1.index.md (Italian)

* New translations 1.index.md (Korean)

* New translations 1.index.md (Polish)

* New translations 1.index.md (Chinese Simplified)

* New translations 1.index.md (Chinese Traditional)

* New translations 1.index.md (English)

* New translations 1.index.md (Indonesian)

* New translations 3.oauth.md (French)

* New translations 3.oauth.md (Italian)

* New translations 3.oauth.md (Korean)

* New translations 3.oauth.md (Polish)

* New translations 3.oauth.md (Chinese Simplified)

* New translations 3.oauth.md (Chinese Traditional)

* New translations 3.oauth.md (English)

* New translations 3.oauth.md (Indonesian)

* New translations aiscript.md (French)

* New translations aiscript.md (Italian)

* New translations aiscript.md (Korean)

* New translations aiscript.md (Polish)

* New translations aiscript.md (Chinese Simplified)

* New translations aiscript.md (Chinese Traditional)

* New translations aiscript.md (English)

* New translations aiscript.md (Indonesian)

* New translations 50.app.md (French)

* New translations 50.app.md (Italian)

* New translations 50.app.md (Korean)

* New translations 50.app.md (Polish)

* New translations 50.app.md (Chinese Simplified)

* New translations 50.app.md (Chinese Traditional)

* New translations 50.app.md (English)

* New translations 50.app.md (Indonesian)

* New translations 7.become-a-sponsor.md (French)

* New translations 7.become-a-sponsor.md (Italian)

* New translations 7.become-a-sponsor.md (Korean)

* New translations 7.become-a-sponsor.md (Polish)

* New translations 7.become-a-sponsor.md (Chinese Simplified)

* New translations 7.become-a-sponsor.md (Chinese Traditional)

* New translations 7.become-a-sponsor.md (English)

* New translations 7.become-a-sponsor.md (Indonesian)
2024-03-26 23:10:53 +09:00

44 lines
4.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# プラグイン・テーマを配布する
Misskey v2023.11.0以降では、様々な追加リソースをあなたのウェブサイトから直接インストールできるようになりました。特に、プラグインやテーマなどをたくさん制作している方や、プラグイン配布サイトを作りたい方にとっては便利な機能です。
## 外部からのインストールに対応しているリソース
- [プラグイン](./plugin/create-plugin/) ... `plugin`
- [テーマ](../for-users/features/theme/) ... `theme`
## しくみ
インストール時に、Misskey Webで受け取るリソースに予期せぬ改ざんが起こらないようにするため、配布サイト側とMisskey双方でハッシュ値を計算し、Misskeyで照合を行います。
ハッシュ値が照合できない場合はリソースをインストールすることができないようになっています。
## 実装方法
### 配布ページ側
「インストール」ボタンに、以下のようなURLを持つリンクを作成する
```
https://{HOST}/install-extentions?url={API_URL}&hash={HASH}
```
- `{HOST}`: ユーザーのサーバーのホストに置き換えます。ホストはユーザーが入力できるようにすることが一般的です。
- `{API_URL}`: リソース配布用API後述のURLに置き換えます。相対パスは不可
- `{HASH}`: 配布するリソースのSHA-512ハッシュに置き換えます。**リソース内での改行コードはLFに統一してください。**
### リソース配布用API側
上記 `{API_URL}` で指定したエンドポイントから、以下のようなJSONオブジェクトを返してください。
```json
{
"type": "theme",
"data": "{\n\tid: '4dca6e53-9c1b-41bb-a1ac-c62c3b710536',\n\tbase: 'light',\n\tname: 'Misskey Design',\n\tprops: {\n\t\tX2: ':darken<2<@panel',\n\t\tX3: 'rgba(0, 0, 0, 0.05)',\n\t\tX4: 'rgba(0, 0, 0, 0.1)',\n\t\tX5: 'rgba(0, 0, 0, 0.05)',\n\t\tX6: 'rgba(0, 0, 0, 0.25)',\n\t\tX7: 'rgba(0, 0, 0, 0.05)',\n\t\tX8: ':lighten<5<@accent',\n\t\tX9: ':darken<5<@accent',\n\t\tbg: '#f9f9f9',\n\t\tfg: '#5f5f5f',\n\t\tX10: ':alpha<0.4<@accent',\n\t\tX11: 'rgba(0, 0, 0, 0.1)',\n\t\tX12: 'rgba(0, 0, 0, 0.1)',\n\t\tX13: 'rgba(0, 0, 0, 0.15)',\n\t\tX14: ':alpha<0.5<@navBg',\n\t\tX15: ':alpha<0<@panel',\n\t\tX16: ':alpha<0.7<@panel',\n\t\tX17: ':alpha<0.8<@bg',\n\t\tcwBg: '#b1b9c1',\n\t\tcwFg: '#fff',\n\t\tlink: '#44a4c1',\n\t\twarn: '#ecb637',\n\t\tbadge: '#31b1ce',\n\t\terror: '#ec4137',\n\t\tfocus: ':alpha<0.3<@accent',\n\t\tnavBg: '@panel',\n\t\tnavFg: '@fg',\n\t\tpanel: ':lighten<3<@bg',\n\t\tpopup: ':lighten<3<@panel',\n\t\taccent: '#FF6B63',\n\t\theader: ':alpha<0.7<@panel',\n\t\tinfoBg: '#e5f5ff',\n\t\tinfoFg: '#72818a',\n\t\trenote: '#229e82',\n\t\tshadow: 'rgba(0, 0, 0, 0.1)',\n\t\tdivider: 'rgba(0, 0, 0, 0.1)',\n\t\thashtag: '#ff9156',\n\t\tmention: '@accent',\n\t\tmodalBg: 'rgba(0, 0, 0, 0.3)',\n\t\tsuccess: '#86b300',\n\t\tbuttonBg: 'rgba(0, 0, 0, 0.05)',\n\t\tswitchBg: 'rgba(0, 0, 0, 0.15)',\n\t\tacrylicBg: ':alpha<0.5<@bg',\n\t\tcwHoverBg: '#bbc4ce',\n\t\tindicator: '@accent',\n\t\tmentionMe: '@mention',\n\t\tmessageBg: '@bg',\n\t\tnavActive: '@accent',\n\t\taccentedBg: ':alpha<0.15<@accent',\n\t\tcodeNumber: '#0fbbbb',\n\t\tcodeString: '#b98710',\n\t\tfgOnAccent: '#fff',\n\t\tinfoWarnBg: '#fff0db',\n\t\tinfoWarnFg: '#8f6e31',\n\t\tnavHoverFg: ':darken<17<@fg',\n\t\tswitchOnBg: '@accent',\n\t\tswitchOnFg: '@fgOnAccent',\n\t\tcodeBoolean: '#62b70c',\n\t\tdateLabelFg: '@fg',\n\t\tdeckDivider: ':darken<3<@bg',\n\t\tinputBorder: 'rgba(0, 0, 0, 0.1)',\n\t\tpanelBorder: '\" solid 1px var(--divider)',\n\t\tswitchOffBg: 'rgba(0, 0, 0, 0.1)',\n\t\tswitchOffFg: '@panel',\n\t\taccentDarken: ':darken<10<@accent',\n\t\tacrylicPanel: ':alpha<0.5<@panel',\n\t\tnavIndicator: '@indicator',\n\t\twindowHeader: ':alpha<0.85<@panel',\n\t\taccentLighten: ':lighten<10<@accent',\n\t\tbuttonHoverBg: 'rgba(0, 0, 0, 0.1)',\n\t\tdriveFolderBg: ':alpha<0.3<@accent',\n\t\tfgHighlighted: ':darken<3<@fg',\n\t\tfgTransparent: ':alpha<0.5<@fg',\n\t\tpanelHeaderBg: ':lighten<3<@panel',\n\t\tpanelHeaderFg: '@fg',\n\t\tbuttonGradateA: '#FC4774',\n\t\tbuttonGradateB: '#F9E001',\n\t\thtmlThemeColor: '@bg',\n\t\tpanelHighlight: ':darken<3<@panel',\n\t\tlistItemHoverBg: 'rgba(0, 0, 0, 0.03)',\n\t\tscrollbarHandle: 'rgba(0, 0, 0, 0.2)',\n\t\tinputBorderHover: 'rgba(0, 0, 0, 0.2)',\n\t\twallpaperOverlay: 'rgba(255, 255, 255, 0.5)',\n\t\tfgTransparentWeak: ':alpha<0.75<@fg',\n\t\tpanelHeaderDivider: 'rgba(0, 0, 0, 0)',\n\t\tscrollbarHandleHover: 'rgba(0, 0, 0, 0.4)',\n\t},\n\tauthor: '@kakkokari_gtyih@misskey.io',\n}"
}
```
- `type`: 上記「外部からのインストールに対応しているリソース」のコードを参照して入力してください。
- `data`: リソースのソースコードを**文字列で**入力
- この際、改行コードは**LF**としてください