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