mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2026-04-11 18:26:08 +00:00
seo doc
This commit is contained in:
19
layouts/index.json
Normal file
19
layouts/index.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||
{
|
||||
"title": "{{ site.Title }}",
|
||||
"description": "{{ site.Params.description }}",
|
||||
"url": "{{ site.BaseURL }}",
|
||||
"language": "{{ site.Language.Lang }}",
|
||||
"pages": [
|
||||
{{- range $index, $page := $pages -}}
|
||||
{{- if $index }},{{ end }}
|
||||
{
|
||||
"title": "{{ $page.Title }}",
|
||||
"url": "{{ $page.Permalink }}",
|
||||
"description": "{{ with $page.Description }}{{ . }}{{ else }}{{ $page.Summary }}{{ end }}",
|
||||
"date": "{{ $page.Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"section": "{{ $page.Section }}"
|
||||
}
|
||||
{{- end -}}
|
||||
]
|
||||
}
|
||||
33
layouts/partials/breadcrumb-seo.html
Normal file
33
layouts/partials/breadcrumb-seo.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{{/* Enhanced breadcrumb with Schema.org markup for better SEO */}}
|
||||
{{ if not .Params.disableBreadcrumb }}
|
||||
{{ $ancestors := slice }}
|
||||
{{ $current := . }}
|
||||
{{ range $current.Ancestors.Reverse }}
|
||||
{{ $ancestors = $ancestors | append . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $ancestors }}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{{ range $index, $ancestor := $ancestors }}
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {{ add $index 1 }},
|
||||
"name": "{{ $ancestor.Title }}",
|
||||
"item": "{{ $ancestor.Permalink }}"
|
||||
}{{ if ne $index (sub (len $ancestors) 1) }},{{ end }}
|
||||
{{ end }}
|
||||
,{
|
||||
"@type": "ListItem",
|
||||
"position": {{ add (len $ancestors) 1 }},
|
||||
"name": "{{ .Title }}",
|
||||
"item": "{{ .Permalink }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -1,3 +1,48 @@
|
||||
<!-- 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 ", " }}" />
|
||||
{{- end }}
|
||||
<meta name="author" content="{{ .Site.Params.author }}" />
|
||||
<meta name="language" content="{{ .Site.Language.Lang }}" />
|
||||
<meta name="theme-color" content="#2563eb" />
|
||||
|
||||
<!-- Alternate language versions for better SEO -->
|
||||
{{- if .IsTranslated }}
|
||||
{{- range .AllTranslations }}
|
||||
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" />
|
||||
{{- 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>
|
||||
{{- end }}
|
||||
|
||||
<!-- Enhanced breadcrumb structured data -->
|
||||
{{- partial "breadcrumb-seo.html" . -}}
|
||||
|
||||
<!-- Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WCJMDEZ618"></script>
|
||||
<script>
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<link rel="icon" href="{{ "favicon.svg" | relURL }}" type="image/svg+xml" />
|
||||
<!-- Favicon and App Icons -->
|
||||
<link rel="icon" href="{{ "favicon.svg" | relURL }}" type="image/svg+xml" />
|
||||
<link rel="icon" href="{{ "favicon.ico" | relURL }}" type="image/x-icon" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
|
||||
<meta name="apple-mobile-web-app-title" content="RustDesk Docs" />
|
||||
<meta name="application-name" content="RustDesk Docs" />
|
||||
<meta name="msapplication-TileColor" content="#2563eb" />
|
||||
<meta name="theme-color" content="#2563eb" />
|
||||
74
layouts/partials/schema.html
Normal file
74
layouts/partials/schema.html
Normal file
@@ -0,0 +1,74 @@
|
||||
{{/* 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 }}",
|
||||
{{- 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>
|
||||
24
layouts/partials/twitter_cards.html
Normal file
24
layouts/partials/twitter_cards.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{{/* Twitter Card meta tags */}}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
{{- with site.Params.social.twitter -}}
|
||||
<meta name="twitter:site" content="@{{ . }}" />
|
||||
<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 }}" />
|
||||
|
||||
{{- with $.Params.images -}}
|
||||
{{- range first 1 . }}<meta name="twitter:image" content="{{ . | absURL }}" />{{ end -}}
|
||||
{{- else -}}
|
||||
{{- $featured := "" }}
|
||||
{{- with $featured -}}
|
||||
<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
|
||||
{{- else -}}
|
||||
{{- with $.Site.Params.images }}<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>{{ end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Params.audio }}<meta name="twitter:player" content="{{ . }}" />{{ end }}
|
||||
{{- with .Params.videos }}
|
||||
{{- range first 1 . }}<meta name="twitter:player" content="{{ . | absURL }}" />{{ end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user