mirror of
https://github.com/yanislav-igonin/micrach
synced 2024-12-22 06:12:33 +03:00
fix: seo + uploads
This commit is contained in:
parent
2c19a7794d
commit
424a5ff4df
@ -12,8 +12,8 @@
|
||||
<div class="files-container">
|
||||
{{ range $File := .Files }}
|
||||
<div class="file-container">
|
||||
<a href="/uploads/{{$.GetThreadID}}/o/{{$File.ID}}.{{$File.Ext}}" target="blank">
|
||||
<img src="/uploads/{{$.GetThreadID}}/t/{{$File.ID}}.{{$File.Ext}}" class="file" alt="Uploaded picture">
|
||||
<a href="uploads/{{$.GetThreadID}}/o/{{$File.ID}}.{{$File.Ext}}" target="blank">
|
||||
<img src="uploads/{{$.GetThreadID}}/t/{{$File.ID}}.{{$File.Ext}}" class="file" alt="Uploaded picture">
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -4,7 +4,7 @@
|
||||
{{ $length := len .Files }}
|
||||
{{ if gt $length 0 }}
|
||||
{{ $FirstFile := index .Files 0 }}
|
||||
<img src="/uploads/{{.ID}}/t/{{$FirstFile.ID}}.{{$FirstFile.Ext}}" class="card-img-top" alt="Uploaded picture">
|
||||
<img src="uploads/{{.ID}}/t/{{$FirstFile.ID}}.{{$FirstFile.Ext}}" class="card-img-top" alt="Uploaded picture">
|
||||
{{ end }}
|
||||
|
||||
<div class="card-body">
|
||||
|
@ -3,7 +3,7 @@
|
||||
{{ $SeoImageUrl := "" }}
|
||||
{{ if .Files }}
|
||||
{{ $FirstFile := index .Files 0 }}
|
||||
{{ $SeoImageUrl = printf "https://micrach.igonin.dev/uploads/%d/t/%d.%s" .ID $FirstFile.ID $FirstFile.Ext }}
|
||||
{{ $SeoImageUrl = printf "uploads/%d/t/%d.%s" .ID $FirstFile.ID $FirstFile.Ext }}
|
||||
{{ else }}
|
||||
{{ $SeoImageUrl = "https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png" }}
|
||||
{{ end }}
|
||||
@ -17,14 +17,14 @@
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://micrach.igonin.dev/{{ .ID }}">
|
||||
<meta property="og:url" content="{{ .ID }}">
|
||||
<meta property="og:title" content="{{ .Title }}">
|
||||
<meta property="og:description" content="{{ .Text }}">
|
||||
<meta property="og:image" content="{{ $SeoImageUrl }}">
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="{{ $SeoImageUrl }}">
|
||||
<meta property="twitter:url" content="https://micrach.igonin.dev/{{ .ID }}">
|
||||
<meta property="twitter:url" content="{{ .ID }}">
|
||||
<meta property="twitter:title" content="{{ .Title }}">
|
||||
<meta property="twitter:description" content="{{ .Text }}">
|
||||
<meta property="twitter:image" content="{{ $SeoImageUrl }}">
|
||||
|
@ -8,14 +8,14 @@
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://micrach.igonin.dev/">
|
||||
<meta property="og:url" content="/">
|
||||
<meta property="og:title" content="Micrach">
|
||||
<meta property="og:description" content="Single board imageboard.">
|
||||
<meta property="og:image" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
||||
<meta property="twitter:url" content="https://micrach.igonin.dev/">
|
||||
<meta property="twitter:url" content="/">
|
||||
<meta property="twitter:title" content="Micrach">
|
||||
<meta property="twitter:description" content="Single board imageboard.">
|
||||
<meta property="twitter:image" content="https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png">
|
||||
|
Loading…
Reference in New Issue
Block a user