This commit is contained in:
rustdesk
2026-03-20 15:16:55 +08:00
parent b6655924d6
commit 1736869d5f
462 changed files with 1479 additions and 124 deletions

45
layouts/list.rss.xml Normal file
View File

@@ -0,0 +1,45 @@
{{ $authorName := .Site.Params.author }}
{{ $authorEmail := .Site.Params.authorEmail }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ .Site.Title }} {{ .Title }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{ . }}</language>{{ end }}{{ with $authorEmail }}
<managingEditor>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{ if not $.Section }}
{{ $sections := .Site.Params.rss.sections | default (slice "blog") }}
{{ .Scratch.Set "rssPages" (first 50 (where $.Site.RegularPages "Type" "in" $sections)) }}
{{ else }}
{{ if $.Parent.IsHome }}
{{ .Scratch.Set "rssPages" (first 50 (where $.Site.RegularPages "Type" $.Section)) }}
{{ else }}
{{ .Scratch.Set "rssPages" (first 50 $.Pages) }}
{{ end }}
{{ end }}
{{ range (.Scratch.Get "rssPages") }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>
{{ $img := (.Resources.ByType "image").GetMatch "*featured*" }}
{{ with $img }}
{{ $img := .Resize "640x" }}
{{ printf "<![CDATA[<img src=\"%s\" width=\"%d\" height=\"%d\"/>]]>" $img.Permalink $img.Width $img.Height | safeHTML }}
{{ end }}
{{ .Content | html }}
</description>
</item>
{{ end }}
</channel>
</rss>

View File

@@ -1,8 +1,7 @@
<!-- Enhanced Meta Tags for SEO -->
{{- if .Site.Language.Params.keywords }}
<meta name="keywords" content="{{ delimit .Site.Language.Params.keywords ", " }}" />
{{- else if .Site.Params.keywords }}
<meta name="keywords" content="{{ delimit .Site.Params.keywords ", " }}" />
{{- $keywords := .Params.keywords | default .Site.Language.Params.keywords | default .Site.Params.keywords -}}
{{- with $keywords }}
<meta name="keywords" content="{{ delimit . ", " }}" />
{{- end }}
<meta name="author" content="{{ .Site.Params.author }}" />
<meta name="language" content="{{ .Site.Language.Lang }}" />
@@ -10,34 +9,14 @@
<!-- Alternate language versions for better SEO -->
{{- if .IsTranslated }}
{{- $xDefault := .Permalink }}
{{- range .AllTranslations }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" />
{{- if eq .Language.Lang "en" }}
{{- $xDefault = .Permalink }}
{{- end }}
{{- end }}
{{- end }}
<!-- JSON-LD for better indexing -->
{{- if .IsHome }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "RustDesk",
"description": "{{ .Site.Params.description }}",
"url": "https://rustdesk.com",
"logo": "{{ (index .Site.Params.images 0) | absURL }}",
"sameAs": [
"https://github.com/rustdesk",
"https://twitter.com/rustdesk",
"https://discord.com/invite/nDceKgxnkV",
"https://www.reddit.com/r/rustdesk/"
],
"contactPoint": {
"@type": "ContactPoint",
"contactType": "Support",
"email": "support@rustdesk.com"
}
}
</script>
<link rel="alternate" hreflang="x-default" href="{{ $xDefault }}" />
{{- end }}
<!-- Enhanced breadcrumb structured data -->
@@ -54,4 +33,4 @@
</script>
<!-- Image zoom functionality -->
<script src="{{ "js/image-zoom.js" | relURL }}" defer></script>
<script src="{{ "js/image-zoom.js" | relURL }}" defer></script>

View File

@@ -0,0 +1,29 @@
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:description" content="{{ partial "utils/page-description.html" . }}" />
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{- with $.Params.images -}}
{{- range first 6 . }}<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
{{- else -}}
{{- $featured := "" }}
{{- with $featured -}}
<meta property="og:image" content="{{ $featured.Permalink }}"/>
{{- else -}}
{{- with $.Site.Params.images }}<meta property="og:image" content="{{ index . 0 | absURL }}"/>{{ end -}}
{{- end -}}
{{- end -}}
{{- if .IsPage }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
<meta property="article:section" content="{{ .Section }}" />
{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
{{- end -}}
{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
<meta property="og:site_name" content="{{ .Site.Title }}" />
{{- with .Params.videos }}{{- range . }}
<meta property="og:video" content="{{ . | absURL }}" />
{{ end }}{{ end }}

View File

@@ -1,74 +1,102 @@
{{/* Schema.org JSON-LD structured data */}}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "{{ if .IsPage }}Article{{ else }}WebSite{{ end }}",
"name": "{{ .Title }}",
"headline": "{{ .Title }}",
{{- if .IsPage }}
"description": "{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}",
"author": {
"@type": "Organization",
"name": "{{ .Site.Params.author }}",
"url": "https://rustdesk.com"
},
"publisher": {
"@type": "Organization",
"name": "{{ .Site.Params.author }}",
"url": "https://rustdesk.com",
{{- with .Site.Params.images }}
"logo": {
"@type": "ImageObject",
"url": "{{ index . 0 | absURL }}"
}
{{- end }}
},
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
{{- with .PublishDate }}"datePublished": "{{ .Format $iso8601 }}",{{ end }}
{{- with .Lastmod }}"dateModified": "{{ .Format $iso8601 }}",{{ end }}
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ .Permalink }}"
},
{{- else }}
"description": "{{ .Site.Params.description }}",
"publisher": {
"@type": "Organization",
"name": "{{ .Site.Params.author }}",
"url": "https://rustdesk.com"
},
{{- end }}
"url": "{{ .Permalink }}",
{{- $siteDescription := .Site.Params.description | plainify | htmlUnescape | chomp -}}
{{- $description := partial "utils/page-description.html" . | plainify | htmlUnescape | chomp -}}
{{- $softwareDescription := partial "utils/software-description.html" . | plainify | htmlUnescape | chomp -}}
{{- $keywords := .Params.keywords | default .Site.Language.Params.keywords | default .Site.Params.keywords -}}
{{- $imageURL := "" -}}
{{- with .Params.images }}
{{- $imageURL = index . 0 | absURL -}}
{{- else }}
{{- with .Site.Params.images }}
"image": {
"@type": "ImageObject",
"url": "{{ index . 0 | absURL }}"
},
{{- end }}
"inLanguage": "{{ .Site.Language.Lang }}",
"keywords": [
{{- if .Params.keywords -}}
{{- range $i, $keyword := .Params.keywords -}}
{{- if $i }}, {{ end }}"{{ $keyword }}"
{{- end -}}
{{- else if .Site.Language.Params.keywords -}}
{{- range $i, $keyword := .Site.Language.Params.keywords -}}
{{- if $i }}, {{ end }}"{{ $keyword }}"
{{- end -}}
{{- else if .Site.Params.keywords -}}
{{- range $i, $keyword := .Site.Params.keywords -}}
{{- if $i }}, {{ end }}"{{ $keyword }}"
{{- end -}}
{{- end }}
],
"about": {
"@type": "SoftwareApplication",
"name": "RustDesk",
"description": "Open source remote desktop software",
"applicationCategory": "BusinessApplication",
"operatingSystem": "Windows, macOS, Linux, iOS, Android",
"softwareVersion": "latest",
"url": "https://rustdesk.com"
}
}
</script>
{{- $imageURL = index . 0 | absURL -}}
{{- end -}}
{{- end -}}
{{- $orgID := "https://rustdesk.com/#organization" -}}
{{- $websiteID := printf "%s#website" .Site.Home.Permalink -}}
{{- $pageID := printf "%s#webpage" .Permalink -}}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
{{- $org := dict
"@type" "Organization"
"@id" $orgID
"name" "RustDesk"
"url" "https://rustdesk.com"
"sameAs" (slice
"https://github.com/rustdesk"
"https://twitter.com/rustdesk"
"https://discord.com/invite/nDceKgxnkV"
"https://www.reddit.com/r/rustdesk/"
)
"contactPoint" (dict
"@type" "ContactPoint"
"contactType" "Support"
"email" (.Site.Params.authorEmail | default "support@rustdesk.com")
)
-}}
{{- if $imageURL -}}
{{- $org = merge $org (dict "logo" (dict "@type" "ImageObject" "url" $imageURL)) -}}
{{- end -}}
{{- $website := dict
"@type" "WebSite"
"@id" $websiteID
"url" .Site.Home.Permalink
"name" .Site.Title
"description" $siteDescription
"publisher" (dict "@id" $orgID)
"inLanguage" .Site.Language.Lang
-}}
{{- $software := dict
"@type" "SoftwareApplication"
"name" "RustDesk"
"description" $softwareDescription
"applicationCategory" "BusinessApplication"
"operatingSystem" "Windows, macOS, Linux, iOS, Android, Web"
"url" "https://rustdesk.com"
-}}
{{- $pageType := "WebPage" -}}
{{- if .IsSection -}}
{{- $pageType = "CollectionPage" -}}
{{- else if .IsPage -}}
{{- $pageType = "TechArticle" -}}
{{- end -}}
{{- $page := dict
"@type" $pageType
"@id" $pageID
"url" .Permalink
"name" .Title
"description" $description
"isPartOf" (dict "@id" $websiteID)
"publisher" (dict "@id" $orgID)
"inLanguage" .Site.Language.Lang
"about" $software
-}}
{{- if $keywords -}}
{{- $page = merge $page (dict "keywords" $keywords) -}}
{{- end -}}
{{- if $imageURL -}}
{{- $page = merge $page (dict "image" (dict "@type" "ImageObject" "url" $imageURL)) -}}
{{- end -}}
{{- if .IsPage -}}
{{- $page = merge $page (dict
"headline" .Title
"author" (dict "@id" $orgID)
"mainEntityOfPage" (dict "@type" "WebPage" "@id" $pageID)
) -}}
{{- with .PublishDate -}}
{{- $page = merge $page (dict "datePublished" (.Format $iso8601)) -}}
{{- end -}}
{{- with .Lastmod -}}
{{- $page = merge $page (dict "dateModified" (.Format $iso8601)) -}}
{{- end -}}
{{- end -}}
{{- $schema := dict
"@context" "https://schema.org"
"@graph" (slice $org $website $page)
-}}
<script type="application/ld+json">{{ $schema | jsonify | safeJS }}</script>

View File

@@ -5,7 +5,7 @@
<meta name="twitter:creator" content="@{{ . }}" />
{{- end -}}
<meta name="twitter:title" content="{{ .Title }}" />
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta name="twitter:description" content="{{ partial "utils/page-description.html" . }}" />
{{- with $.Params.images -}}
{{- range first 1 . }}<meta name="twitter:image" content="{{ . | absURL }}" />{{ end -}}
@@ -21,4 +21,4 @@
{{- with .Params.audio }}<meta name="twitter:player" content="{{ . }}" />{{ end }}
{{- with .Params.videos }}
{{- range first 1 . }}<meta name="twitter:player" content="{{ . | absURL }}" />{{ end }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,17 @@
{{- $description := "" -}}
{{- with .Description | plainify | htmlUnescape -}}
{{- $description = . | chomp -}}
{{- end -}}
{{- if $description -}}
{{- $description -}}
{{- else -}}
{{- if .IsHome -}}
{{- with .Site.Params.description | plainify | htmlUnescape -}}
{{ . | chomp -}}
{{- end -}}
{{- else if .IsSection -}}
{{- partial "utils/section-description-fallback.html" . -}}
{{- else -}}
{{- .Summary | plainify | htmlUnescape | chomp -}}
{{- end -}}
{{- end -}}

View File

@@ -0,0 +1,15 @@
{{- $templates := dict
"en" "%s documentation for RustDesk. Browse installation, configuration, deployment, and troubleshooting guides."
"de" "RustDesk-Dokumentation zu %s. Hier finden Sie Anleitungen zur Installation, Konfiguration, Bereitstellung und Fehlerbehebung."
"es" "Documentación de RustDesk sobre %s. Consulta guías de instalación, configuración, despliegue y solución de problemas."
"fr" "Documentation RustDesk sur %s. Consultez les guides d'installation, de configuration, de déploiement et de dépannage."
"it" "Documentazione RustDesk su %s. Consulta le guide per installazione, configurazione, distribuzione e risoluzione dei problemi."
"ja" "RustDesk の%sに関するドキュメントです。インストール、設定、展開、トラブルシューティングのガイドを参照できます。"
"pl" "Dokumentacja RustDesk dotycząca %s. Zawiera instrukcje instalacji, konfiguracji, wdrażania i rozwiązywania problemów."
"pt" "Documentação do RustDesk sobre %s. Consulte guias de instalação, configuração, implantação e solução de problemas."
"ro" "Documentație RustDesk pentru %s. Găsiți ghiduri de instalare, configurare, implementare și depanare."
"zh-cn" "RustDesk 的%s文档提供安装、配置、部署和故障排查指南。"
"zh-tw" "RustDesk 的%s文檔提供安裝、設定、部署與疑難排解指南。"
-}}
{{- $template := or (index $templates .Site.Language.Lang) (index $templates "en") -}}
{{- printf $template .Title -}}

View File

@@ -0,0 +1,14 @@
{{- $descriptions := dict
"en" "Open source remote desktop software and self-hosted remote access platform"
"de" "Open-Source-Remote-Desktop-Software und selbst gehostete Plattform für Fernzugriff"
"es" "Software de escritorio remoto de código abierto y plataforma de acceso remoto autoalojada"
"fr" "Logiciel de bureau à distance open source et plateforme d'accès à distance auto-hébergée"
"it" "Software desktop remoto open source e piattaforma di accesso remoto self-hosted"
"ja" "オープンソースのリモートデスクトップソフトウェアとセルフホスト型リモートアクセスプラットフォーム"
"pl" "Oprogramowanie pulpitu zdalnego open source oraz samodzielnie hostowana platforma zdalnego dostępu"
"pt" "Software de desktop remoto de código aberto e plataforma de acesso remoto auto-hospedada"
"ro" "Software open source pentru desktop la distanță și platformă self-hosted pentru acces remote"
"zh-cn" "开源远程桌面软件和自托管远程访问平台"
"zh-tw" "開源遠端桌面軟體與自主託管遠端存取平台"
-}}
{{- or (index $descriptions .Site.Language.Lang) (index $descriptions "en") -}}

31
layouts/robots.txt Normal file
View File

@@ -0,0 +1,31 @@
User-agent: *
Allow: /
User-agent: GPTBot
Allow: /
User-agent: OAI-SearchBot
Allow: /
User-agent: ChatGPT-User
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: ClaudeBot
Allow: /
User-agent: anthropic-ai
Allow: /
User-agent: Googlebot
Allow: /
User-agent: Google-Extended
Allow: /
User-agent: Bingbot
Allow: /
Sitemap: https://rustdesk.com/docs/sitemap.xml

View File

@@ -21,11 +21,18 @@ padding-left: 4px ;
</style>
<div class="ghContributors">
{{ $url := .Get 0 }}
{{ range getJSON $url }}
{{ with try (resources.GetRemote $url) }}
{{ with .Err }}
{{ warnf "Unable to fetch GitHub contributors from %q: %s" $url . }}
{{ else with .Value }}
{{ $contributors := .Content | transform.Unmarshal }}
{{ range $contributors }}
<div>
<img src="{{.avatar_url}}" class="inline" width="32" height="32" style="height: 32px;height: 32px;margin-bottom:.25em; vertical-align:middle; ">
<label><a href="{{.html_url}}">@{{.login}}</a></label>
<span class="contributions">{{.contributions}} commits</span>
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
</div>