Update documentation with contents by twrnh
This commit is contained in:
parent
92e8aadd7f
commit
33cb69ad07
324 changed files with 18140 additions and 9654 deletions
|
@ -1,14 +1,26 @@
|
|||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<aside>{{ .TableOfContents }}</aside>
|
||||
{{ with .Description }}
|
||||
<p>{{.}}</p>
|
||||
{{ end }}
|
||||
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
|
||||
<p style="color: #687590;">
|
||||
Last updated {{ .Lastmod.Format "January 2, 2006" }} ·
|
||||
<a href='https://source.joinmastodon.org/mastodon/docs/tree/master/content/{{.Lang}}/{{.File.Path}}' style="color: #687590;">Improve this page</a>
|
||||
{{ i18n "lastUpdated" }} {{ .Lastmod.Format "January 2, 2006" }}{{ with .File }} · <a href='https://source.joinmastodon.org/mastodon/docs/tree/master/content/{{ .Lang }}/{{ .Path }}' style="color: #687590;">{{ i18n "improvePage" }}{{ end }}</a>
|
||||
|
||||
{{ if .IsTranslated }}
|
||||
<br />
|
||||
|
||||
{{ i18n "otherTranslations" }}
|
||||
|
||||
{{ range .Translations }}
|
||||
<a href="{{ .Permalink }}" style="color: #687590;" hreflang="{{ .Lang }}">{{ .Language.LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,17 +1,28 @@
|
|||
{{ define "title"}} Mastodon documentation {{end}}
|
||||
{{ define "title"}}{{ .Site.Title }}{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ with .Description }}
|
||||
<p>{{.}}</p>
|
||||
{{ end }}
|
||||
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
|
||||
<p><i class="fas fa-language"></i> <strong>Available languages:</strong></p>
|
||||
<p style="color: #687590;">
|
||||
{{ i18n "lastUpdated" }} {{ .Lastmod.Format "January 2, 2006" }}{{ with .File }} · <a href='https://source.joinmastodon.org/mastodon/docs/tree/master/content/{{ .Lang }}/{{ .Path }}' style="color: #687590;">{{ i18n "improvePage" }}{{ end }}</a>
|
||||
|
||||
<ul>
|
||||
{{ range $.Site.Home.AllTranslations }}
|
||||
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ if .IsTranslated }}
|
||||
<br />
|
||||
|
||||
{{ i18n "otherTranslations" }}
|
||||
|
||||
{{ range .Translations }}
|
||||
<a href="{{ .Permalink }}" style="color: #687590;" hreflang="{{ .Lang }}">{{ .Language.LanguageName }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="cta-banner">
|
||||
<h4>Join the social media revolution</h4>
|
||||
<p>Mastodon is a free, decentralized platform with over a million people</p>
|
||||
<a href='https://joinmastodon.org/#getting-started'>Join Mastodon now!</a>
|
||||
<h4>{{ i18n "joinTitle" }}</h4>
|
||||
<p>{{ i18n "joinText" }}</p>
|
||||
<a href='https://joinmastodon.org/#getting-started'>{{ i18n "joinAction" }}</a>
|
||||
</div>
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
<footer class="footer container">
|
||||
<a href="https://designbyhumans.com/shop/mastodon" class="panel" style="background-image: url(/shirt.png)">
|
||||
<div class="overlay">
|
||||
<h5>Merch</h5>
|
||||
<p>T-shirts and stickers</p>
|
||||
<h5>{{ i18n "merch" }}</h5>
|
||||
<p>{{ i18n "shirtsAndStickers" }}</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<p class="legal legal--right">
|
||||
<a href='https://joinmastodon.org'>Join Mastodon</a> · <a href='https://blog.joinmastodon.org'>Blog</a> · <a href='https://mastodon.social/@Mastodon' target='_blank'><i class='fab fa-mastodon'></i></a> · <a href='https://twitter.com/MastodonProject' rel='nofollow' target='_blank'><i class='fab fa-twitter'></i></a>
|
||||
<a href='https://joinmastodon.org'>{{ i18n "joinMastodon" }}</a> · <a href='https://blog.joinmastodon.org'>{{ i18n "blog" }}</a> · <a href='https://mastodon.social/@Mastodon' target='_blank'><i class='fab fa-mastodon'></i></a> · <a href='https://twitter.com/MastodonProject' rel='nofollow' target='_blank'><i class='fab fa-twitter'></i></a>
|
||||
</p>
|
||||
|
||||
<p class="legal"><a href='https://source.joinmastodon.org/mastodon/docs/tree/master/content/{{.Lang}}/{{.File.Path}}'>View source</a> · <a href='https://creativecommons.org/licenses/by-sa/4.0/'>CC BY-SA 4.0</a> · <a href='https://joinmastodon.org/imprint'>Imprint</a></p>
|
||||
<p class="legal">{{ with .File }}<a href='https://source.joinmastodon.org/mastodon/docs/tree/master/content/{{ .Lang }}/{{ .File.Path }}'>{{ i18n "viewSource" }}</a> · {{ end }}<a href='https://creativecommons.org/licenses/by-sa/4.0/'>CC BY-SA 4.0</a> · <a href='https://joinmastodon.org/imprint'>{{ i18n "imprint" }}</a></p>
|
||||
</footer>
|
||||
|
||||
<script async src="/site.js"></script>
|
||||
|
|
|
@ -4,5 +4,9 @@
|
|||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="/favicon.ico"/>
|
||||
<link rel='stylesheet' href='/style.css'>
|
||||
<link rel='stylesheet' href='/fontawesome.css'>
|
||||
|
||||
{{ $css := resources.Get "style.scss" | toCSS | minify | fingerprint }}
|
||||
<link rel='stylesheet' href='{{ $css.Permalink }}'>
|
||||
|
||||
{{ $js := resources.Get "main.js" | minify | fingerprint }}
|
||||
<script src='{{ $js.Permalink }}' async></script>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
<a class='brand' href='/'>
|
||||
<img class='link-logo' src='/brand.svg' alt='Mastodon' />
|
||||
<a class="brand" href="/">
|
||||
<img class="link-logo" src="/brand.svg" alt="Mastodon" />
|
||||
</a>
|
||||
|
||||
<div class='mascot'>
|
||||
<img src='/elephant.svg' alt='' role='presentational' />
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.docs.ByWeight }}
|
||||
{{ if .HasChildren }}
|
||||
<li>
|
||||
<a href="javascript:void(0)" class="menu-item{{ if $currentPage.HasMenuCurrent "docs" . }} active{{ end }}">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
<li>
|
||||
{{ if .Page }}
|
||||
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>
|
||||
{{ else }}
|
||||
<span class="sub-title">{{ .Name }}</span>
|
||||
{{ end }}
|
||||
|
||||
<ul class="sub-menu{{ if $currentPage.HasMenuCurrent "docs" . }}{{else}} collapsed{{ end }}">
|
||||
{{ if .HasChildren }}
|
||||
<ul class="sub-menu">
|
||||
{{ range .Children }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>
|
||||
|
||||
{{ if .HasChildren }}
|
||||
<ul class="sub-menu">
|
||||
{{ range .Children }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" class="{{ if $currentPage.IsMenuCurrent "docs" . }}active{{ end }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
|
1
layouts/shortcodes/api-method-description.html
Normal file
1
layouts/shortcodes/api-method-description.html
Normal file
|
@ -0,0 +1 @@
|
|||
<div>
|
2
layouts/shortcodes/api-method-form-data-parameters.html
Normal file
2
layouts/shortcodes/api-method-form-data-parameters.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<h5 class="api-method-parameters-type">{{ i18n "formDataParameters" }}</h5>
|
||||
<div class="api-method-parameters-list">
|
2
layouts/shortcodes/api-method-headers.html
Normal file
2
layouts/shortcodes/api-method-headers.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<h5 class="api-method-parameters-type">{{ i18n "headers" }}</h5>
|
||||
<div class="api-method-parameters-list">
|
11
layouts/shortcodes/api-method-parameter.html
Normal file
11
layouts/shortcodes/api-method-parameter.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="api-method-parameter">
|
||||
<div class="api-method-parameter-cell api-method-parameter-name">
|
||||
<div>{{ .Get "name" | markdownify }}</div>
|
||||
{{ if (.Get "required") }}<div class="api-method-parameter-required">{{ i18n "required" }}</div>{{ else}}<div class="api-method-parameter-optional">{{ i18n "optional" }}</div>{{ end }}
|
||||
</div>
|
||||
|
||||
<div class="api-method-parameter-cell api-method-parameter-type">
|
||||
<code>{{ .Get "type" }}</code>
|
||||
</div>
|
||||
|
||||
<div class="api-method-parameter-cell api-method-parameter-description">
|
2
layouts/shortcodes/api-method-path-parameters.html
Normal file
2
layouts/shortcodes/api-method-path-parameters.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<h5 class="api-method-parameters-type">{{ i18n "pathParameters" }}</h5>
|
||||
<div class="api-method-parameters-list">
|
2
layouts/shortcodes/api-method-query-parameters.html
Normal file
2
layouts/shortcodes/api-method-query-parameters.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<h5 class="api-method-parameters-type">{{ i18n "queryParameters" }}</h5>
|
||||
<div class="api-method-parameters-list">
|
2
layouts/shortcodes/api-method-request.html
Normal file
2
layouts/shortcodes/api-method-request.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<div class="tab-pane">
|
||||
<h4 class="tab-pane-title">{{ i18n "request" }}</h4>
|
|
@ -0,0 +1 @@
|
|||
<div>
|
5
layouts/shortcodes/api-method-response-example.html
Normal file
5
layouts/shortcodes/api-method-response-example.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="api-method-response-example">
|
||||
<h5>
|
||||
<span class="api-method-response-example-indicator{{ if (gt (.Get "httpCode") 399) }} api-method-response-example-indicator-error{{ end }}"></span>
|
||||
{{ .Get "httpCode" }}: {{ index .Site.Data.HttpCodes (.Get "httpCode" | string) }}
|
||||
</h5>
|
2
layouts/shortcodes/api-method-response.html
Normal file
2
layouts/shortcodes/api-method-response.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<div class="tab-pane">
|
||||
<h4 class="tab-pane-title">{{ i18n "response" }}</h4>
|
1
layouts/shortcodes/api-method-spec.html
Normal file
1
layouts/shortcodes/api-method-spec.html
Normal file
|
@ -0,0 +1 @@
|
|||
<div class="tabs">
|
12
layouts/shortcodes/api-method.html
Normal file
12
layouts/shortcodes/api-method.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<div>
|
||||
<h2 class="api-method">
|
||||
<div class="api-method-method">
|
||||
<span>{{ .Get "method"}}</span>
|
||||
</div>
|
||||
|
||||
<span class="api-method-title">{{ .Get "title" }}</span>
|
||||
</h2>
|
||||
|
||||
<div class="api-method-url">
|
||||
<span class="api-method-host">{{ .Get "host" }}</span><span class="api-method-path">{{ .Get "path" }}</span>
|
||||
</div>
|
|
@ -1 +0,0 @@
|
|||
<p>This API returns Link headers containing links to the next and previous page. However, the links can also be constructed dynamically using query params and <code>id</code> values.</p>
|
|
@ -1,30 +0,0 @@
|
|||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: left">Response format</th>
|
||||
<td>JSON</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">Requires authentication</th>
|
||||
<td>{{ .Get "auth" }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">Requires user</th>
|
||||
<td>{{ .Get "user" }}</td>
|
||||
</tr>
|
||||
|
||||
{{ with .Get "scope" }}
|
||||
<tr>
|
||||
<th style="text-align: left">Scope</th>
|
||||
<td>{{range split . " "}}<code>{{ . }}</code> {{ end }}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">Available since</th>
|
||||
<td>{{ .Get "version" }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -1 +0,0 @@
|
|||
<p>This API returns Link headers containing links to the next and previous page. Since it is using an internal ID, <strong>it is not possible to dynamically generate query parameters to paginate</strong>. You must rely on the Link header.</p>
|
4
layouts/shortcodes/caption-link.html
Normal file
4
layouts/shortcodes/caption-link.html
Normal file
|
@ -0,0 +1,4 @@
|
|||
<a href="{{ .Get "url" }}" class="page-ref">
|
||||
<div class="page-ref-icon"><i class="fa fa-external-link-square-alt"></i></div>
|
||||
{{ .Get "caption" | markdownify }}
|
||||
</a>
|
7
layouts/shortcodes/code.html
Normal file
7
layouts/shortcodes/code.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<figure>
|
||||
{{ .Inner | markdownify }}
|
||||
|
||||
<figcaption>
|
||||
<p>{{ .Get "title" | markdownify }}</p>
|
||||
</figcaption>
|
||||
</figure>
|
1
layouts/shortcodes/endapi-method-description.html
Normal file
1
layouts/shortcodes/endapi-method-description.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endapi-method-headers.html
Normal file
1
layouts/shortcodes/endapi-method-headers.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
2
layouts/shortcodes/endapi-method-parameter.html
Normal file
2
layouts/shortcodes/endapi-method-parameter.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
</div>
|
||||
</div>
|
1
layouts/shortcodes/endapi-method-path-parameters.html
Normal file
1
layouts/shortcodes/endapi-method-path-parameters.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endapi-method-query-parameters.html
Normal file
1
layouts/shortcodes/endapi-method-query-parameters.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endapi-method-request.html
Normal file
1
layouts/shortcodes/endapi-method-request.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endapi-method-response-example.html
Normal file
1
layouts/shortcodes/endapi-method-response-example.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endapi-method-response.html
Normal file
1
layouts/shortcodes/endapi-method-response.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endapi-method-spec.html
Normal file
1
layouts/shortcodes/endapi-method-spec.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endapi-method.html
Normal file
1
layouts/shortcodes/endapi-method.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endtab.html
Normal file
1
layouts/shortcodes/endtab.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
1
layouts/shortcodes/endtabs.html
Normal file
1
layouts/shortcodes/endtabs.html
Normal file
|
@ -0,0 +1 @@
|
|||
</div>
|
5
layouts/shortcodes/hint.html
Normal file
5
layouts/shortcodes/hint.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="hint hint-{{ with .Get "style" }}{{.}}{{ else }}info{{ end }}">
|
||||
<div class="hint-icon"><i class="fa fa-{{ if (eq (.Get "style") "warning") }}exclamation-circle{{ end }}{{ if (eq (.Get "style") "success") }}check-circle{{ end }}{{ if (eq (.Get "style") "info") }}info-circle{{ end }}{{ if (eq (.Get "style") "danger") }}exclamation-triangle{{ end }}"></i></div>
|
||||
|
||||
{{ .Inner | markdownify }}
|
||||
</div>
|
7
layouts/shortcodes/page-ref.html
Normal file
7
layouts/shortcodes/page-ref.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{- $page := .Site.GetPage (.Get "page") -}}
|
||||
{{- with $page -}}
|
||||
<a href="{{ .Permalink }}" class="page-ref">
|
||||
<div class="page-ref-icon"><i class="fa fa-arrow-right"></i></div>
|
||||
{{ .Title }}
|
||||
</a>
|
||||
{{- end -}}
|
2
layouts/shortcodes/tab.html
Normal file
2
layouts/shortcodes/tab.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<div class="tabs-pane">
|
||||
<h5 class="tabs-pane-title">{{ .Get "title" }}</h5>
|
1
layouts/shortcodes/tabs.html
Normal file
1
layouts/shortcodes/tabs.html
Normal file
|
@ -0,0 +1 @@
|
|||
<div class="tabs">
|
9
layouts/shortcodes/youtube.html
Normal file
9
layouts/shortcodes/youtube.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<figure>
|
||||
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
|
||||
<iframe src="https://www.youtube.com/embed/{{ .Get "id" }}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="{{ .Get "caption" }}"></iframe>
|
||||
</div>
|
||||
|
||||
<figcaption>
|
||||
<p>{{- .Get "caption" | markdownify -}}</p>
|
||||
</figcaption>
|
||||
</figure>
|
Loading…
Add table
Add a link
Reference in a new issue