mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 00:43:50 +01:00
(add) ns page
This commit is contained in:
parent
c742cdeeb2
commit
deabf06bce
96
content/ns.md
Normal file
96
content/ns.md
Normal file
@ -0,0 +1,96 @@
|
||||
# Misskey Extensions to ActivityPub
|
||||
|
||||
This page documents the extensions to ActivityPub that Misskey uses. This page lists some context items defined in JSON-LD contexts and explains their semantics.
|
||||
|
||||
This document uses [compact IRIs](https://www.w3.org/TR/json-ld/#dfn-compact-iri).
|
||||
The prefix `ap` is used to refer to `https://www.w3.org/ns/activitystreams#`.
|
||||
The prefix `misskey` is used to refer to `https://misskey-hub-net/ns#`.
|
||||
|
||||
## `_misskey_content`
|
||||
|
||||
- compact IRI: `misskey:_misskey_content`
|
||||
- canonical IRI: `https://misskey-hub.net/ns#_misskey_content`
|
||||
|
||||
:::warning
|
||||
This value is deprecated and might be removed in the future.
|
||||
See also <https://github.com/misskey-dev/misskey/pull/8787>.
|
||||
:::
|
||||
|
||||
This value is identical to having a `source` property like this:
|
||||
|
||||
```js
|
||||
source: {
|
||||
content: _misskey_content,
|
||||
mediaType: "text/x.misskeymarkdown"
|
||||
}
|
||||
```
|
||||
|
||||
Where `_misskey_content` represents the value of the field described in this section.
|
||||
|
||||
## `_misskey_summary`
|
||||
|
||||
- compact IRI: `misskey:_misskey_summary`
|
||||
- canonical IRI: `https://misskey-hub.net/ns#_misskey_summary`
|
||||
|
||||
Used on actors to display their summary as MFM. The content is same as `summary`, but in MFM form.
|
||||
|
||||
## `_misskey_quote`
|
||||
|
||||
- compact IRI: `misskey:_misskey_quote`
|
||||
- canonical IRI: `https://misskey-hub.net/ns#_misskey_quote`
|
||||
|
||||
:::tip
|
||||
Ways to potentially provide this information using the core ActivityPub vocabulary are currently underway, see <https://github.com/misskey-dev/misskey/issues/8722>.
|
||||
:::
|
||||
|
||||
Indicates that this note is quoting another note. It contains the `id` of the note being quoted.
|
||||
|
||||
This seems to be identical to `https://fedibird.com/ns#quoteUri`.
|
||||
Misskey also uses `as:quoteUrl` for this but this was not adopted to the ActivityPub specification.
|
||||
This is for compatibility with some other ActivityPub programs that operate using this.
|
||||
|
||||
## `_misskey_reaction`
|
||||
|
||||
- compact IRI: `misskey:_misskey_reaction`
|
||||
- canonical IRI: `https://misskey-hub.net/ns#_misskey_reaction`
|
||||
|
||||
Misskey federates its reactions as `Like` activities.
|
||||
What kind of reaction was used is conveyed using this field.
|
||||
Misskey also sets `ap:content` of the `Like` activity to the same value.
|
||||
|
||||
The content will be a string that either contains a single Unicode Emoji or a string that starts and ends with a colon. In the latter case the reaction uses a custom emoji, and the `tag` property will be set to contain the data of the respective emoji.
|
||||
|
||||
## `_misskey_votes`
|
||||
|
||||
- compact IRI: `misskey:_misskey_votes`
|
||||
- canonical IRI: `https://misskey-hub.net/ns#_misskey_votes`
|
||||
|
||||
This value is used for `Question` activities to indicate the number of votes an option currently has.
|
||||
This value is identical to having a `replies` property like this:
|
||||
|
||||
```js
|
||||
replies: {
|
||||
type: 'Collection',
|
||||
totalItems: _misskey_votes
|
||||
}
|
||||
```
|
||||
|
||||
Where `_misskey_votes` represents the value of the field described in this section.
|
||||
|
||||
## `_misskey_talk`
|
||||
|
||||
- compact IRI: `misskey:_misskey_talk`
|
||||
- canonical IRI: `https://misskey-hub.net/ns#_misskey_talk`
|
||||
|
||||
This value is used for `Note` type objects to indicate that they are a Misskey chat message.
|
||||
Misskey handles these kinds of messages specially, e.g. it will apply different audience scoping rules and show them via a different API than usual `Note` objects.
|
||||
|
||||
This field can only take the value of `true` (or be absent).
|
||||
|
||||
## `isCat`
|
||||
|
||||
- compact IRI: `misskey:isCat`
|
||||
- canonical IRI: `https://misskey-hub.net/ns#isCat`
|
||||
|
||||
Used on actors to indicate that they in some way identify as a cat, expressed as a boolean value.
|
||||
If this property is set to `true`, displaying the actor or their notes will have some special effects attached in some clients.
|
58
pages/ns.vue
Normal file
58
pages/ns.vue
Normal file
@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="relative container mx-auto max-w-screen-xl p-6 lg:py-0 grid docs-main">
|
||||
<div class="lg:hidden sticky top-16 -mx-6 -mt-6 overflow-y-auto bg-slate-50 dark:bg-slate-900 z-[9890] border-b dark:border-slate-700 text-sm flex items-start">
|
||||
<details v-if="data?.body && data.body.toc.links.length > 0" class="peer flex-grow flex-shrink-0" :open="openState">
|
||||
<summary class="py-4 cursor-pointer">
|
||||
{{ $t('_docs._toc.title') }}
|
||||
</summary>
|
||||
<div class="pb-4 px-6 max-h-[65vh] overflow-y-auto">
|
||||
<DocsTocLinks :links="data?.body.toc.links" @child-click="openState = false" />
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
<div class="pt-6 lg:p-6 w-full overflow-x-hidden">
|
||||
<template v-if="data?.body">
|
||||
<ContentRenderer v-if="data.body.children.length > 0" :value="data" class="markdown-body w-full mb-6">
|
||||
</ContentRenderer>
|
||||
</template>
|
||||
</div>
|
||||
<div class="hidden lg:block text-sm">
|
||||
<div class="sticky top-16 h-[calc(100vh-4rem)] overflow-y-auto py-6 pl-6">
|
||||
<h3 class="font-bold mb-6">{{ $t('_docs._toc.title') }}</h3>
|
||||
<DocsTocLinks v-if="data?.body" :links="data?.body.toc.links" class="break-words" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const openState = ref<boolean>(false);
|
||||
|
||||
definePageMeta({
|
||||
layout: 'slim',
|
||||
});
|
||||
|
||||
defineI18nRoute(false);
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const { data } = await useAsyncData('global-ns', () => queryContent(`/ns`).findOne());
|
||||
|
||||
if (!data.value) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'page not found' });
|
||||
}
|
||||
|
||||
route.meta.title = data.value?.title;
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.docs-main {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
@screen lg {
|
||||
.docs-main {
|
||||
grid-template-columns: 1fr 14rem;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -2,7 +2,7 @@ import { useRuntimeConfig } from '#imports';
|
||||
|
||||
export default defineNitroPlugin((nitroApp) => {
|
||||
nitroApp.hooks.hook('render:html', (html, { event }) => {
|
||||
if (event.path.includes("_nuxt") || event.path.match(/\d{3}\.html/)) {
|
||||
if (event.path.includes("_nuxt") || event.path.match(/\d{3}\.html/) || event.path.match(/^\/ns/)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user